Re: [PATCHES] Patch to make Turks happy.

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: [PATCHES] Patch to make Turks happy.
Дата
Msg-id 200212070223.gB72NMd05967@candle.pha.pa.us
обсуждение исходный текст
Ответ на Re: [PATCHES] Patch to make Turks happy.  (Florian Weimer <Weimer@CERT.Uni-Stuttgart.DE>)
Ответы Re: [PATCHES] Patch to make Turks happy.  (Florian Weimer <Weimer@CERT.Uni-Stuttgart.DE>)
Список pgsql-hackers
Are you 64-bit s390?

We have OS/390 patches in 7.4 but they were judged too risky for 7.3.
Attached is the patch.   Comment is:

    revision 1.103
    date: 2002/11/22 01:13:16;  author: tgl;  state: Exp;  lines: +29 -2
    TAS code originally written for s390 (32-bit) does not work for s390x
    (64-bit).  Fix it.  Per report from Permaine Cheung.

---------------------------------------------------------------------------

Florian Weimer wrote:
> Nicolai Tufar <ntufar@apb.com.tr> writes:
>
> > As far as I figured from the source code this function only deals
> > with cleaning up locale names and nothing else. Since all the locale
> > names are in plain ASCII I think it will be safe to use ASCII-only
> > lower-case conversion.
>
> Does PostgreSQL run on the UNIX subsystem of OS/390? ;-)
>
> (EBCDIC is a bit, uhm, strange.  Only the decimal digits are
> consecutive the rest is a big mess.)
>
> --
> Florian Weimer                       Weimer@CERT.Uni-Stuttgart.DE
> University of Stuttgart           http://CERT.Uni-Stuttgart.DE/people/fw/
> RUS-CERT                          fax +49-711-685-5898
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: Have you searched our list archives?
>
> http://archives.postgresql.org
>

--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073
Index: s_lock.h
===================================================================
RCS file: /cvsroot/pgsql-server/src/include/storage/s_lock.h,v
retrieving revision 1.102
retrieving revision 1.103
diff -c -c -r1.102 -r1.103
*** s_lock.h    10 Nov 2002 00:33:43 -0000    1.102
--- s_lock.h    22 Nov 2002 01:13:16 -0000    1.103
***************
*** 63,69 ****
   * Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group
   * Portions Copyright (c) 1994, Regents of the University of California
   *
!  *      $Id: s_lock.h,v 1.102 2002/11/10 00:33:43 momjian Exp $
   *
   *-------------------------------------------------------------------------
   */
--- 63,69 ----
   * Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group
   * Portions Copyright (c) 1994, Regents of the University of California
   *
!  *      $Id: s_lock.h,v 1.103 2002/11/22 01:13:16 tgl Exp $
   *
   *-------------------------------------------------------------------------
   */
***************
*** 150,156 ****

  #endif     /* __arm__ */

! #if defined(__s390__) || defined(__s390x__)
  /*
   * S/390 Linux
   */
--- 150,157 ----

  #endif     /* __arm__ */

!
! #if defined(__s390__) && !defined(__s390x__)
  /*
   * S/390 Linux
   */
***************
*** 175,180 ****
--- 176,207 ----
  }

  #endif     /* __s390__ */
+
+ #if defined(__s390x__)
+ /*
+  * S/390x Linux (64-bit zSeries)
+  */
+ #define TAS(lock)       tas(lock)
+
+ static __inline__ int
+ tas(volatile slock_t *lock)
+ {
+     int            _res;
+
+     __asm__    __volatile__(
+         "    la    1,1            \n"
+         "    lg     2,%2        \n"
+         "    slr 0,0            \n"
+         "    cs     0,1,0(2)    \n"
+         "    lr     %1,0        \n"
+ :        "=m"(lock), "=d"(_res)
+ :        "m"(lock)
+ :        "0", "1", "2");
+
+     return (_res);
+ }
+
+ #endif     /* __s390x__ */


  #if defined(__sparc__)

В списке pgsql-hackers по дате отправления:

Предыдущее
От: "Christopher Kings-Lynne"
Дата:
Сообщение: pg_conversion
Следующее
От: Justin Clift
Дата:
Сообщение: Re: hardware needed ?