]> jfr.im git - irc/unrealircd/unrealircd.git/commitdiff
- Fix missing #include <stdint.h>. Fixes compile error on OpenBSD
authorbinki <redacted>
Tue, 21 Dec 2010 04:53:05 +0000 (04:53 +0000)
committerbinki <redacted>
Tue, 21 Dec 2010 04:53:05 +0000 (04:53 +0000)
  reported by CuleX (#3977).

Changes
configure
configure.ac
include/sys.h

diff --git a/Changes b/Changes
index c5f75501650b33d340f42f83ee48427b45dafea9..259c9d6ca01754cf7860b490871a90bd46e24bdc 100644 (file)
--- a/Changes
+++ b/Changes
 - Fixed bug with curl not finding libcares, reported by katslaw.
 - Added workaround for 'curl-config' depending on 'bc'.
 - Fix typo 'alias::spampfilter' in German docs, reported by seraphim (#3978).
+- Fix missing #include <stdint.h>. Fixes compile error on OpenBSD
+  reported by CuleX (#3977).
index 356cc8635d9b9f0b48e1b31d55860a230318698d..a7cf847b43b8e9a6e01cfc199c1af4adf141982b 100755 (executable)
--- a/configure
+++ b/configure
@@ -599,6 +599,8 @@ LIBOBJS
 URL
 CARES_LIBS
 CARES_CFLAGS
+PKG_CONFIG_LIBDIR
+PKG_CONFIG_PATH
 PKG_CONFIG
 TRE_LIBS
 TRE_CFLAGS
@@ -707,6 +709,8 @@ LIBS
 CPPFLAGS
 CPP
 PKG_CONFIG
+PKG_CONFIG_PATH
+PKG_CONFIG_LIBDIR
 TRE_CFLAGS
 TRE_LIBS
 CARES_CFLAGS
@@ -1377,6 +1381,10 @@ Some influential environment variables:
               you have headers in a nonstandard directory <include dir>
   CPP         C preprocessor
   PKG_CONFIG  path to pkg-config utility
+  PKG_CONFIG_PATH
+              directories to add to pkg-config's search path
+  PKG_CONFIG_LIBDIR
+              path overriding pkg-config's built-in search path
   TRE_CFLAGS  C compiler flags for TRE, overriding pkg-config
   TRE_LIBS    linker flags for TRE, overriding pkg-config
   CARES_CFLAGS
@@ -4286,6 +4294,20 @@ $as_echo "#define GLOBH /**/" >>confdefs.h
 fi
 
 
+for ac_header in stdint.h inttypes.h
+do :
+  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
+eval as_val=\$$as_ac_Header
+   if test "x$as_val" = x""yes; then :
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
 $as_echo_n "checking for an ANSI C-conforming const... " >&6; }
 if test "${ac_cv_c_const+set}" = set; then :
@@ -6529,6 +6551,10 @@ export PATH_SEPARATOR
 
 
 
+
+
+
+
 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
        if test -n "$ac_tool_prefix"; then
   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
@@ -6641,7 +6667,6 @@ $as_echo "yes" >&6; }
 $as_echo "no" >&6; }
                PKG_CONFIG=""
        fi
-
 fi
 if test "x$with_system_tre" = "xno"; then :
 
@@ -6686,11 +6711,10 @@ pkg_failed=no
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TRE" >&5
 $as_echo_n "checking for TRE... " >&6; }
 
-if test -n "$PKG_CONFIG"; then
-    if test -n "$TRE_CFLAGS"; then
-        pkg_cv_TRE_CFLAGS="$TRE_CFLAGS"
-    else
-        if test -n "$PKG_CONFIG" && \
+if test -n "$TRE_CFLAGS"; then
+    pkg_cv_TRE_CFLAGS="$TRE_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"tre >= 0.7.5\""; } >&5
   ($PKG_CONFIG --exists --print-errors "tre >= 0.7.5") 2>&5
   ac_status=$?
@@ -6700,15 +6724,13 @@ if test -n "$PKG_CONFIG"; then
 else
   pkg_failed=yes
 fi
-    fi
-else
-       pkg_failed=untried
+ else
+    pkg_failed=untried
 fi
-if test -n "$PKG_CONFIG"; then
-    if test -n "$TRE_LIBS"; then
-        pkg_cv_TRE_LIBS="$TRE_LIBS"
-    else
-        if test -n "$PKG_CONFIG" && \
+if test -n "$TRE_LIBS"; then
+    pkg_cv_TRE_LIBS="$TRE_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"tre >= 0.7.5\""; } >&5
   ($PKG_CONFIG --exists --print-errors "tre >= 0.7.5") 2>&5
   ac_status=$?
@@ -6718,14 +6740,15 @@ if test -n "$PKG_CONFIG"; then
 else
   pkg_failed=yes
 fi
-    fi
-else
-       pkg_failed=untried
+ else
+    pkg_failed=untried
 fi
 
 
 
 if test $pkg_failed = yes; then
+       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 
 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
         _pkg_short_errors_supported=yes
@@ -6733,9 +6756,9 @@ else
         _pkg_short_errors_supported=no
 fi
         if test $_pkg_short_errors_supported = yes; then
-               TRE_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "tre >= 0.7.5"`
+               TRE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "tre >= 0.7.5" 2>&1`
         else
