mirror of
https://github.com/postgres/postgres.git
synced 2025-06-29 10:41:53 +03:00
Check for and include <getopt.h>
This commit is contained in:
@ -419,7 +419,7 @@ dnl Checks for header files.
|
|||||||
AC_HEADER_STDC
|
AC_HEADER_STDC
|
||||||
AC_HEADER_SYS_WAIT
|
AC_HEADER_SYS_WAIT
|
||||||
AC_CHECK_HEADERS(limits.h unistd.h termios.h values.h sys/select.h)
|
AC_CHECK_HEADERS(limits.h unistd.h termios.h values.h sys/select.h)
|
||||||
AC_CHECK_HEADERS(sys/resource.h netdb.h arpa/inet.h)
|
AC_CHECK_HEADERS(sys/resource.h netdb.h arpa/inet.h getopt.h)
|
||||||
AC_CHECK_HEADERS(readline.h history.h dld.h crypt.h endian.h float.h)
|
AC_CHECK_HEADERS(readline.h history.h dld.h crypt.h endian.h float.h)
|
||||||
AC_CHECK_HEADERS(readline/history.h ieeefp.h fp_class.h)
|
AC_CHECK_HEADERS(readline/history.h ieeefp.h fp_class.h)
|
||||||
|
|
||||||
|
@ -14,6 +14,9 @@
|
|||||||
* The following is set using configure.
|
* The following is set using configure.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/* Set to 1 if you have <getopt.h> */
|
||||||
|
#undef HAVE_GETOPT_H
|
||||||
|
|
||||||
/* Set to 1 if you have <fp_class.h> */
|
/* Set to 1 if you have <fp_class.h> */
|
||||||
#undef HAVE_FP_CLASS_H
|
#undef HAVE_FP_CLASS_H
|
||||||
|
|
||||||
|
@ -3,7 +3,11 @@
|
|||||||
/* Placed under the same copyright as PostgresSQL */
|
/* Placed under the same copyright as PostgresSQL */
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <getopt.h>
|
#if HAVE_GETOPT_H
|
||||||
|
# include <getopt.h>
|
||||||
|
#else
|
||||||
|
# include <unistd.h>
|
||||||
|
#endif
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <strings.h>
|
#include <strings.h>
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user