Обсуждение: /usr/include/pgsql/os.h does not exist

Поиск
Список
Период
Сортировка

/usr/include/pgsql/os.h does not exist

От
pgsql-bugs@postgresql.org
Дата:
Charles Choi (cchoi@sonicsinc.com) reports a bug with a severity of 1
The lower the number the more severe it is.

Short Description
/usr/include/pgsql/os.h does not exist

Long Description
I am trying to install Postgresql 7.0.2 using the RPM
on RedHat 6.2.

In the example code section I have shown the contents of
the directory /usr/include/pgsql

I have used the RPM postgresql-devel-7_0_2-2_i386.rpm.
I have installed both the version on your site and
yet again from the RedHat site.  Same problem.

Hope you can fix this - thanks!

-Charles


Sample Code
socworks1 /usr/include/pgsql>ls -al
total 224
drwxr-xr-x   17 root     root         4096 Sep  5 20:13 ./
drwxr-xr-x   44 root     root         8192 Sep  5 20:13 ../
drwxr-xr-x    2 root     root         4096 Sep  5 20:13 access/
-rw-r--r--    1 root     root        19779 Jun 12 14:21 c.h
drwxr-xr-x    2 root     root         4096 Sep  5 20:13 catalog/
drwxr-xr-x    2 root     root         4096 Sep  5 20:13 commands/
-rw-r--r--    1 root     root        16412 Jun 12 14:21 config.h
-r--r--r--    1 root     root         1261 Jun 12 14:20 ecpgerrno.h
-r--r--r--    1 root     root         1233 Jun 12 14:20 ecpglib.h
-r--r--r--    1 root     root         1856 Jun 12 14:20 ecpgtype.h
drwxr-xr-x    2 root     root         4096 Sep  5 20:13 executor/
-r--r--r--    1 root     root        25046 Jun 12 14:20 fmgr.h
drwxr-xr-x    2 root     root         4096 Sep  5 20:13 iodbc/
drwxr-xr-x    2 root     root         4096 Sep  5 20:13 lib/
-r--r--r--    1 root     root          403 Jun 12 14:20 libpgeasy.h
-r--r--r--    1 root     root          650 Jun 12 14:20 libpgtcl.h
drwxr-xr-x    2 root     root         4096 Sep  5 20:13 libpq/
drwxr-xr-x    2 root     root         4096 Sep  5 20:13 libpq++/
-r--r--r--    1 root     root          940 Jun 12 14:20 libpq++.h
-r--r--r--    1 root     root        12383 Jun 12 14:20 libpq-fe.h
-r--r--r--    1 root     root        12378 Jun 12 14:20 libpq-int.h
drwxr-xr-x    2 root     root         4096 Sep  5 20:13 nodes/
lrwxrwxrwx    1 root     root           25 Sep  5 20:13 os.h -> .././include/port/linux.h
drwxr-xr-x    2 root     root         4096 Sep  5 20:13 parser/
drwxr-xr-x    3 root     root         4096 Sep  5 20:13 port/
-rw-r--r--    1 root     root         7268 Jun 12 14:21 postgres.h
-rw-r--r--    1 root     root         1222 Jun 12 14:21 postgres_ext.h
-r--r--r--    1 root     root         5484 Jun 12 14:20 pqexpbuffer.h
drwxr-xr-x    2 root     root         4096 Sep  5 20:13 rewrite/
-r--r--r--    1 root     root          943 Jun 12 14:20 sql3types.h
-r--r--r--    1 root     root         1020 Jun 12 14:20 sqlca.h
drwxr-xr-x    2 root     root         4096 Sep  5 20:13 storage/
drwxr-xr-x    2 root     root         4096 Sep  5 20:13 tcop/
drwxr-xr-x    2 root     root         4096 Sep  5 20:13 utils/
socworks1 /usr/include/pgsql>ls os.h
os.h@
socworks1 /usr/include/pgsql>uname -a
Linux socworks1 2.2.16-3 #1 Mon Jun 19 18:49:25 EDT 2000 i686 unknown
socworks1 /usr/include/pgsql>more os.h
os.h: No such file or directory


No file was uploaded with this report

Re: /usr/include/pgsql/os.h does not exist

От
Tom Lane
Дата:
pgsql-bugs@postgresql.org writes:
> /usr/include/pgsql/os.h does not exist

Yeah, this is a recently-noticed defect in the RPM distribution.
A symlink was installed as a symlink, instead of as the referenced
file.

Until a new RPM can be issued, the simplest fix is to replace the
os.h symlink with the correct contents of port/linux.h (attached).

            regards, tom lane


/* __USE_POSIX, __USE_BSD, and __USE_BSD_SIGNAL used to be defined either
   here or with -D compile options, but __ macros should be set and used by C
   library macros, not Postgres code.  __USE_POSIX is set by features.h,
   __USE_BSD is set by bsd/signal.h, and __USE_BSD_SIGNAL appears not to
   be used.
*/
#define JMP_BUF
#define USE_POSIX_TIME

#if defined(__i386__)
typedef unsigned char slock_t;

#define HAS_TEST_AND_SET

#elif defined(__sparc__)
typedef unsigned char slock_t;

#define HAS_TEST_AND_SET

#elif defined(__powerpc__)
typedef unsigned int slock_t;

#define HAS_TEST_AND_SET

#elif defined(__alpha__)
typedef long int slock_t;

#define HAS_TEST_AND_SET

#elif defined(__mips__)
typedef unsigned int slock_t;

#define HAS_TEST_AND_SET

#elif defined(__arm__)
typedef unsigned char slock_t

#define HAS_TEST_AND_SET

#endif

#if defined(__GLIBC__) && (__GLIBC__ >= 2)
#ifdef HAVE_INT_TIMEZONE
#undef HAVE_INT_TIMEZONE
#endif
#endif

#if defined(__powerpc__)
#undef HAVE_INT_TIMEZONE
#endif