Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 5242fef

Browse files
committed
Be consistent about #define'ing configure symbols as "1" not empty.
This is just neatnik-ism, since all the tests in the code are #ifdefs, but we shouldn't specify symbols as "Define to 1 ..." and then not actually define them that way.
1 parent b231608 commit 5242fef

File tree

4 files changed

+19
-14
lines changed

4 files changed

+19
-14
lines changed

config/c-library.m4

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ res = _timezone / 60;
1818
[pgac_cv_var_int_timezone=yes],
1919
[pgac_cv_var_int_timezone=no])])
2020
if test x"$pgac_cv_var_int_timezone" = xyes ; then
21-
AC_DEFINE(HAVE_INT_TIMEZONE,, [Define to 1 if you have the global variable 'int timezone'.])
21+
AC_DEFINE(HAVE_INT_TIMEZONE, 1,
22+
[Define to 1 if you have the global variable 'int timezone'.])
2223
fi])# PGAC_VAR_INT_TIMEZONE
2324

2425

@@ -68,7 +69,8 @@ gettimeofday(tp,tzp);],
6869
[pgac_cv_func_gettimeofday_1arg=no],
6970
[pgac_cv_func_gettimeofday_1arg=yes])])
7071
if test x"$pgac_cv_func_gettimeofday_1arg" = xyes ; then
71-
AC_DEFINE(GETTIMEOFDAY_1ARG,, [Define to 1 if gettimeofday() takes only 1 argument.])
72+
AC_DEFINE(GETTIMEOFDAY_1ARG, 1,
73+
[Define to 1 if gettimeofday() takes only 1 argument.])
7274
fi
7375
AH_VERBATIM(GETTIMEOFDAY_1ARG_,
7476
[@%:@ifdef GETTIMEOFDAY_1ARG
@@ -95,7 +97,8 @@ getpwuid_r(uid, space, buf, bufsize, result);],
9597
[pgac_cv_func_getpwuid_r_5arg=yes],
9698
[pgac_cv_func_getpwuid_r_5arg=no])])
9799
if test x"$pgac_cv_func_getpwuid_r_5arg" = xyes ; then
98-
AC_DEFINE(GETPWUID_R_5ARG,, [Define to 1 if getpwuid_r() takes a 5th argument.])
100+
AC_DEFINE(GETPWUID_R_5ARG, 1,
101+
[Define to 1 if getpwuid_r() takes a 5th argument.])
99102
fi
100103
])# PGAC_FUNC_GETPWUID_R_5ARG
101104

@@ -117,7 +120,8 @@ int strerror_r();
117120
[pgac_cv_func_strerror_r_int=yes],
118121
[pgac_cv_func_strerror_r_int=no])])
119122
if test x"$pgac_cv_func_strerror_r_int" = xyes ; then
120-
AC_DEFINE(STRERROR_R_INT,, [Define to 1 if strerror_r() returns a int.])
123+
AC_DEFINE(STRERROR_R_INT, 1,
124+
[Define to 1 if strerror_r() returns a int.])
121125
fi
122126
])# PGAC_FUNC_STRERROR_R_INT
123127

@@ -210,7 +214,8 @@ sigaction(0, &act, &oact);],
210214
[pgac_cv_func_posix_signals=yes],
211215
[pgac_cv_func_posix_signals=no])])
212216
if test x"$pgac_cv_func_posix_signals" = xyes ; then
213-
AC_DEFINE(HAVE_POSIX_SIGNALS,, [Define to 1 if you have the POSIX signal interface.])
217+
AC_DEFINE(HAVE_POSIX_SIGNALS, 1,
218+
[Define to 1 if you have the POSIX signal interface.])
214219
fi
215220
HAVE_POSIX_SIGNALS=$pgac_cv_func_posix_signals
216221
AC_SUBST(HAVE_POSIX_SIGNALS)])# PGAC_FUNC_POSIX_SIGNALS

configure

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19492,7 +19492,7 @@ $as_echo "$pgac_cv_var_int_timezone" >&6; }
1949219492
if test x"$pgac_cv_var_int_timezone" = xyes ; then
1949319493

