Re: [HACKERS] Linux/Alpha and pgsql.... - Mailing list pgsql-hackers
From | Ryan Kirkpatrick |
---|---|
Subject | Re: [HACKERS] Linux/Alpha and pgsql.... |
Date | |
Msg-id | Pine.LNX.3.95.980411162907.8680A-400000@stargazer Whole thread Raw |
In response to | Re: [HACKERS] Linux/Alpha and pgsql.... (The Hermit Hacker <scrappy@hub.org>) |
Responses |
Re: [HACKERS] Linux/Alpha and pgsql....
|
List | pgsql-hackers |
On Sat, 11 Apr 1998, The Hermit Hacker wrote: > On Sat, 11 Apr 1998, Ryan Kirkpatrick wrote: > > > These two patches should bring the current version of pgsql very > > close to working cleaning on Linux/Alpha! :) As usual, if you have any > > questions, feel free to email me. > > Seeing as how close we are to a v6.3.2 release, I put these in, > but I don't like them... > > We've been moving *away* from using -D's in order to deal with > operating system/hardware related issues...using tools/ccsym, are there no > compiler defined variables you can use for this instead? Hold on a second here.... The first patches I sent you were done by modifying the defined(linuxalpha) to (defined(linux) && defined(alpha)) (the tools/ccsym method). But I was told that there was a template for linux/alpha, and I should modify that, and so I used the -D's. Which way do you all want it??? For what its worth, I agree, the output from tools/ccsym should be used and not -D's. Ok, attached are a new set of patches. First of all, ignore all previous patches I have sent on this thread. Now these three work on the idea that 'alpha' and 'linux' are both defined. The former is defined by CFLAGS in template/linuxalpha, and latter is defined by the gcc on my UDB (and all other Linux/Alpha systems). This removes the need to add any defines to the CFLAGS line. To get rid of the other define (-Dalpha), we simply need to replace each 'defined(alpha)' with '(defined(alpha) || defined(__alpha__))', as gcc automatically defines '__alpha__' like it does 'linux'. If you want me to do this, just ask. Ok, now are these patches ok by everyone? :) Thanks. ---------------------------------------------------------------------------- | "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/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 --- 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) /* * even though "long alignment" should really be on 8-byte boundaries for --- pgsql.original/src/backend/main/main.c Mon Mar 23 02:00:35 1998 +++ pgsql/src/backend/main/main.c Sat Apr 11 08:38:54 1998 @@ -15,7 +15,7 @@ #include <string.h> #include <unistd.h> -#ifdef alpha +#if defined(alpha) && !defined(linux) #include <sys/sysinfo.h> #include <machine/hal_sysinfo.h> #define ASSEMBLER
pgsql-hackers by date: