]> granicus.if.org Git - postgresql/commitdiff
Re-add getopt.h check, remove NT-specific tests for it.
authorBruce Momjian <bruce@momjian.us>
Mon, 19 Jul 1999 02:27:16 +0000 (02:27 +0000)
committerBruce Momjian <bruce@momjian.us>
Mon, 19 Jul 1999 02:27:16 +0000 (02:27 +0000)
18 files changed:
src/backend/bootstrap/bootstrap.c
src/backend/postmaster/postmaster.c
src/backend/tcop/postgres.c
src/backend/utils/mb/common.c
src/bin/pg_dump/pg_dump.c
src/bin/pg_id/pg_id.c
src/bin/psql/psql.c
src/configure.in
src/include/config.h.in
src/include/port/win32.h
src/interfaces/ecpg/preproc/ecpg.c
src/interfaces/libpq/fe-auth.c
src/interfaces/libpq/fe-connect.c
src/interfaces/libpq/fe-exec.c
src/interfaces/libpq/fe-lobj.c
src/interfaces/libpq/fe-misc.c
src/interfaces/libpq/fe-print.c
src/interfaces/libpq/win32.h

index fc357d87a796534e66509bf9c5819c4438bfa91e..8db37d0a081d1b379aa10b1d399d4833666821b4 100644 (file)
@@ -7,7 +7,7 @@
  * Copyright (c) 1994, Regents of the University of California
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/bootstrap/bootstrap.c,v 1.65 1999/07/17 20:16:47 momjian Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/bootstrap/bootstrap.c,v 1.66 1999/07/19 02:27:04 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
 #include <time.h>
 #include <signal.h>
 #include <setjmp.h>
-#ifdef __CYGWIN32__
-#include <getopt.h>
-#endif
 
 #define BOOTSTRAP_INCLUDE              /* mask out stuff in tcop/tcopprot.h */
 
 #include "postgres.h"
-
+#ifdef HAVE_GETOPT_H
+#include <getopt.h>
+#endif
 
 #include "access/genam.h"
 #include "access/heapam.h"
index 15a21773e962b89ae2c878a8bf8ffa52f11b4e66..c21611cc1a377b4b5d666b5075dea192a7532a70 100644 (file)
@@ -10,7 +10,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/postmaster/postmaster.c,v 1.114 1999/07/17 20:17:32 momjian Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/postmaster/postmaster.c,v 1.115 1999/07/19 02:27:06 momjian Exp $
  *
  * NOTES
  *
  *
  *-------------------------------------------------------------------------
  */
-#include "postgres.h"
+#include <unistd.h>
+#include <signal.h>
+#include <time.h>
+#include <sys/wait.h>
+#include <ctype.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/time.h>
+#include <sys/socket.h>
+#include <errno.h>
+#include <fcntl.h>
 #include <sys/param.h>
+
+#include "postgres.h"
  /* moved here to prevent double define */
 #ifdef HAVE_NETDB_H
 #include <netdb.h>
 #endif
 
-
 #ifndef MAXHOSTNAMELEN
 #define MAXHOSTNAMELEN 256
 #endif
 
-#if !defined(NO_UNISTD_H)
-#include <unistd.h>
-#endif  /* !NO_UNISTD_H */
-
-#include <signal.h>
-#include <time.h>
-
-
 #ifdef HAVE_LIMITS_H
 #include <limits.h>
 #else
 #include <values.h>
 #endif
-#include <sys/wait.h>
-#include <ctype.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <sys/time.h>
-#include <sys/socket.h>
-
-#include <errno.h>
-#include <fcntl.h>
 
 #ifdef HAVE_SYS_SELECT_H
 #include <sys/select.h>
 #endif
 
-#ifdef __CYGWIN32__
+#ifdef HAVE_GETOPT_H
 #include "getopt.h"
 #endif
 
index 6dfd32f6b107cca6ed713aaa399896be31a30436..ea357ba613a14a4f4e6da210ace00ac3b2a024ad 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.125 1999/07/17 20:17:51 momjian Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.126 1999/07/19 02:27:06 momjian Exp $
  *
  * NOTES
  *       this is the "main" module of the postgres backend and
