Skip to content

Commit e44c931

Browse files
committed
Re-add getopt.h check, remove NT-specific tests for it.
1 parent 6770281 commit e44c931

File tree

18 files changed

+86
-101
lines changed

18 files changed

+86
-101
lines changed

src/backend/bootstrap/bootstrap.c

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,22 +7,21 @@
77
* Copyright (c) 1994, Regents of the University of California
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/bootstrap/bootstrap.c,v 1.65 1999/07/17 20:16:47 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/bootstrap/bootstrap.c,v 1.66 1999/07/19 02:27:04 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
1414
#include <unistd.h>
1515
#include <time.h>
1616
#include <signal.h>
1717
#include <setjmp.h>
18-
#ifdef __CYGWIN32__
19-
#include <getopt.h>
20-
#endif
2118

2219
#define BOOTSTRAP_INCLUDE /* mask out stuff in tcop/tcopprot.h */
2320

2421
#include "postgres.h"
25-
22+
#ifdef HAVE_GETOPT_H
23+
#include <getopt.h>
24+
#endif
2625

2726
#include "access/genam.h"
2827
#include "access/heapam.h"

src/backend/postmaster/postmaster.c

Lines changed: 15 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
*
1111
*
1212
* IDENTIFICATION
13-
* $Header: /cvsroot/pgsql/src/backend/postmaster/postmaster.c,v 1.114 1999/07/17 20:17:32 momjian Exp $
13+
* $Header: /cvsroot/pgsql/src/backend/postmaster/postmaster.c,v 1.115 1999/07/19 02:27:06 momjian Exp $
1414
*
1515
* NOTES
1616
*
@@ -32,46 +32,40 @@
3232
*
3333
*-------------------------------------------------------------------------
3434
*/
35-
#include "postgres.h"
35+
#include <unistd.h>
36+
#include <signal.h>
37+
#include <time.h>
38+
#include <sys/wait.h>
39+
#include <ctype.h>
40+
#include <sys/types.h>
41+
#include <sys/stat.h>
42+
#include <sys/time.h>
43+
#include <sys/socket.h>
44+
#include <errno.h>
45+
#include <fcntl.h>
3646
#include <sys/param.h>
47+
48+
#include "postgres.h"
3749
/* moved here to prevent double define */
3850
#ifdef HAVE_NETDB_H
3951
#include <netdb.h>
4052
#endif
4153

42-
4354
#ifndef MAXHOSTNAMELEN
4455
#define MAXHOSTNAMELEN 256
4556
#endif
4657

47-
#if !defined(NO_UNISTD_H)
48-
#include <unistd.h>
49-
#endif /* !NO_UNISTD_H */
50-
51-
#include <signal.h>
52-
#include <time.h>
53-
54-
5558
#ifdef HAVE_LIMITS_H
5659
#include <limits.h>
5760
#else
5861
#include <values.h>
5962
#endif
60-
#include <sys/wait.h>
61-
#include <ctype.h>
62-
#include <sys/types.h>
63-
#include <sys/stat.h>
64-
#include <sys/time.h>
65-
#include <sys/socket.h>
66-
67-
#include <errno.h>
68-
#include <fcntl.h>
6963

7064
#ifdef HAVE_SYS_SELECT_H
7165
#include <sys/select.h>
7266
#endif
7367

74-
#ifdef __CYGWIN32__
68+
#ifdef HAVE_GETOPT_H
7569
#include "getopt.h"
7670
#endif
7771

src/backend/tcop/postgres.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.125 1999/07/17 20:17:51 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.126 1999/07/19 02:27:06 momjian Exp $
1111
*
1212
* NOTES
1313
* this is the "main" module of the postgres backend and
@@ -39,7 +39,7 @@
3939
#include <netinet/in.h>
4040
#include <arpa/inet.h>
4141
#include <netdb.h>
42-
#ifdef __CYGWIN32__
42+
#ifdef HAVE_GETOPT_H
4343
#include <getopt.h>
4444
#endif
4545

@@ -1494,7 +1494,7 @@ PostgresMain(int argc, char *argv[], int real_argc, char *real_argv[])
14941494
if (!IsUnderPostmaster)
14951495
{
14961496
puts("\nPOSTGRES backend interactive interface ");
1497-
puts("$Revision: 1.125 $ $Date: 1999/07/17 20:17:51 $\n");
1497+
puts("$Revision: 1.126 $ $Date: 1999/07/19 02:27:06 $\n");
14981498
}
14991499