1949419494
cat >>confdefs.h <<\_ACEOF
19495-
#define HAVE_INT_TIMEZONE /**/
19495+
#define HAVE_INT_TIMEZONE 1
1949619496
_ACEOF
1949719497

1949819498
fi
@@ -19660,7 +19660,7 @@ $as_echo "$pgac_cv_func_gettimeofday_1arg" >&6; }
1966019660
if test x"$pgac_cv_func_gettimeofday_1arg" = xyes ; then
1966119661

1966219662
cat >>confdefs.h <<\_ACEOF
19663-
#define GETTIMEOFDAY_1ARG /**/
19663+
#define GETTIMEOFDAY_1ARG 1
1966419664
_ACEOF
1966519665

1966619666
fi
@@ -20676,7 +20676,7 @@ $as_echo "$pgac_cv_var_PS_STRINGS" >&6; }
2067620676
if test "$pgac_cv_var_PS_STRINGS" = yes ; then
2067720677

2067820678
cat >>confdefs.h <<\_ACEOF
20679-
#define HAVE_PS_STRINGS /**/
20679+
#define HAVE_PS_STRINGS 1
2068020680
_ACEOF
2068120681

2068220682
fi
@@ -23937,7 +23937,7 @@ $as_echo "$pgac_cv_func_getpwuid_r_5arg" >&6; }
2393723937
if test x"$pgac_cv_func_getpwuid_r_5arg" = xyes ; then
2393823938

2393923939
cat >>confdefs.h <<\_ACEOF
23940-
#define GETPWUID_R_5ARG /**/
23940+
#define GETPWUID_R_5ARG 1
2394123941
_ACEOF
2394223942

2394323943
fi
@@ -24000,7 +24000,7 @@ $as_echo "$pgac_cv_func_strerror_r_int" >&6; }
2400024000
if test x"$pgac_cv_func_strerror_r_int" = xyes ; then
2400124001

2400224002
cat >>confdefs.h <<\_ACEOF
24003-
#define STRERROR_R_INT /**/
24003+
#define STRERROR_R_INT 1
2400424004
_ACEOF
2400524005

2400624006
fi
@@ -28638,7 +28638,7 @@ $as_echo "$pgac_cv_func_posix_signals" >&6; }
2863828638
if test x"$pgac_cv_func_posix_signals" = xyes ; then
2863928639

2864028640
cat >>confdefs.h <<\_ACEOF
28641-
#define HAVE_POSIX_SIGNALS /**/
28641+
#define HAVE_POSIX_SIGNALS 1
2864228642
_ACEOF
2864328643

2864428644
fi

configure.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1267,7 +1267,7 @@ PS_STRINGS->ps_argvstr = "foo";],
12671267
[pgac_cv_var_PS_STRINGS=yes],
12681268
[pgac_cv_var_PS_STRINGS=no])])
12691269
if test "$pgac_cv_var_PS_STRINGS" = yes ; then
1270-
AC_DEFINE([HAVE_PS_STRINGS], [], [Define to 1 if the PS_STRINGS thing exists.])
1270+
AC_DEFINE([HAVE_PS_STRINGS], 1, [Define to 1 if the PS_STRINGS thing exists.])
12711271
fi
12721272

12731273

src/include/pg_config.h.win32

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@
185185
//#define HAVE_INTTYPES_H 1
186186

187187
/* Define to 1 if you have the global variable 'int timezone'. */
188-
#define HAVE_INT_TIMEZONE
188+
#define HAVE_INT_TIMEZONE 1
189189

190190
/* Define to 1 if you have support for IPv6. */
191191
#define HAVE_IPV6 1
@@ -663,7 +663,7 @@
663663
/* #undef USE_UNNAMED_POSIX_SEMAPHORES */
664664

665665
/* Define to select Win32-style semaphores. */
666-
#define USE_WIN32_SEMAPHORES
666+
#define USE_WIN32_SEMAPHORES 1
667667

668668
/* Number of bits in a file offset, on hosts where this is settable. */
669669
/* #undef _FILE_OFFSET_BITS */

0 commit comments

Comments
 (0)