@@ -39,7 +39,7 @@
 #include <netinet/in.h>
 #include <arpa/inet.h>
 #include <netdb.h>
-#ifdef __CYGWIN32__
+#ifdef HAVE_GETOPT_H
 #include <getopt.h>
 #endif
 
@@ -1494,7 +1494,7 @@ PostgresMain(int argc, char *argv[], int real_argc, char *real_argv[])
        if (!IsUnderPostmaster)
        {
                puts("\nPOSTGRES backend interactive interface ");
-               puts("$Revision: 1.125 $ $Date: 1999/07/17 20:17:51 $\n");
+               puts("$Revision: 1.126 $ $Date: 1999/07/19 02:27:06 $\n");
        }
 
        /* ----------------
index cab36c7b4c6f5b84d70ea8689504c7602cb818bf..0464f5cb872195ae8a45acc28d5fb9557eae348c 100644 (file)
@@ -2,19 +2,15 @@
  * This file contains some public functions
  * usable for both the backend and the frontend.
  * Tatsuo Ishii
- * $Id: common.c,v 1.5 1999/05/25 16:12:41 momjian Exp $ */
+ * $Id: common.c,v 1.6 1999/07/19 02:27:07 momjian Exp $ */
 
 #include <stdlib.h>
+#include <unistd.h>
+#include <string.h>
 
 #ifdef WIN32
 #include "win32.h"
-#else
-#if !defined(NO_UNISTD_H)
-#include <unistd.h>
 #endif
-#endif
-
-#include <string.h>
 
 #include "mb/pg_wchar.h"
 
index c1597d7f26c85eefcb00c42d7dc976502a22bf66..cd48c73a805809cb136b533e6d0a009a569f082c 100644 (file)
@@ -21,7 +21,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_dump.c,v 1.117 1999/07/17 20:18:18 momjian Exp $
+ *       $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_dump.c,v 1.118 1999/07/19 02:27:08 momjian Exp $
  *
  * Modifications - 6/10/96 - dave@bensoft.com - version 1.13.dhb
  *
@@ -75,7 +75,7 @@
 #include <termios.h>
 #endif
 
-#ifdef __CYGWIN32__
+#ifdef HAVE_GETOPT_H
 #include <getopt.h>
 #endif
 
index d14d653c60e1ef6c8ce664c9e635afb140baf82a..70da5f5d5d5222f431b9f52731e8393e4e7a1481 100644 (file)
@@ -9,16 +9,18 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/bin/pg_id/Attic/pg_id.c,v 1.8 1999/02/13 23:20:29 momjian Exp $
+ *       $Header: /cvsroot/pgsql/src/bin/pg_id/Attic/pg_id.c,v 1.9 1999/07/19 02:27:09 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
-#include <sys/types.h>
-#include <pwd.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <unistd.h>
-#ifdef __CYGWIN32__
+#include <sys/types.h>
+#include <pwd.h>
+
+#include "postgres.h"
+#ifdef HAVE_GETOPT_H
 #include <getopt.h>
 #endif
 
index 5b042bdab6ba8d970ab277fd740b48041bfac3fd..c7aaf83f98752e4a5739190507362d4880d87d14 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/bin/psql/Attic/psql.c,v 1.183 1999/07/17 20:18:23 momjian Exp $
+ *       $Header: /cvsroot/pgsql/src/bin/psql/Attic/psql.c,v 1.184 1999/07/19 02:27:10 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
 #include "pqsignal.h"
 #include "stringutils.h"
 #include "psqlHelp.h"
+
 #ifndef HAVE_STRDUP
 #include "strdup.h"
 #endif
+
 #ifdef HAVE_TERMIOS_H
 #include <termios.h>
 #endif
-#ifdef __CYGWIN32__
+
+#ifdef HAVE_GETOPT_H
 #include <getopt.h>
 #endif
 
