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

Commit922ea91

Browse files
committed
Check for and include <getopt.h>
1 parent6ab7e31 commit922ea91

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

‎src/configure.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -419,7 +419,7 @@ dnl Checks for header files.
419419
AC_HEADER_STDC
420420
AC_HEADER_SYS_WAIT
421421
AC_CHECK_HEADERS(limits.h unistd.h termios.h values.h sys/select.h)
422-
AC_CHECK_HEADERS(sys/resource.h netdb.h arpa/inet.h)
422+
AC_CHECK_HEADERS(sys/resource.h netdb.h arpa/inet.h getopt.h)
423423
AC_CHECK_HEADERS(readline.h history.h dld.h crypt.h endian.h float.h)
424424
AC_CHECK_HEADERS(readline/history.h ieeefp.h fp_class.h)
425425

‎src/include/config.h.in

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@
1414
* The following is set using configure.
1515
*/
1616

17+
/* Set to 1 if you have <getopt.h> */
18+
#undef HAVE_GETOPT_H
19+
1720
/* Set to 1 if you have <fp_class.h> */
1821
#undef HAVE_FP_CLASS_H
1922

‎src/interfaces/ecpg/preproc/ecpg.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,11 @@
33
/* Placed under the same copyright as PostgresSQL */
44

55
#include<stdio.h>
6-
#include<getopt.h>
6+
#ifHAVE_GETOPT_H
7+
# include<getopt.h>
8+
#else
9+
# include<unistd.h>
10+
#endif
711
#include<stdlib.h>
812
#include<strings.h>
913

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp