Try to further reduce the PORT dependencies.

Essentially, config.h now includes an 'os.h', which is created via
configure by linking a "port.h" file from the port directory to the
include directory.

Going to try to merge backend/port in similar ways
This commit is contained in:
Marc G. Fournier 1997-02-09 04:34:07 +00:00
parent d557375d61
commit e7c767b477
17 changed files with 306 additions and 310 deletions

378
src/configure vendored

File diff suppressed because it is too large Load Diff

View File

@ -9,7 +9,7 @@ case "$host_os" in
esac ;;
linux*) PORTNAME='linux' ;;
bsdi*) PORTNAME='bsdi' ;;
freebsd*|netbsd*) PORTNAME='BSD44_derived' ;;
freebsd*|netbsd*) PORTNAME='BSD44_derived';;
dgux*) PORTNAME='dgux';;
aix*) PORTNAME='aix';;
nextstep*) PORTNAME='nextstep';;
@ -25,6 +25,7 @@ nextstep*) PORTNAME='nextstep';;
echo ""
exit;;
esac
AC_LINK_FILES(port/${PORTNAME}.h, include/os.h)
AC_SUBST(PORTNAME)
AC_SUBST(LDFLAGS)
AC_SUBST(CPPFLAGS)

View File

@ -93,149 +93,7 @@
* Code below this point should not require changes
*/
#if defined(aix)
# define CLASS_CONFLICT
# define DISABLE_XOPEN_NLS
# define HAVE_ANSI_CPP
# define HAS_TEST_AND_SET
typedef unsigned int slock_t;
#endif
#if defined(alpha)
# define USE_POSIX_TIME
# define USE_POSIX_SIGNALS
# define DISABLE_XOPEN_NLS
# define HAS_LONG_LONG
# define HAS_TEST_AND_SET
# include <sys/mman.h> /* for msemaphore */
typedef msemaphore slock_t;
#endif
#if defined(BSD44_derived)
# define USE_POSIX_TIME
# define NEED_I386_TAS_ASM
# define HAS_TEST_AND_SET
# if defined(__mips__)
/* # undef HAS_TEST_AND_SET */
# endif
typedef unsigned char slock_t;
#endif
#if defined(bsdi)
# if defined(i386)
# define NEED_I386_TAS_ASM
# endif
# if defined(sparc)
# define NEED_SPARC_TAS_ASM
# endif
# define USE_POSIX_TIME
# define HAS_TEST_AND_SET
typedef unsigned char slock_t;
#endif
#if defined(dgux)
# define LINUX_ELF
# define USE_POSIX_SIGNALS
#endif
#if defined(hpux)
# define JMP_BUF
# define USE_POSIX_TIME
# define HAS_TEST_AND_SET
typedef struct { int sem[4]; } slock_t;
#endif
#if defined(i386_solaris)
# define USE_POSIX_TIME
# define USE_POSIX_SIGNALS
# define NO_EMPTY_STMTS
# define SYSV_DIRENT
# define HAS_TEST_AND_SET
typedef unsigned char slock_t;
#endif
#if defined(irix5)
# define USE_POSIX_TIME
# define USE_POSIX_SIGNALS
# define NO_EMPTY_STMTS
# define SYSV_DIRENT
# define HAS_TEST_AND_SET
# include <abi_mutex.h>
typedef abilock_t slock_t;
#endif
#if defined(linux)
/* __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(PPC)
# define NEED_I386_TAS_ASM
# define HAS_TEST_AND_SET
typedef unsigned char slock_t;
# endif
#endif
#if defined(nextstep)
# include <sys/ioctl.h>
# if defined(__STRICT_ANSI__)
# define isascii(c) ((unsigned)(c)<=0177)
# endif
extern char* strdup (const char* string);
# ifndef _POSIX_SOURCE
typedef unsigned short mode_t;
typedef int sigset_t;
# define SIG_BLOCK 00
# define SIG_UNBLOCK 01
# define SIG_SETMASK 02
# define NEED_SIG_JMP
# endif
# define JMP_BUF
# define NO_WAITPID
typedef struct mutex slock_t;
#endif
#if defined(sparc_solaris)
# define USE_POSIX_TIME
# define USE_POSIX_SIGNALS
# define NO_EMPTY_STMTS
# define SYSV_DIRENT
# define HAS_TEST_AND_SET
typedef unsigned char slock_t;
#endif
#if defined(sunos4)
# define USE_POSIX_TIME
#endif
#if defined(svr4)
# define USE_POSIX_TIME
# define USE_POSIX_SIGNALS
# define NO_EMPTY_STMTS
# define SYSV_DIRENT
#endif
#if defined(win32)
# define JMP_BUF
# define NEED_SIG_JMP
# define NO_UNISTD_H
# define USES_WINSOCK
# define NOFILE 100
# ifndef MAXPATHLEN
# define MAXPATHLEN 250
# endif
#endif /* WIN32 */
#if defined(ultrix4)
# define USE_POSIX_TIME
# define NEED_STRDUP
#endif
#include "os.h"
/* This patch changes the behavior of aclcheck for groups. Currently an user
* can access a table only if he has the required permission for ALL the groups

5
src/port/aix.h Normal file
View File

@ -0,0 +1,5 @@
# define CLASS_CONFLICT
# define DISABLE_XOPEN_NLS
# define HAVE_ANSI_CPP
# define HAS_TEST_AND_SET
typedef unsigned int slock_t;

7
src/port/alpha.h Normal file
View File

@ -0,0 +1,7 @@
# define USE_POSIX_TIME
# define USE_POSIX_SIGNALS
# define DISABLE_XOPEN_NLS
# define HAS_LONG_LONG
# define HAS_TEST_AND_SET
# include <sys/mman.h> /* for msemaphore */
typedef msemaphore slock_t;