index 05ad2c2ea68e1375c23986a26e97b858a060db7d..311c36bb22bdcb2448e077cffc87fc69b8d1dd3e 100644 (file)
@@ -582,6 +582,7 @@ AC_CHECK_HEADERS(dld.h)
 AC_CHECK_HEADERS(endian.h)
 AC_CHECK_HEADERS(float.h)
 AC_CHECK_HEADERS(fp_class.h)
+AC_CHECK_HEADERS(getopt.h)
 AC_CHECK_HEADERS(history.h)
 AC_CHECK_HEADERS(ieeefp.h)
 AC_CHECK_HEADERS(limits.h)
index fb1d566a09e68b14db6edcb9c66db24a2114a052..e7ae8b302b66475b11bbcdffcc4ece3811f3aa1e 100644 (file)
 /* Set to 1 if you have <fp_class.h> */
 #undef HAVE_FP_CLASS_H
 
+/* Set to 1 if you have <getopt.h> */
+#undef HAVE_GETOPT_H
+
 /* Set to 1 if you have <history.h> */
 #undef HAVE_HISTORY_H
 
index d343f606924c5c67030256b2d0b8adefc365422d..7e21816b2b6707df40db49f8d9ed22ddf52bd90b 100644 (file)
@@ -1,6 +1,5 @@
 #define JMP_BUF
 #define NEED_SIG_JMP
-#define NO_UNISTD_H
 #define USES_WINSOCK
 #define NOFILE           100
 #ifndef MAXPATHLEN
index 07fc820df876ea267be2a4c19f31ca6db3856f70..192e47eaa43fa4b639551b97bba519ad57e9963a 100644 (file)
@@ -5,7 +5,7 @@
 #include <unistd.h>
 #include "postgres.h"
 
-#ifdef __CYGWIN32__
+#ifdef HAVE_GETOPT_H
 #include "getopt.h"
 #endif
 
index 62f5ad4f8eb479e0203b88d9f71a465002295226..f9732893b81452d432b3e5436e7567145d1e044c 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-auth.c,v 1.30 1999/07/17 20:18:43 momjian Exp $
+ *       $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-auth.c,v 1.31 1999/07/19 02:27:14 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
  *
  */
 
+#include <unistd.h>
+
+#include "postgres.h"
 #include "libpq-fe.h"
 #include "libpq-int.h"
 #include "fe-auth.h"
-#include "postgres.h"
 
 #ifdef WIN32
 #include "win32.h"
 #ifndef  MAXHOSTNAMELEN
 #include <netdb.h>                             /* for MAXHOSTNAMELEN on some */
 #endif
-#if !defined(NO_UNISTD_H)
-#include <unistd.h>
-#endif
 #include <pwd.h>
-#endif  /* WIN32 */
+#endif
 
 #ifdef HAVE_CRYPT_H
 #include <crypt.h>
index 8f7540d57e6ee2ed4dbaab998b92e5499cbcbd37..be88779e0c30d8599a7a5b53730e3d8e62767738 100644 (file)
@@ -7,28 +7,27 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-connect.c,v 1.99 1999/07/17 20:18:44 momjian Exp $
+ *       $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-connect.c,v 1.100 1999/07/19 02:27:15 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
 
+#include <unistd.h>
+#include <fcntl.h>
+#include <errno.h>
+#include <ctype.h>
+
+#include "postgres.h"
 #include "libpq-fe.h"
 #include "libpq-int.h"
 #include "fe-auth.h"
-#include "postgres.h"
 
 #ifdef WIN32
 #include "win32.h"
 #else
-#if !defined(NO_UNISTD_H)
-#include <unistd.h>
-#endif
 #include <netdb.h>
 #include <netinet/tcp.h>
 #endif
-#include <fcntl.h>
-#include <errno.h>
-#include <ctype.h>                             /* for isspace() */
 
 #ifndef HAVE_STRDUP
 #include "strdup.h"
index 1ca2440c635d1d850bf51f389df36bd97dc04a20..2b6b1b9e26a00eb450b5963e47cf5caa2857609d 100644 (file)
@@ -7,23 +7,21 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-exec.c,v 1.82 1999/07/17 20:18:45 momjian Exp $
+ *       $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-exec.c,v 1.83 1999/07/19 02:27:15 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
+#include <unistd.h>
+#include <errno.h>
+#include <ctype.h>
+
+#include "postgres.h"
 #include "libpq-fe.h"
 #include "libpq-int.h"
