Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commite44c931

Browse files
committed
Re-add getopt.h check, remove NT-specific tests for it.
1 parent6770281 commite44c931

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
#defineBOOTSTRAP_INCLUDE/* mask out stuff in tcop/tcopprot.h */
2320

2421
#include"postgres.h"
25-
22+
#ifdefHAVE_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
#ifdefHAVE_NETDB_H
3951
#include<netdb.h>
4052
#endif
4153

42-
4354
#ifndefMAXHOSTNAMELEN
4455
#defineMAXHOSTNAMELEN 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
#ifdefHAVE_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
#ifdefHAVE_SYS_SELECT_H
7165
#include<sys/select.h>
7266
#endif
7367

74-
#ifdef__CYGWIN32__
68+
#ifdefHAVE_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+
#ifdefHAVE_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
#ifdefWIN32
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+
#ifdefHAVE_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+
#ifdefHAVE_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
#ifndefHAVE_STRDUP
3637
#include"strdup.h"
3738
#endif
39+
3840
#ifdefHAVE_TERMIOS_H
3941
#include<termios.h>
4042
#endif
41-
#ifdef__CYGWIN32__
43+
44+
#ifdefHAVE_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
#defineJMP_BUF
22
#defineNEED_SIG_JMP
3-
#defineNO_UNISTD_H
43
#defineUSES_WINSOCK
54
#defineNOFILE 100
65
#ifndefMAXPATHLEN

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp