summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrse <rse>2007-06-14 08:16:01 +0000
committerrse <rse>2007-06-14 08:16:01 +0000
commit0d71bcef95531b71892447e85436201ee33e08e9 (patch)
treed44a87254b5ebc98577b303382d2268ac24ab0e4
parent0c3ca5c34b809685bba4fd6a360912a8aefa9d12 (diff)
downloadlibpopt-0d71bcef95531b71892447e85436201ee33e08e9.tar.gz
fix more incorrect or at least unclean usages of Autoconf HAVE_XXX pre-processor defines
-rw-r--r--popt.c2
-rw-r--r--system.h12
2 files changed, 7 insertions, 7 deletions
diff --git a/popt.c b/popt.c
index b57a3ba..5a48227 100644
--- a/popt.c
+++ b/popt.c
@@ -10,7 +10,7 @@
#include "system.h"
-#if HAVE_FLOAT_H
+#ifdef HAVE_FLOAT_H
#include <float.h>
#endif
#include <math.h>
diff --git a/system.h b/system.h
index 649f8c4..594b383 100644
--- a/system.h
+++ b/system.h
@@ -21,7 +21,7 @@ extern __const __int32_t *__ctype_toupper;
#include <fcntl.h>
#include <limits.h>
-#if HAVE_MCHECK_H
+#ifdef HAVE_MCHECK_H
#include <mcheck.h>
#endif
@@ -29,7 +29,7 @@ extern __const __int32_t *__ctype_toupper;
#include <stdlib.h>
#include <string.h>
-#if HAVE_UNISTD_H
+#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
@@ -50,7 +50,7 @@ void * alloca (size_t __size)
/* AIX requires this to be the first thing in the file. */
#ifndef __GNUC__
-# if HAVE_ALLOCA_H
+# ifdef HAVE_ALLOCA_H
# include <alloca.h>
# else
# ifdef _AIX
@@ -71,14 +71,14 @@ char * xstrdup (const char *str)
/*@*/;
/*@=redecl =redef@*/
-#if HAVE_MCHECK_H && defined(__GNUC__)
+#if defined(HAVE_MCHECK_H) && defined(__GNUC__)
#define vmefail() (fprintf(stderr, "virtual memory exhausted.\n"), exit(EXIT_FAILURE), NULL)
#define xstrdup(_str) (strcpy((malloc(strlen(_str)+1) ? : vmefail()), (_str)))
#else
#define xstrdup(_str) strdup(_str)
-#endif /* HAVE_MCHECK_H && defined(__GNUC__) */
+#endif /* defined(HAVE_MCHECK_H) && defined(__GNUC__) */
-#if HAVE___SECURE_GETENV && !defined(__LCLINT__)
+#if defined(HAVE___SECURE_GETENV) && !defined(__LCLINT__)
#define getenv(_s) __secure_getenv(_s)
#endif