-#include "postgres.h"
 
 #ifdef WIN32
 #include "win32.h"
-#else
-#if !defined(NO_UNISTD_H)
-#include <unistd.h>
-#endif
 #endif
-#include <errno.h>
-#include <ctype.h>
 
 
 /* keep this in same order as ExecStatusType in libpq-fe.h */
index b5757a0b9febd0c3c34b96798b14a11b390ecad8..6dbc200e2482d63ec91ca0914867c12d66c3f0d8 100644 (file)
@@ -7,25 +7,23 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-lobj.c,v 1.21 1999/07/17 20:18:46 momjian Exp $
+ *       $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-lobj.c,v 1.22 1999/07/19 02:27:15 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
 
+#include <unistd.h>
+#include <fcntl.h>
+#include <io.h>
+#include <sys/stat.h>
+
+#include "postgres.h"
 #include "libpq-fe.h"
 #include "libpq-int.h"
-#include "postgres.h"
 
 #ifdef WIN32
 #include "win32.h"
-#include <io.h>
-#else
-#if !defined(NO_UNISTD_H)
-#include <unistd.h>
 #endif
-#endif
-#include <fcntl.h>
-#include <sys/stat.h>
 
 #include "libpq/libpq-fs.h"            /* must come after sys/stat.h */
 
index d31ee45647d4120294357f086c1788d7bbaeea09..519bf1fbcf80a020d0d16518a4fc9046e211a877 100644 (file)
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-misc.c,v 1.26 1999/07/17 20:18:46 momjian Exp $
+ *       $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-misc.c,v 1.27 1999/07/19 02:27:15 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
 
-#include "libpq-fe.h"
-#include "libpq-int.h"
+#include <unistd.h>
+#include <sys/time.h>
+#include <errno.h>
+#include <signal.h>
+#include <time.h>
 
 #include "postgres.h"
+#include "libpq-fe.h"
+#include "libpq-int.h"
 #include "pqsignal.h"
 
-#include <errno.h>
-#include <signal.h>
-#include <time.h>
 #ifdef WIN32
 #include "win32.h"
-#else
-#include <sys/time.h>
-#if !defined(NO_UNISTD_H)
-#include <unistd.h>
 #endif
-#endif  /* WIN32 */
 
 #ifdef HAVE_SYS_SELECT_H
 #include <sys/select.h>
index 1b8c73b07fcd6f320bfcaa3e5f789780b7865c28..0d97a3a84db1244b56322e45dcda9edd9b346107 100644 (file)
@@ -9,29 +9,29 @@
  * didn't really belong there.
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-print.c,v 1.24 1999/07/17 20:18:47 momjian Exp $
+ *       $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-print.c,v 1.25 1999/07/19 02:27:16 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
+#include <unistd.h>
+#include <signal.h>
+
+#include "postgres.h"
 #include "libpq-fe.h"
 #include "libpq-int.h"
-#include "postgres.h"
 #include "pqsignal.h"
 
 #ifdef WIN32
 #include "win32.h"
 #else
-#if !defined(NO_UNISTD_H)
-#include <unistd.h>
-#endif
 #include <sys/ioctl.h>
-#ifndef HAVE_TERMIOS_H
-#include <sys/termios.h>
-#else
+#endif
+
+#ifdef HAVE_TERMIOS_H
 #include <termios.h>
+#else
+#include <sys/termios.h>
 #endif
-#endif  /* WIN32 */
-#include <signal.h>
 
 #ifdef MULTIBYTE
 #include "mb/pg_wchar.h"
index d3e9b34815d06dc6b9d8ec9d75b4474d4671f9cc..303fbd91ca643521b28feb06e541d5f09507d4a7 100644 (file)
@@ -5,9 +5,6 @@
  */
 #define strcasecmp(a,b) stricmp(a,b)
 
-
-
-#define NO_UNISTD_H
 #define SOCKET_SIZE_TYPE int
 
 /*