9
src/port/bsdi.h Normal file
View File

@ -0,0 +1,9 @@
# if defined(i386)
# define NEED_I386_TAS_ASM
# endif
# if defined(sparc)
# define NEED_SPARC_TAS_ASM
# endif
# define USE_POSIX_TIME
# define HAS_TEST_AND_SET
typedef unsigned char slock_t;

2
src/port/dgux.h Normal file
View File

@ -0,0 +1,2 @@
# define LINUX_ELF
# define USE_POSIX_SIGNALS

4
src/port/hpux.h Normal file
View File

@ -0,0 +1,4 @@
# define JMP_BUF
# define USE_POSIX_TIME
# define HAS_TEST_AND_SET
typedef struct { int sem[4]; } slock_t;

6
src/port/i386_solaris.h Normal file
View File

@ -0,0 +1,6 @@
# define USE_POSIX_TIME
# define USE_POSIX_SIGNALS
# define NO_EMPTY_STMTS
# define SYSV_DIRENT
# define HAS_TEST_AND_SET
typedef unsigned char slock_t;

7
src/port/irix5.h Normal file
View File

@ -0,0 +1,7 @@
# define USE_POSIX_TIME
# define USE_POSIX_SIGNALS
# define NO_EMPTY_STMTS
# define SYSV_DIRENT
# define HAS_TEST_AND_SET
# include <abi_mutex.h>
typedef abilock_t slock_t;

13
src/port/linux.h Normal file
View File

@ -0,0 +1,13 @@
/* __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(PPC)
# define NEED_I386_TAS_ASM
# define HAS_TEST_AND_SET
typedef unsigned char slock_t;
# endif

17
src/port/nextstep.h Normal file
View File

@ -0,0 +1,17 @@
# include <sys/ioctl.h>
# if defined(__STRICT_ANSI__)
# define isascii(c) ((unsigned)(c)<=0177)
# endif
extern char* strdup (const char* string);
# ifndef _POSIX_SOURCE
typedef unsigned short mode_t;
typedef int sigset_t;
# define SIG_BLOCK 00
# define SIG_UNBLOCK 01
# define SIG_SETMASK 02
# define NEED_SIG_JMP
# endif
# define JMP_BUF
# define NO_WAITPID
typedef struct mutex slock_t;

6
src/port/sparc_solaris.h Normal file
View File

@ -0,0 +1,6 @@
# define USE_POSIX_TIME
# define USE_POSIX_SIGNALS
# define NO_EMPTY_STMTS
# define SYSV_DIRENT
# define HAS_TEST_AND_SET
typedef unsigned char slock_t;

1
src/port/sunos4.h Normal file
View File

@ -0,0 +1 @@
# define USE_POSIX_TIME

4
src/port/svr4.h Normal file
View File

@ -0,0 +1,4 @@
# define USE_POSIX_TIME
# define USE_POSIX_SIGNALS
# define NO_EMPTY_STMTS
# define SYSV_DIRENT

2
src/port/ultrix4.h Normal file
View File

@ -0,0 +1,2 @@
# define USE_POSIX_TIME
# define NEED_STRDUP

8
src/port/win32.h Normal file
View File

@ -0,0 +1,8 @@
# define JMP_BUF
# define NEED_SIG_JMP
# define NO_UNISTD_H
# define USES_WINSOCK
# define NOFILE 100
# ifndef MAXPATHLEN
# define MAXPATHLEN 250
# endif