-               TRE_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "tre >= 0.7.5"`
+               TRE_PKG_ERRORS=`$PKG_CONFIG --print-errors "tre >= 0.7.5" 2>&1`
         fi
        # Put the nasty error message in config.log where it belongs
        echo "$TRE_PKG_ERRORS" >&5
@@ -6749,9 +6772,10 @@ installed software in a non-standard prefix.
 
 Alternatively, you may set the environment variables TRE_CFLAGS
 and TRE_LIBS to avoid the need to call pkg-config.
-See the pkg-config man page for more details.
-" "$LINENO" 5
+See the pkg-config man page for more details." "$LINENO" 5
 elif test $pkg_failed = untried; then
+       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
        { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
 as_fn_error "The pkg-config script could not be found or is too old.  Make sure it
@@ -6769,7 +6793,7 @@ else
        TRE_LIBS=$pkg_cv_TRE_LIBS
         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
-       :
+
 fi
 
 fi
@@ -6838,11 +6862,10 @@ pkg_failed=no
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CARES" >&5
 $as_echo_n "checking for CARES... " >&6; }
 
-if test -n "$PKG_CONFIG"; then
-    if test -n "$CARES_CFLAGS"; then
-        pkg_cv_CARES_CFLAGS="$CARES_CFLAGS"
-    else
-        if test -n "$PKG_CONFIG" && \
+if test -n "$CARES_CFLAGS"; then
+    pkg_cv_CARES_CFLAGS="$CARES_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libcares >= 1.6.0\""; } >&5
   ($PKG_CONFIG --exists --print-errors "libcares >= 1.6.0") 2>&5
   ac_status=$?
@@ -6852,15 +6875,13 @@ if test -n "$PKG_CONFIG"; then
 else
   pkg_failed=yes
 fi
-    fi
-else
-       pkg_failed=untried
+ else
+    pkg_failed=untried
 fi
-if test -n "$PKG_CONFIG"; then
-    if test -n "$CARES_LIBS"; then
-        pkg_cv_CARES_LIBS="$CARES_LIBS"
-    else
-        if test -n "$PKG_CONFIG" && \
+if test -n "$CARES_LIBS"; then
+    pkg_cv_CARES_LIBS="$CARES_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libcares >= 1.6.0\""; } >&5
   ($PKG_CONFIG --exists --print-errors "libcares >= 1.6.0") 2>&5
   ac_status=$?
@@ -6870,14 +6891,15 @@ if test -n "$PKG_CONFIG"; then
 else
   pkg_failed=yes
 fi
-    fi
-else
-       pkg_failed=untried
+ else
+    pkg_failed=untried
 fi
 
 
 
 if test $pkg_failed = yes; then
+       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 
 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
         _pkg_short_errors_supported=yes
@@ -6885,9 +6907,9 @@ else
         _pkg_short_errors_supported=no
 fi
         if test $_pkg_short_errors_supported = yes; then
-               CARES_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "libcares >= 1.6.0"`
+               CARES_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libcares >= 1.6.0" 2>&1`
         else
-               CARES_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libcares >= 1.6.0"`
+               CARES_PKG_ERRORS=`$PKG_CONFIG --print-errors "libcares >= 1.6.0" 2>&1`
         fi
        # Put the nasty error message in config.log where it belongs
        echo "$CARES_PKG_ERRORS" >&5
@@ -6901,9 +6923,10 @@ installed software in a non-standard prefix.
 
 Alternatively, you may set the environment variables CARES_CFLAGS
 and CARES_LIBS to avoid the need to call pkg-config.
-See the pkg-config man page for more details.
-" "$LINENO" 5
+See the pkg-config man page for more details." "$LINENO" 5
 elif test $pkg_failed = untried; then
+       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
        { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
 as_fn_error "The pkg-config script could not be found or is too old.  Make sure it
@@ -6921,7 +6944,7 @@ else
        CARES_LIBS=$pkg_cv_CARES_LIBS
         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
-       :
+
 fi
 
 fi
index 7c103ce45f40c9796bdc51d28a2052514efdde31..a92e433a6e02d862fbe9d95b102e6cd68b97a4e0 100644 (file)
@@ -188,6 +188,7 @@ AC_CHECK_HEADER(sys/rusage.h,
        AC_DEFINE([RUSAGEH], [], [Define if you have the <sys/rusage.h> header file.]))
 AC_CHECK_HEADER(glob.h,
        AC_DEFINE([GLOBH], [], [Define if you have the <glob.h> header file.]))
+AC_CHECK_HEADERS([stdint.h inttypes.h])
 dnl Checks for typedefs, structures, and compiler characteristics.
 AC_C_CONST
 AC_C_INLINE
index 2f060a79379ee1117d07e69806ae6f2887e29e8c..2c33c488070439a911ffdb43417c73cb25f9f772 100644 (file)
 # include <string.h>
 # endif
 #endif
+
+/* get intptr_t if the system provides it -- otherwise, ./configure will define it for us */
+#ifdef HAVE_STDINT_H
+#include <stdint.h>
+#else
+#ifdef HAVE_INTTYPES_H
+#include <inttypes.h>
+#endif /* HAVE_INTTYPES_H */
+#endif /* HAVE_STDINT_H */
+
 #ifdef SSL
 #include <openssl/ssl.h>
 #endif