Linux/Alpha and pgsql.... - Mailing list pgsql-hackers

From Ryan Kirkpatrick
Subject Linux/Alpha and pgsql....
Date
Msg-id Pine.LNX.3.95.980410174843.6356A-300000@stargazer
Whole thread Raw
Responses Re: [HACKERS] Linux/Alpha and pgsql....
Re: [HACKERS] Linux/Alpha and pgsql....
List pgsql-hackers
    I finally found some time to make minor patch to pgsql 6.3.1 to
make it "sort-of-work" out of the box for Linux/Alpha. At the current
moment, I can get it to compile, and run 'initdb' successfully. Regression
tests are successful for the most part, with the biggest problems being in
any dealing with floats, especially the float{4,...} tests. Overall, it
looks as things are improving! :)
    The patches are for the two modified files only, as the changes
were small. Mainly just replacing 'defined(linuxalpha)' with something
that is understood '( defined(linux) && defined(__alpha__) )' by the
compiler correctly, since linuxalpha was not getting defined anywhere, and
the Linux/Alpha gcc does not generate the linuxalpha symbol itself.
Appears to have been a slight oversight by some one who was adding
Linux/Alpha support to the code. This shouldn't break any other platforms,
with as small and simple a change as it is. Hopefully it can make it into
6.3.2? :)
    Also, what is the purpose of the files in
./src/backend/ports/linuxalpha? I can't find any reference to them
anywhere else in the sources, and it does not appears they are even
included in the final binary. The files themselves are pretty sparse.
Also, if I understand the configure scripts correctly, only a
./src/backend/port/linux directory would be used, as linuxalpha is
considered a subset of linux. Of course the latter directory existed in
6.2.x, but is now gone. I think that the former directory can follow,
i.e. be removed as well.
    Thats all for now! As usual, any questions about these
patches, feel free to email me. TTYL.

----------------------------------------------------------------------------
|   "For to me to live is Christ, and to die is gain."                     |
|                                            --- Philippians 1:21 (KJV)    |
----------------------------------------------------------------------------
|  Ryan Kirkpatrick  |  Boulder, Colorado  | rkirkpat@nag.cs.colorado.edu  |
----------------------------------------------------------------------------
|               http://www-ugrad.cs.colorado.edu/~rkirkpat/                |
----------------------------------------------------------------------------
--- postgresql-6.3.1.actual/src/include/utils/memutils.h    Wed Feb 25 22:44:08 1998
+++ postgresql-6.3.1/src/include/utils/memutils.h    Fri Apr 10 15:22:17 1998
@@ -67,7 +67,7 @@
  */
 #if defined(sun) && ! defined(sparc)
 #define LONGALIGN(LEN)    SHORTALIGN(LEN)
-#elif defined (alpha) || defined(linuxalpha)
+#elif defined (alpha) || ( defined(linux) && defined(__alpha__))
 
  /*
   * even though "long alignment" should really be on 8-byte boundaries for
--- postgresql-6.3.1.actual/src/backend/utils/adt/float.c    Wed Feb 25 22:37:07 1998
+++ postgresql-6.3.1/src/backend/utils/adt/float.c    Fri Apr 10 15:21:11 1998
@@ -132,7 +132,7 @@
  * until the distributions are updated.
  *                                --djm 12/16/96
  */
-#if defined(linuxalpha) && !defined(UNSAFE_FLOATS)
+#if ( defined(linux) && defined(__alpha__) ) && !defined(UNSAFE_FLOATS)
 #define UNSAFE_FLOATS
 #endif
 

pgsql-hackers by date:

Previous
From: The Hermit Hacker
Date:
Subject: Re: [HACKERS] reverse file descriptor to a file name...
Next
From: The Hermit Hacker
Date:
Subject: Re: [HACKERS] reverse file descriptor to a file name...