15001500
/* ----------------

src/backend/utils/mb/common.c

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,15 @@
22
* This file contains some public functions
33
* usable for both the backend and the frontend.
44
* Tatsuo Ishii
5-
* $Id: common.c,v 1.5 1999/05/25 16:12:41 momjian Exp $ */
5+
* $Id: common.c,v 1.6 1999/07/19 02:27:07 momjian Exp $ */
66

77
#include <stdlib.h>
8+
#include <unistd.h>
9+
#include <string.h>
810

911
#ifdef WIN32
1012
#include "win32.h"
11-
#else
12-
#if !defined(NO_UNISTD_H)
13-
#include <unistd.h>
1413
#endif
15-
#endif
16-
17-
#include <string.h>
1814

1915
#include "mb/pg_wchar.h"
2016

src/bin/pg_dump/pg_dump.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
*
2222
*
2323
* IDENTIFICATION
24-
* $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_dump.c,v 1.117 1999/07/17 20:18:18 momjian Exp $
24+
* $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_dump.c,v 1.118 1999/07/19 02:27:08 momjian Exp $
2525
*
2626
* Modifications - 6/10/96 - dave@bensoft.com - version 1.13.dhb
2727
*
@@ -75,7 +75,7 @@
7575
#include <termios.h>
7676
#endif
7777

78-
#ifdef __CYGWIN32__
78+
#ifdef HAVE_GETOPT_H
7979
#include <getopt.h>
8080
#endif
8181

src/bin/pg_id/pg_id.c

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,18 @@
99
*
1010
*
1111
* IDENTIFICATION
12-
* $Header: /cvsroot/pgsql/src/bin/pg_id/Attic/pg_id.c,v 1.8 1999/02/13 23:20:29 momjian Exp $
12+
* $Header: /cvsroot/pgsql/src/bin/pg_id/Attic/pg_id.c,v 1.9 1999/07/19 02:27:09 momjian Exp $
1313
*
1414
*-------------------------------------------------------------------------
1515
*/
16-
#include <sys/types.h>
17-
#include <pwd.h>
1816
#include <stdio.h>
1917
#include <stdlib.h>
2018
#include <unistd.h>
21-
#ifdef __CYGWIN32__
19+
#include <sys/types.h>
20+
#include <pwd.h>
21+
22+
#include "postgres.h"
23+
#ifdef HAVE_GETOPT_H
2224
#include <getopt.h>
2325
#endif
2426

src/bin/psql/psql.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/bin/psql/Attic/psql.c,v 1.183 1999/07/17 20:18:23 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/bin/psql/Attic/psql.c,v 1.184 1999/07/19 02:27:10 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -32,13 +32,16 @@
3232
#include "pqsignal.h"
3333
#include "stringutils.h"
3434
#include "psqlHelp.h"
35+
3536
#ifndef HAVE_STRDUP
3637
#include "strdup.h"
3738
#endif
39+
3840
#ifdef HAVE_TERMIOS_H
3941
#include <termios.h>
4042
#endif
41-
#ifdef __CYGWIN32__
43+
44+
#ifdef HAVE_GETOPT_H
4245
#include <getopt.h>
4346
#endif
4447

src/configure.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -582,6 +582,7 @@ AC_CHECK_HEADERS(dld.h)
582582
AC_CHECK_HEADERS(endian.h)
583583
AC_CHECK_HEADERS(float.h)
584584
AC_CHECK_HEADERS(fp_class.h)
585+
AC_CHECK_HEADERS(getopt.h)
585586
AC_CHECK_HEADERS(history.h)
586587
AC_CHECK_HEADERS(ieeefp.h)
587588
AC_CHECK_HEADERS(limits.h)

src/include/config.h.in

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,9 @@
235235
/* Set to 1 if you have <fp_class.h> */
236236
#undef HAVE_FP_CLASS_H
237237

238+
/* Set to 1 if you have <getopt.h> */
239+
#undef HAVE_GETOPT_H
240+
238241
/* Set to 1 if you have <history.h> */
239242
#undef HAVE_HISTORY_H
240243

src/include/port/win32.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
#define JMP_BUF
22
#define NEED_SIG_JMP
3-
#define NO_UNISTD_H
43
#define USES_WINSOCK
54
#define NOFILE 100
65
#ifndef MAXPATHLEN

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy