summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGary V. Vaughan <gary@gnu.org>2011-10-25 12:00:58 +0700
committerGary V. Vaughan <gary@gnu.org>2011-11-17 19:22:16 +0700
commit460eb0638aa84cb44734f90531c90354b3c2840d (patch)
treef1057ea620c16767128159c26790c758601af94e
parente628dd85c18f06d0e0c85a9459410341e8502701 (diff)
downloadlibtool-460eb0638aa84cb44734f90531c90354b3c2840d.tar.gz
syntax-check: fix violations and re-enable sc_useless_cpp_parens.
* cfg.mk (local-checks-to-fix): Remove sc_useless_cpp_parens from list of disabled checks. * doc/libtool.texi, libltdl/argz.c, libltdl/argz_.h, build-aux/ltmain.m4sh, libltdl/libltdl/lt__alloc.h, libltdl/libltdl/lt__dirent.h, libltdl/libltdl/lt__glibc.h, libltdl/libltdl/lt__private.h, libltdl/libltdl/lt__strl.h, libltdl/libltdl/lt_dlloader.h, libltdl/libltdl/lt_error.h, libltdl/libltdl/lt_system.h, libltdl/libltdl/slist.h, libltdl/loaders/dld_link.c, libltdl/loaders/dlopen.c, libltdl/loaders/dyld.c, libltdl/loaders/loadlibrary.c, libltdl/loaders/shl_load.c, libltdl/lt__dirent.c, libltdl/lt__strl.c, libltdl/ltdl.c, libltdl/ltdl.h, libltdl/m4/libtool.m4, tests/demo/foo.h, tests/depdemo/sysdep.h, tests/exceptions.at, tests/export.at, tests/pdemo/foo.h, tests/stresstest.at: Remove useless parens in cpp `#if defined(foo)' statements. Signed-off-by: Gary V. Vaughan <gary@gnu.org>
-rw-r--r--build-aux/ltmain.m4sh36
-rw-r--r--cfg.mk3
-rw-r--r--doc/libtool.texi6
-rw-r--r--libltdl/argz.c2
-rw-r--r--libltdl/argz_.h12
-rw-r--r--libltdl/libltdl/lt__alloc.h4
-rw-r--r--libltdl/libltdl/lt__dirent.h10
-rw-r--r--libltdl/libltdl/lt__glibc.h8
-rw-r--r--libltdl/libltdl/lt__private.h16
-rw-r--r--libltdl/libltdl/lt__strl.h14
-rw-r--r--libltdl/libltdl/lt_dlloader.h4
-rw-r--r--libltdl/libltdl/lt_error.h4
-rw-r--r--libltdl/libltdl/lt_system.h46
-rw-r--r--libltdl/libltdl/slist.h12
-rw-r--r--libltdl/loaders/dld_link.c2
-rw-r--r--libltdl/loaders/dlopen.c30
-rw-r--r--libltdl/loaders/dyld.c32
-rw-r--r--libltdl/loaders/loadlibrary.c4
-rw-r--r--libltdl/loaders/shl_load.c6
-rw-r--r--libltdl/lt__dirent.c4
-rw-r--r--libltdl/lt__strl.c8
-rw-r--r--libltdl/ltdl.c44
-rw-r--r--libltdl/ltdl.h4
-rw-r--r--m4/libtool.m46
-rw-r--r--tests/demo/foo.h6
-rw-r--r--tests/depdemo/sysdep.h2
-rw-r--r--tests/exceptions.at18
-rw-r--r--tests/export.at10
-rw-r--r--tests/pdemo/foo.h6
-rw-r--r--tests/stresstest.at20
30 files changed, 189 insertions, 190 deletions
diff --git a/build-aux/ltmain.m4sh b/build-aux/ltmain.m4sh
index bfaefe38..5e8fb252 100644
--- a/build-aux/ltmain.m4sh
+++ b/build-aux/ltmain.m4sh
@@ -2511,16 +2511,16 @@ func_generate_dlsyms ()
extern \"C\" {
#endif
-#if defined(__GNUC__) && (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4)) || (__GNUC__ > 4))
+#if defined __GNUC__ && (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4)) || (__GNUC__ > 4))
#pragma GCC diagnostic ignored \"-Wstrict-prototypes\"
#endif
/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */
-#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)
+#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE
/* DATA imports from DLLs on WIN32 con't be const, because runtime
relocations are performed -- see ld's documentation on pseudo-relocs. */
# define LT_DLSYM_CONST
-#elif defined(__osf__)
+#elif defined __osf__
/* This system does not cope well with relocations in const data. */
# define LT_DLSYM_CONST
#else
@@ -3427,21 +3427,21 @@ EOF
#define STREQ(s1, s2) (strcmp ((s1), (s2)) == 0)
/* declarations of non-ANSI functions */
-#if defined(__MINGW32__)
+#if defined __MINGW32__
# ifdef __STRICT_ANSI__
int _putenv (const char *);
# endif
-#elif defined(__CYGWIN__)
+#elif defined __CYGWIN__
# ifdef __STRICT_ANSI__
char *realpath (const char *, char *);
int putenv (char *);
int setenv (const char *, const char *, int);
# endif
-/* #elif defined (other platforms) ... */
+/* #elif defined other_platform || defined ... */
#endif
/* portability defines, excluding path handling macros */
-#if defined(_MSC_VER)
+#if defined _MSC_VER
# define setmode _setmode
# define stat _stat
# define chmod _chmod
@@ -3452,21 +3452,21 @@ int setenv (const char *, const char *, int);
# define _INTPTR_T_DEFINED
# define intptr_t int
# endif
-#elif defined(__MINGW32__)
+#elif defined __MINGW32__
# define setmode _setmode
# define stat _stat
# define chmod _chmod
# define getcwd _getcwd
# define putenv _putenv
-#elif defined(__CYGWIN__)
+#elif defined __CYGWIN__
# define HAVE_SETENV
# define FOPEN_WB "wb"
-/* #elif defined (other platforms) ... */
+/* #elif defined other platforms ... */
#endif
-#if defined(PATH_MAX)
+#if defined PATH_MAX
# define LT_PATHMAX PATH_MAX
-#elif defined(MAXPATHLEN)
+#elif defined MAXPATHLEN
# define LT_PATHMAX MAXPATHLEN
#else
# define LT_PATHMAX 1024
@@ -3485,8 +3485,8 @@ int setenv (const char *, const char *, int);
# define PATH_SEPARATOR ':'
#endif
-#if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \
- defined (__OS2__)
+#if defined _WIN32 || defined __MSDOS__ || defined __DJGPP__ || \
+ defined __OS2__
# define HAVE_DOS_BASED_FILE_SYSTEM
# define FOPEN_WB "wb"
# ifndef DIR_SEPARATOR_2
@@ -3522,7 +3522,7 @@ int setenv (const char *, const char *, int);
if (stale) { free (stale); stale = 0; } \
} while (0)
-#if defined(LT_DEBUGWRAPPER)
+#if defined LT_DEBUGWRAPPER
static int lt_debug = 1;
#else
static int lt_debug = 0;
@@ -3820,7 +3820,7 @@ base_name (const char *name)
{
const char *base;
-#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
+#if defined HAVE_DOS_BASED_FILE_SYSTEM
/* Skip over the disk name in MSDOS pathnames. */
if (isalpha ((unsigned char) name[0]) && name[1] == ':')
name += 2;
@@ -3889,7 +3889,7 @@ find_executable (const char *wrapper)
return NULL;
/* Absolute path? */
-#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
+#if defined HAVE_DOS_BASED_FILE_SYSTEM
if (isalpha ((unsigned char) wrapper[0]) && wrapper[1] == ':')
{
concat_name = xstrdup (wrapper);
@@ -3907,7 +3907,7 @@ find_executable (const char *wrapper)
return concat_name;
XFREE (concat_name);
}
-#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
+#if defined HAVE_DOS_BASED_FILE_SYSTEM
}
#endif
diff --git a/cfg.mk b/cfg.mk
index 6ae49548..726f7513 100644
--- a/cfg.mk
+++ b/cfg.mk
@@ -42,8 +42,7 @@ local-checks-to-fix = \
sc_prohibit_always_true_header_tests \
sc_require_config_h \
sc_require_config_h_first \
- sc_trailing_blank \
- sc_useless_cpp_parens
+ sc_trailing_blank
local-checks-to-skip = \
$(local-checks-to-fix) \
diff --git a/doc/libtool.texi b/doc/libtool.texi
index 8955a093..cdb0cd74 100644
--- a/doc/libtool.texi
+++ b/doc/libtool.texi
@@ -3221,9 +3221,9 @@ Here are the relevant portions of that file:
compilers that don't understand ANSI C prototypes still work,
and ANSI C compilers can issue warnings about type mismatches. */
#undef PARAMS
-#if defined (__STDC__) || defined (_AIX) \
- || (defined (__mips) && defined (_SYSTYPE_SVR4)) \
- || defined(WIN32) || defined(__cplusplus)
+#if defined __STDC__ || defined _AIX \
+ || (defined __mips && defined _SYSTYPE_SVR4) \
+ || defined WIN32 || defined __cplusplus
# define PARAMS(protos) protos
#else
# define PARAMS(protos) ()
diff --git a/libltdl/argz.c b/libltdl/argz.c
index 04431fe1..c30276b2 100644
--- a/libltdl/argz.c
+++ b/libltdl/argz.c
@@ -28,7 +28,7 @@ or obtained by writing to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-#if defined(LTDL) && defined LT_CONFIG_H
+#if defined LTDL && defined LT_CONFIG_H
# include LT_CONFIG_H
#else
# include <config.h>
diff --git a/libltdl/argz_.h b/libltdl/argz_.h
index 05575753..25d3e561 100644
--- a/libltdl/argz_.h
+++ b/libltdl/argz_.h
@@ -28,7 +28,7 @@ or obtained by writing to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#if !defined(LT__ARGZ_H)
+#if !defined LT__ARGZ_H
#define LT__ARGZ_H 1
#include <stdlib.h>
@@ -36,14 +36,14 @@ or obtained by writing to the Free Software Foundation, Inc.,
#include <errno.h>
#include <sys/types.h>
-#if defined(LTDL)
+#if defined LTDL
# include "lt__glibc.h"
# include "lt_system.h"
#else
# define LT_SCOPE
#endif
-#if defined(__cplusplus)
+#if defined __cplusplus
extern "C" {
#endif
@@ -57,12 +57,12 @@ LT_SCOPE char * argz_next (char *argz, size_t argz_len,
const char *entry);
LT_SCOPE void argz_stringify (char *argz, size_t argz_len, int sep);
-#if defined(__cplusplus)
+#if defined __cplusplus
}
#endif
-#if !defined(LTDL)
+#if !defined LTDL
# undef LT_SCOPE
#endif
-#endif /*!defined(LT__ARGZ_H)*/
+#endif /*!defined LT__ARGZ_H*/
diff --git a/libltdl/libltdl/lt__alloc.h b/libltdl/libltdl/lt__alloc.h
index a1d7b377..23807c8b 100644
--- a/libltdl/libltdl/lt__alloc.h
+++ b/libltdl/libltdl/lt__alloc.h
@@ -28,7 +28,7 @@ or obtained by writing to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#if !defined(LT__ALLOC_H)
+#if !defined LT__ALLOC_H
#define LT__ALLOC_H 1
#include "lt_system.h"
@@ -55,4 +55,4 @@ LT_SCOPE char *lt__strdup (const char *string);
LT_END_C_DECLS
-#endif /*!defined(LT__ALLOC_H)*/
+#endif /*!defined LT__ALLOC_H*/
diff --git a/libltdl/libltdl/lt__dirent.h b/libltdl/libltdl/lt__dirent.h
index 4f24f82a..b4554226 100644
--- a/libltdl/libltdl/lt__dirent.h
+++ b/libltdl/libltdl/lt__dirent.h
@@ -28,10 +28,10 @@ or obtained by writing to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#if !defined(LT__DIRENT_H)
+#if !defined LT__DIRENT_H
#define LT__DIRENT_H 1
-#if defined(LT_CONFIG_H)
+#if defined LT_CONFIG_H
# include LT_CONFIG_H
#else
# include <config.h>
@@ -80,8 +80,8 @@ LT_SCOPE void closedir (DIR *entry);
LT_END_C_DECLS
-#else /* !defined(__WINDOWS__)*/
+#else /* !defined __WINDOWS__*/
ERROR - cannot find dirent
-#endif /*!defined(__WINDOWS__)*/
+#endif /*!defined __WINDOWS__*/
-#endif /*!defined(LT__DIRENT_H)*/
+#endif /*!defined LT__DIRENT_H*/
diff --git a/libltdl/libltdl/lt__glibc.h b/libltdl/libltdl/lt__glibc.h
index f284773d..a8f0bc32 100644
--- a/libltdl/libltdl/lt__glibc.h
+++ b/libltdl/libltdl/lt__glibc.h
@@ -28,16 +28,16 @@ or obtained by writing to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#if !defined(LT__GLIBC_H)
+#if !defined LT__GLIBC_H
#define LT__GLIBC_H 1
-#if defined(LT_CONFIG_H)
+#if defined LT_CONFIG_H
# include LT_CONFIG_H
#else
# include <config.h>
#endif
-#if !defined(HAVE_ARGZ_H) || !defined(HAVE_WORKING_ARGZ)
+#if !defined HAVE_ARGZ_H || !defined HAVE_WORKING_ARGZ
/* Redefine any glibc symbols we reimplement to import the
implementations into our lt__ namespace so we don't ever
clash with the system library if our clients use argz_*
@@ -80,4 +80,4 @@ extern "C" {
#include <slist.h>
-#endif /*!defined(LT__GLIBC_H)*/
+#endif /*!defined LT__GLIBC_H*/
diff --git a/libltdl/libltdl/lt__private.h b/libltdl/libltdl/lt__private.h
index 3b2609bc..5fb489e6 100644
--- a/libltdl/libltdl/lt__private.h
+++ b/libltdl/libltdl/lt__private.h
@@ -28,10 +28,10 @@ or obtained by writing to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#if !defined(LT__PRIVATE_H)
+#if !defined LT__PRIVATE_H
#define LT__PRIVATE_H 1
-#if defined(LT_CONFIG_H)
+#if defined LT_CONFIG_H
# include LT_CONFIG_H
#else
# include <config.h>
@@ -43,7 +43,7 @@ or obtained by writing to the Free Software Foundation, Inc.,
#include <errno.h>
#include <string.h>
-#if defined(HAVE_UNISTD_H)
+#if defined HAVE_UNISTD_H
# include <unistd.h>
#endif
@@ -56,15 +56,15 @@ or obtained by writing to the Free Software Foundation, Inc.,
/* ...and all exported interfaces. */
#include "ltdl.h"
-#if defined(WITH_DMALLOC)
+#if defined WITH_DMALLOC
# include <dmalloc.h>
#endif
/* DLL building support on win32 hosts; mostly to workaround their
ridiculous implementation of data symbol exporting. */
#ifndef LT_GLOBAL_DATA
-# if defined(__WINDOWS__) || defined(__CYGWIN__)
-# if defined(DLL_EXPORT) /* defined by libtool (if required) */
+# if defined __WINDOWS__ || defined __CYGWIN__
+# if defined DLL_EXPORT /* defined by libtool (if required) */
# define LT_GLOBAL_DATA __declspec(dllexport)
# endif
# endif
@@ -86,7 +86,7 @@ or obtained by writing to the Free Software Foundation, Inc.,
LT_BEGIN_C_DECLS
-#if !defined(errno)
+#if !defined errno
extern int errno;
#endif
@@ -146,4 +146,4 @@ LT_SCOPE const char *lt__set_last_error (const char *errormsg);
LT_END_C_DECLS
-#endif /*!defined(LT__PRIVATE_H)*/
+#endif /*!defined LT__PRIVATE_H*/
diff --git a/libltdl/libltdl/lt__strl.h b/libltdl/libltdl/lt__strl.h
index 5799dc8a..915a688c 100644
--- a/libltdl/libltdl/lt__strl.h
+++ b/libltdl/libltdl/lt__strl.h
@@ -28,10 +28,10 @@ or obtained by writing to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-#if !defined(LT__STRL_H)
+#if !defined LT__STRL_H
#define LT__STRL_H 1
-#if defined(LT_CONFIG_H)
+#if defined LT_CONFIG_H
# include LT_CONFIG_H
#else
# include <config.h>
@@ -40,14 +40,14 @@ or obtained by writing to the Free Software Foundation, Inc.,
#include <string.h>
#include "lt_system.h"
-#if !defined(HAVE_STRLCAT)
+#if !defined HAVE_STRLCAT
# define strlcat(dst,src,dstsize) lt_strlcat(dst,src,dstsize)
LT_SCOPE size_t lt_strlcat(char *dst, const char *src, const size_t dstsize);
-#endif /* !defined(HAVE_STRLCAT) */
+#endif /* !defined HAVE_STRLCAT */
-#if !defined(HAVE_STRLCPY)
+#if !defined HAVE_STRLCPY
# define strlcpy(dst,src,dstsize) lt_strlcpy(dst,src,dstsize)
LT_SCOPE size_t lt_strlcpy(char *dst, const char *src, const size_t dstsize);
-#endif /* !defined(HAVE_STRLCPY) */
+#endif /* !defined HAVE_STRLCPY */
-#endif /*!defined(LT__STRL_H)*/
+#endif /*!defined LT__STRL_H*/
diff --git a/libltdl/libltdl/lt_dlloader.h b/libltdl/libltdl/lt_dlloader.h
index 589fd0dc..ed9b4893 100644
--- a/libltdl/libltdl/lt_dlloader.h
+++ b/libltdl/libltdl/lt_dlloader.h
@@ -28,7 +28,7 @@ or obtained by writing to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-#if !defined(LT_DLLOADER_H)
+#if !defined LT_DLLOADER_H
#define LT_DLLOADER_H 1
#include <libltdl/lt_system.h>
@@ -87,4 +87,4 @@ LT_SCOPE void lt_dlloader_dump (void);
LT_END_C_DECLS
-#endif /*!defined(LT_DLLOADER_H)*/
+#endif /*!defined LT_DLLOADER_H*/
diff --git a/libltdl/libltdl/lt_error.h b/libltdl/libltdl/lt_error.h
index e789b3a4..5c2dab2c 100644
--- a/libltdl/libltdl/lt_error.h
+++ b/libltdl/libltdl/lt_error.h
@@ -29,7 +29,7 @@ or obtained by writing to the Free Software Foundation, Inc.,
*/
/* Only include this header file once. */
-#if !defined(LT_ERROR_H)
+#if !defined LT_ERROR_H
#define LT_ERROR_H 1
#include <libltdl/lt_system.h>
@@ -82,4 +82,4 @@ LT_SCOPE int lt_dlseterror (int errorcode);
LT_END_C_DECLS
-#endif /*!defined(LT_ERROR_H)*/
+#endif /*!defined LT_ERROR_H*/
diff --git a/libltdl/libltdl/lt_system.h b/libltdl/libltdl/lt_system.h
index f1545ce3..2d65eb59 100644
--- a/libltdl/libltdl/lt_system.h
+++ b/libltdl/libltdl/lt_system.h
@@ -28,7 +28,7 @@ or obtained by writing to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-#if !defined(LT_SYSTEM_H)
+#if !defined LT_SYSTEM_H
#define LT_SYSTEM_H 1
#include <stddef.h>
@@ -36,10 +36,10 @@ or obtained by writing to the Free Software Foundation, Inc.,
#include <sys/types.h>
/* Some systems do not define EXIT_*, even with STDC_HEADERS. */
-#if !defined(EXIT_SUCCESS)
+#if !defined EXIT_SUCCESS
# define EXIT_SUCCESS 0
#endif
-#if !defined(EXIT_FAILURE)
+#if !defined EXIT_FAILURE
# define EXIT_FAILURE 1
#endif
@@ -53,7 +53,7 @@ or obtained by writing to the Free Software Foundation, Inc.,
/* LTDL_BEGIN_C_DECLS should be used at the beginning of your declarations,
so that C++ compilers don't mangle their names. Use LTDL_END_C_DECLS at
the end of C declarations. */
-#if defined(__cplusplus)
+#if defined __cplusplus
# define LT_BEGIN_C_DECLS extern "C" {
# define LT_END_C_DECLS }
#else
@@ -63,11 +63,11 @@ or obtained by writing to the Free Software Foundation, Inc.,
/* LT_STMT_START/END are used to create macros which expand to a
a single compound statement in a portable way. */
-#if defined (__GNUC__) && !defined (__STRICT_ANSI__) && !defined (__cplusplus)
+#if defined __GNUC__ && !defined __STRICT_ANSI__ && !defined __cplusplus
# define LT_STMT_START (void)(
# define LT_STMT_END )
#else
-# if (defined (sun) || defined (__sun__))
+# if (defined sun || defined __sun__)
# define LT_STMT_START if (1)
# define LT_STMT_END else (void)0
# else
@@ -77,11 +77,11 @@ or obtained by writing to the Free Software Foundation, Inc.,
#endif
/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */
-#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)
+#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE
/* DATA imports from DLLs on WIN32 con't be const, because runtime
relocations are performed -- see ld's documentation on pseudo-relocs. */
# define LT_DLSYM_CONST
-#elif defined(__osf__)
+#elif defined __osf__
/* This system does not cope well with relocations in const data. */
# define LT_DLSYM_CONST
#else
@@ -91,41 +91,41 @@ or obtained by writing to the Free Software Foundation, Inc.,
/* Canonicalise Windows and Cygwin recognition macros.
To match the values set by recent Cygwin compilers, make sure that if
__CYGWIN__ is defined (after canonicalisation), __WINDOWS__ is NOT! */
-#if defined(__CYGWIN32__) && !defined(__CYGWIN__)
+#if defined __CYGWIN32__ && !defined __CYGWIN__
# define __CYGWIN__ __CYGWIN32__
#endif
-#if defined(__CYGWIN__)
-# if defined(__WINDOWS__)
+#if defined __CYGWIN__
+# if defined __WINDOWS__
# undef __WINDOWS__
# endif
-#elif defined(_WIN32)
+#elif defined _WIN32
# define __WINDOWS__ _WIN32
-#elif defined(WIN32)
+#elif defined WIN32
# define __WINDOWS__ WIN32
#endif
-#if defined(__CYGWIN__) && defined(__WINDOWS__)
+#if defined __CYGWIN__ && defined __WINDOWS__
# undef __WINDOWS__
#endif
/* DLL building support on win32 hosts; mostly to workaround their
ridiculous implementation of data symbol exporting. */
-#if !defined(LT_SCOPE)
-# if defined(__WINDOWS__) || defined(__CYGWIN__)
-# if defined(DLL_EXPORT) /* defined by libtool (if required) */
+#if !defined LT_SCOPE
+# if defined __WINDOWS__ || defined __CYGWIN__
+# if defined DLL_EXPORT /* defined by libtool (if required) */
# define LT_SCOPE extern __declspec(dllexport)
# endif
-# if defined(LIBLTDL_DLL_IMPORT) /* define if linking with this dll */
+# if defined LIBLTDL_DLL_IMPORT /* define if linking with this dll */
/* note: cygwin/mingw compilers can rely instead on auto-import */
# define LT_SCOPE extern __declspec(dllimport)
# endif
# endif
-# if !defined(LT_SCOPE) /* static linking or !__WINDOWS__ */
+# if !defined LT_SCOPE /* static linking or !__WINDOWS__ */
# define LT_SCOPE extern
# endif
#endif
-#if defined(__WINDOWS__)
+#if defined __WINDOWS__
/* LT_DIRSEP_CHAR is accepted *in addition* to '/' as a directory
separator when it is set. */
# define LT_DIRSEP_CHAR '\\'
@@ -134,13 +134,13 @@ or obtained by writing to the Free Software Foundation, Inc.,
# define LT_PATHSEP_CHAR ':'
#endif
-#if defined(_MSC_VER) /* Visual Studio */
+#if defined _MSC_VER /* Visual Studio */
# define R_OK 4
#endif
/* fopen() mode flags for reading a text file */
#undef LT_READTEXT_MODE
-#if defined(__WINDOWS__) || defined(__CYGWIN__)
+#if defined __WINDOWS__ || defined __CYGWIN__
# define LT_READTEXT_MODE "rt"
#else
# define LT_READTEXT_MODE "r"
@@ -163,4 +163,4 @@ or obtained by writing to the Free Software Foundation, Inc.,
# define LT_CONC3(a, b, c) LT__CONC3(a, b, c)
#endif
-#endif /*!defined(LT_SYSTEM_H)*/
+#endif /*!defined LT_SYSTEM_H*/
diff --git a/libltdl/libltdl/slist.h b/libltdl/libltdl/slist.h
index 4d565099..0cd7f0c4 100644
--- a/libltdl/libltdl/slist.h
+++ b/libltdl/libltdl/slist.h
@@ -38,10 +38,10 @@ or obtained by writing to the Free Software Foundation, Inc.,
get to manage the memory involved by yourself.
*/
-#if !defined(SLIST_H)
+#if !defined SLIST_H
#define SLIST_H 1
-#if defined(LTDL)
+#if defined LTDL
# include <libltdl/lt__glibc.h>
# include <libltdl/lt_system.h>
#else
@@ -50,7 +50,7 @@ or obtained by writing to the Free Software Foundation, Inc.,
#include <stddef.h>
-#if defined(__cplusplus)
+#if defined __cplusplus
extern "C" {
#endif
@@ -85,12 +85,12 @@ LT_SCOPE void * slist_foreach (SList *slist, SListCallback *foreach,
LT_SCOPE SList *slist_box (const void *userdata);
LT_SCOPE void * slist_unbox (SList *item);
-#if defined(__cplusplus)
+#if defined __cplusplus
}
#endif
-#if !defined(LTDL)
+#if !defined LTDL
# undef LT_SCOPE
#endif
-#endif /*!defined(SLIST_H)*/
+#endif /*!defined SLIST_H*/
diff --git a/libltdl/loaders/dld_link.c b/libltdl/loaders/dld_link.c
index 7e882c9e..97aad1eb 100644
--- a/libltdl/loaders/dld_link.c
+++ b/libltdl/loaders/dld_link.c
@@ -90,7 +90,7 @@ get_vtable (lt_user_data loader_data)
/* --- IMPLEMENTATION --- */
-#if defined(HAVE_DLD_H)
+#if defined HAVE_DLD_H
# include <dld.h>
#endif
diff --git a/libltdl/loaders/dlopen.c b/libltdl/loaders/dlopen.c
index 1d052b4f..2866e626 100644
--- a/libltdl/loaders/dlopen.c
+++ b/libltdl/loaders/dlopen.c
@@ -68,7 +68,7 @@ get_vtable (lt_user_data loader_data)
if (vtable && !vtable->name)
{
vtable->name = "lt_dlopen";
-#if defined(DLSYM_USCORE)
+#if defined DLSYM_USCORE
vtable->sym_prefix = "_";
#endif
vtable->module_open = vm_open;
@@ -93,53 +93,53 @@ get_vtable (lt_user_data loader_data)
/* --- IMPLEMENTATION --- */
-#if defined(HAVE_DLFCN_H)
+#if defined HAVE_DLFCN_H
# include <dlfcn.h>
#endif
-#if defined(HAVE_SYS_DL_H)
+#if defined HAVE_SYS_DL_H
# include <sys/dl.h>
#endif
/* We may have to define LT_LAZY_OR_NOW in the command line if we
find out it does not work in some platform. */
-#if !defined(LT_LAZY_OR_NOW)
-# if defined(RTLD_LAZY)
+#if !defined LT_LAZY_OR_NOW
+# if defined RTLD_LAZY
# define LT_LAZY_OR_NOW RTLD_LAZY
# else
-# if defined(DL_LAZY)
+# if defined DL_LAZY
# define LT_LAZY_OR_NOW DL_LAZY
# endif
# endif /* !RTLD_LAZY */
#endif
-#if !defined(LT_LAZY_OR_NOW)
-# if defined(RTLD_NOW)
+#if !defined LT_LAZY_OR_NOW
+# if defined RTLD_NOW
# define LT_LAZY_OR_NOW RTLD_NOW
# else
-# if defined(DL_NOW)
+# if defined DL_NOW
# define LT_LAZY_OR_NOW DL_NOW
# endif
# endif /* !RTLD_NOW */
#endif
-#if !defined(LT_LAZY_OR_NOW)
+#if !defined LT_LAZY_OR_NOW
# define LT_LAZY_OR_NOW 0
#endif /* !LT_LAZY_OR_NOW */
/* We only support local and global symbols from modules for loaders
that provide such a thing, otherwise the system default is used. */
-#if !defined(RTLD_GLOBAL)
-# if defined(DL_GLOBAL)
+#if !defined RTLD_GLOBAL
+# if defined DL_GLOBAL
# define RTLD_GLOBAL DL_GLOBAL
# endif
#endif /* !RTLD_GLOBAL */
-#if !defined(RTLD_LOCAL)
-# if defined(DL_LOCAL)
+#if !defined RTLD_LOCAL
+# if defined DL_LOCAL
# define RTLD_LOCAL DL_LOCAL
# endif
#endif /* !RTLD_LOCAL */
-#if defined(HAVE_DLERROR)
+#if defined HAVE_DLERROR
# define DLERROR(arg) dlerror ()
#else
# define DLERROR(arg) LT__STRERROR (arg)
diff --git a/libltdl/loaders/dyld.c b/libltdl/loaders/dyld.c
index 4f7a4338..ee60cfea 100644
--- a/libltdl/loaders/dyld.c
+++ b/libltdl/loaders/dyld.c
@@ -93,8 +93,8 @@ get_vtable (lt_user_data loader_data)
/* --- IMPLEMENTATION --- */
-#if defined(HAVE_MACH_O_DYLD_H)
-# if !defined(__APPLE_CC__) && !defined(__MWERKS__) && !defined(__private_extern__)
+#if defined HAVE_MACH_O_DYLD_H
+# if !defined __APPLE_CC__ && !defined __MWERKS__ && !defined __private_extern__
/* Is this correct? Does it still function properly? */
# define __private_extern__ extern
# endif
@@ -104,7 +104,7 @@ get_vtable (lt_user_data loader_data)
#include <mach-o/getsect.h>
/* We have to put some stuff here that isn't in older dyld.h files */
-#if !defined(ENUM_DYLD_BOOL)
+#if !defined ENUM_DYLD_BOOL
# define ENUM_DYLD_BOOL
# undef FALSE
# undef TRUE
@@ -113,46 +113,46 @@ get_vtable (lt_user_data loader_data)
TRUE
};
#endif
-#if !defined(LC_REQ_DYLD)
+#if !defined LC_REQ_DYLD
# define LC_REQ_DYLD 0x80000000
#endif
-#if !defined(LC_LOAD_WEAK_DYLIB)
+#if !defined LC_LOAD_WEAK_DYLIB
# define LC_LOAD_WEAK_DYLIB (0x18 | LC_REQ_DYLD)
#endif
-#if !defined(NSADDIMAGE_OPTION_NONE)
+#if !defined NSADDIMAGE_OPTION_NONE
# define NSADDIMAGE_OPTION_NONE 0x0
#endif
-#if !defined(NSADDIMAGE_OPTION_RETURN_ON_ERROR)
+#if !defined NSADDIMAGE_OPTION_RETURN_ON_ERROR
# define NSADDIMAGE_OPTION_RETURN_ON_ERROR 0x1
#endif
-#if !defined(NSADDIMAGE_OPTION_WITH_SEARCHING)
+#if !defined NSADDIMAGE_OPTION_WITH_SEARCHING
# define NSADDIMAGE_OPTION_WITH_SEARCHING 0x2
#endif
-#if !defined(NSADDIMAGE_OPTION_RETURN_ONLY_IF_LOADED)
+#if !defined NSADDIMAGE_OPTION_RETURN_ONLY_IF_LOADED
# define NSADDIMAGE_OPTION_RETURN_ONLY_IF_LOADED 0x4
#endif
-#if !defined(NSADDIMAGE_OPTION_MATCH_FILENAME_BY_INSTALLNAME)
+#if !defined NSADDIMAGE_OPTION_MATCH_FILENAME_BY_INSTALLNAME
# define NSADDIMAGE_OPTION_MATCH_FILENAME_BY_INSTALLNAME 0x8
#endif
-#if !defined(NSLOOKUPSYMBOLINIMAGE_OPTION_BIND)
+#if !defined NSLOOKUPSYMBOLINIMAGE_OPTION_BIND
# define NSLOOKUPSYMBOLINIMAGE_OPTION_BIND 0x0
#endif
-#if !defined(NSLOOKUPSYMBOLINIMAGE_OPTION_BIND_NOW)
+#if !defined NSLOOKUPSYMBOLINIMAGE_OPTION_BIND_NOW
# define NSLOOKUPSYMBOLINIMAGE_OPTION_BIND_NOW 0x1
#endif
-#if !defined(NSLOOKUPSYMBOLINIMAGE_OPTION_BIND_FULLY)
+#if !defined NSLOOKUPSYMBOLINIMAGE_OPTION_BIND_FULLY
# define NSLOOKUPSYMBOLINIMAGE_OPTION_BIND_FULLY 0x2
#endif
-#if !defined(NSLOOKUPSYMBOLINIMAGE_OPTION_RETURN_ON_ERROR)
+#if !defined NSLOOKUPSYMBOLINIMAGE_OPTION_RETURN_ON_ERROR
# define NSLOOKUPSYMBOLINIMAGE_OPTION_RETURN_ON_ERROR 0x4
#endif
#define LT__SYMLOOKUP_OPTS (NSLOOKUPSYMBOLINIMAGE_OPTION_BIND_NOW \
| NSLOOKUPSYMBOLINIMAGE_OPTION_RETURN_ON_ERROR)
-#if defined(__BIG_ENDIAN__)
+#if defined __BIG_ENDIAN__
# define LT__MAGIC MH_MAGIC
#else
# define LT__MAGIC MH_CIGAM
@@ -302,7 +302,7 @@ vm_close (lt_user_data loader_data, lt_module module)
{
flags |= NSUNLINKMODULE_OPTION_KEEP_MEMORY_MAPPED;
}
-#if defined(__ppc__)
+#if defined __ppc__
flags |= NSUNLINKMODULE_OPTION_RESET_LAZY_REFERENCES;
#endif
if (!NSUnLinkModule (module, flags))
diff --git a/libltdl/loaders/loadlibrary.c b/libltdl/loaders/loadlibrary.c
index 179c0098..2c2dc755 100644
--- a/libltdl/loaders/loadlibrary.c
+++ b/libltdl/loaders/loadlibrary.c
@@ -32,7 +32,7 @@ or obtained by writing to the Free Software Foundation, Inc.,
#include "lt__private.h"
#include "lt_dlloader.h"
-#if defined(__CYGWIN__)
+#if defined __CYGWIN__
# include <sys/cygwin.h>
#endif
@@ -163,7 +163,7 @@ vm_open (lt_user_data LT__UNUSED loader_data, const char *filename,
return 0;
}
len = 0;
-#elif defined(__CYGWIN__)
+#elif defined __CYGWIN__
cygwin_conv_to_full_win32_path (filename, wpath);
len = 0;
#else
diff --git a/libltdl/loaders/shl_load.c b/libltdl/loaders/shl_load.c
index 8a45ee00..7ebfeeca 100644
--- a/libltdl/loaders/shl_load.c
+++ b/libltdl/loaders/shl_load.c
@@ -90,7 +90,7 @@ get_vtable (lt_user_data loader_data)
/* --- IMPLEMENTATION --- */
-#if defined(HAVE_DL_H)
+#if defined HAVE_DL_H
# include <dl.h>
#endif
@@ -125,10 +125,10 @@ get_vtable (lt_user_data loader_data)
* library specified by the path argument.
*/
-#if !defined(DYNAMIC_PATH)
+#if !defined DYNAMIC_PATH
# define DYNAMIC_PATH 0
#endif
-#if !defined(BIND_RESTRICTED)
+#if !defined BIND_RESTRICTED
# define BIND_RESTRICTED 0
#endif
diff --git a/libltdl/lt__dirent.c b/libltdl/lt__dirent.c
index d2992362..6da267ce 100644
--- a/libltdl/lt__dirent.c
+++ b/libltdl/lt__dirent.c
@@ -34,7 +34,7 @@ or obtained by writing to the Free Software Foundation, Inc.,
#include "lt__dirent.h"
-#if defined(__WINDOWS__)
+#if defined __WINDOWS__
void
closedir (DIR *entry)
@@ -103,4 +103,4 @@ readdir (DIR *entry)
return &entry->file_info;
}
-#endif /*defined(__WINDOWS__)*/
+#endif /*defined __WINDOWS__*/
diff --git a/libltdl/lt__strl.c b/libltdl/lt__strl.c
index c2cee587..e79a0d26 100644
--- a/libltdl/lt__strl.c
+++ b/libltdl/lt__strl.c
@@ -46,7 +46,7 @@ or obtained by writing to the Free Software Foundation, Inc.,
if (lt_strlcat(dst, src, dstsize) >= dstsize)
return -1;
*/
-#if !defined(HAVE_STRLCAT)
+#if !defined HAVE_STRLCAT
size_t
lt_strlcat(char *dst, const char *src, const size_t dstsize)
{
@@ -79,7 +79,7 @@ lt_strlcat(char *dst, const char *src, const size_t dstsize)
return length;
}
-#endif /* !defined(HAVE_STRLCAT) */
+#endif /* !defined HAVE_STRLCAT */
/*
lt_strlcpy copies up to dstsize - 1 characters from the NULL-terminated
@@ -94,7 +94,7 @@ lt_strlcat(char *dst, const char *src, const size_t dstsize)
if (lt_strlcpy(dst, src, dstsize) >= dstsize)
return -1;
*/
-#if !defined(HAVE_STRLCPY)
+#if !defined HAVE_STRLCPY
size_t
lt_strlcpy(char *dst, const char *src, const size_t dstsize)
{
@@ -124,4 +124,4 @@ lt_strlcpy(char *dst, const char *src, const size_t dstsize)
return length;
}
-#endif /* !defined(HAVE_STRLCPY) */
+#endif /* !defined HAVE_STRLCPY */
diff --git a/libltdl/ltdl.c b/libltdl/ltdl.c
index 0887734a..fba276c2 100644
--- a/libltdl/ltdl.c
+++ b/libltdl/ltdl.c
@@ -46,15 +46,15 @@ or obtained by writing to the Free Software Foundation, Inc.,
#define LT_ARCHIVE_EXT ".la"
/* max. filename length */
-#if !defined(LT_FILENAME_MAX)
+#if !defined LT_FILENAME_MAX
# define LT_FILENAME_MAX 1024
#endif
-#if !defined(LT_LIBEXT)
+#if !defined LT_LIBEXT
# define LT_LIBEXT "a"
#endif
-#if !defined(LT_LIBPREFIX)
+#if !defined LT_LIBPREFIX
# define LT_LIBPREFIX "lib"
#endif
@@ -77,15 +77,15 @@ static const char objdir[] = LT_OBJDIR;
static const char archive_ext[] = LT_ARCHIVE_EXT;
static const char libext[] = LT_LIBEXT;
static const char libprefix[] = LT_LIBPREFIX;
-#if defined(LT_MODULE_EXT)
+#if defined LT_MODULE_EXT
static const char shlib_ext[] = LT_MODULE_EXT;
#endif
/* If the loadable module suffix is not the same as the linkable
* shared library suffix, this will be defined. */
-#if defined(LT_SHARED_EXT)
+#if defined LT_SHARED_EXT
static const char shared_ext[] = LT_SHARED_EXT;
#endif
-#if defined(LT_DLSEARCH_PATH)
+#if defined LT_DLSEARCH_PATH
static const char sys_dlsearch_path[] = LT_DLSEARCH_PATH;
#endif
@@ -495,7 +495,7 @@ tryall_dlopen_module (lt_dlhandle *handle, const char *prefix,
assert (handle);
assert (dirname);
assert (dlname);
-#if defined(LT_DIRSEP_CHAR)
+#if defined LT_DIRSEP_CHAR
/* Only canonicalized names (i.e. with DIRSEP chars already converted)
should make it into this function: */
assert (strchr (dirname, LT_DIRSEP_CHAR) == 0);
@@ -606,7 +606,7 @@ canonicalize_path (const char *path, char **pcanonical)
/* Anything other than a directory separator is copied verbatim. */
if ((path[src] != '/')
-#if defined(LT_DIRSEP_CHAR)
+#if defined LT_DIRSEP_CHAR
&& (path[src] != LT_DIRSEP_CHAR)
#endif
)
@@ -618,7 +618,7 @@ canonicalize_path (const char *path, char **pcanonical)
NULL terminator. */
else if ((path[1+ src] != LT_PATHSEP_CHAR)
&& (path[1+ src] != LT_EOS_CHAR)
-#if defined(LT_DIRSEP_CHAR)
+#if defined LT_DIRSEP_CHAR
&& (path[1+ src] != LT_DIRSEP_CHAR)
#endif
&& (path[1+ src] != '/'))
@@ -806,7 +806,7 @@ find_handle (const char *search_path, const char *base_name,
return phandle;
}
-#if !defined(LTDL_DLOPEN_DEPLIBS)
+#if !defined LTDL_DLOPEN_DEPLIBS
static int
load_deplibs (lt_dlhandle handle, char * LT__UNUSED deplibs)
{
@@ -814,7 +814,7 @@ load_deplibs (lt_dlhandle handle, char * LT__UNUSED deplibs)
return 0;
}
-#else /* defined(LTDL_DLOPEN_DEPLIBS) */
+#else /* defined LTDL_DLOPEN_DEPLIBS */
static int
load_deplibs (lt_dlhandle handle, char *deplibs)
{
@@ -969,7 +969,7 @@ load_deplibs (lt_dlhandle handle, char *deplibs)
return errors;
}
-#endif /* defined(LTDL_DLOPEN_DEPLIBS) */
+#endif /* defined LTDL_DLOPEN_DEPLIBS */
static int
unload_deplibs (lt_dlhandle handle)
@@ -1356,7 +1356,7 @@ try_dlopen (lt_dlhandle *phandle, const char *filename, const char *ext,
file = find_file (search_path, base_name, &dir);
}
-#if defined(LT_MODULE_PATH_VAR)
+#if defined LT_MODULE_PATH_VAR
if (!file)
{
search_path = getenv (LT_MODULE_PATH_VAR);
@@ -1364,7 +1364,7 @@ try_dlopen (lt_dlhandle *phandle, const char *filename, const char *ext,
file = find_file (search_path, base_name, &dir);
}
#endif
-#if defined(LT_DLSEARCH_PATH)
+#if defined LT_DLSEARCH_PATH
if (!file && *sys_dlsearch_path)
{
file = find_file (sys_dlsearch_path, base_name, &dir);
@@ -1461,11 +1461,11 @@ try_dlopen (lt_dlhandle *phandle, const char *filename, const char *ext,
&newhandle, advise)
&& !find_handle (getenv (LTDL_SEARCHPATH_VAR), base_name,
&newhandle, advise)
-#if defined(LT_MODULE_PATH_VAR)
+#if defined LT_MODULE_PATH_VAR
&& !find_handle (getenv (LT_MODULE_PATH_VAR), base_name,
&newhandle, advise)
#endif
-#if defined(LT_DLSEARCH_PATH)
+#if defined LT_DLSEARCH_PATH
&& !find_handle (sys_dlsearch_path, base_name,
&newhandle, advise)
#endif
@@ -1539,10 +1539,10 @@ has_library_ext (const char *filename)
ext = strrchr (filename, '.');
if (ext && ((STREQ (ext, archive_ext))
-#if defined(LT_MODULE_EXT)
+#if defined LT_MODULE_EXT
|| (STREQ (ext, shlib_ext))
#endif
-#if defined(LT_SHARED_EXT)
+#if defined LT_SHARED_EXT
|| (STREQ (ext, shared_ext))
#endif
))
@@ -1680,7 +1680,7 @@ lt_dlopenadvise (const char *filename, lt_dladvise advise)
if (handle || ((errors > 0) && !file_not_found ()))
return handle;
-#if defined(LT_MODULE_EXT)
+#if defined LT_MODULE_EXT
/* Try appending SHLIB_EXT. */
LT__SETERRORSTR (saved_error);
errors = try_dlopen (&handle, filename, shlib_ext, advise);
@@ -1691,7 +1691,7 @@ lt_dlopenadvise (const char *filename, lt_dladvise advise)
return handle;
#endif
-#if defined(LT_SHARED_EXT)
+#if defined LT_SHARED_EXT
/* Try appending SHARED_EXT. */
LT__SETERRORSTR (saved_error);
errors = try_dlopen (&handle, filename, shared_ext, advise);
@@ -1919,14 +1919,14 @@ lt_dlforeachfile (const char *search_path,
foreachfile_callback, fpptr, data);
}
-#if defined(LT_MODULE_PATH_VAR)
+#if defined LT_MODULE_PATH_VAR
if (!is_done)
{
is_done = foreach_dirinpath (getenv(LT_MODULE_PATH_VAR), 0,
foreachfile_callback, fpptr, data);
}
#endif
-#if defined(LT_DLSEARCH_PATH)
+#if defined LT_DLSEARCH_PATH
if (!is_done && *sys_dlsearch_path)
{
is_done = foreach_dirinpath (sys_dlsearch_path, 0,
diff --git a/libltdl/ltdl.h b/libltdl/ltdl.h
index 824f2011..010bb032 100644
--- a/libltdl/ltdl.h
+++ b/libltdl/ltdl.h
@@ -30,7 +30,7 @@ or obtained by writing to the Free Software Foundation, Inc.,
*/
/* Only include this header file once. */
-#if !defined(LTDL_H)
+#if !defined LTDL_H
#define LTDL_H 1
#include <libltdl/lt_system.h>
@@ -160,4 +160,4 @@ LT_SCOPE int lt_dlisresident (lt_dlhandle handle);
LT_END_C_DECLS
-#endif /*!defined(LTDL_H)*/
+#endif /*!defined LTDL_H*/
diff --git a/m4/libtool.m4 b/m4/libtool.m4
index cfb98d62..a3ac26db 100644
--- a/m4/libtool.m4
+++ b/m4/libtool.m4
@@ -1795,7 +1795,7 @@ else
/* When -fvisbility=hidden is used, assume the code has been annotated
correspondingly for the symbols needed. */
-#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
+#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
int fnord () __attribute__((visibility("default")));
#endif
@@ -3751,11 +3751,11 @@ _LT_EOF
if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
cat <<_LT_EOF > conftest.$ac_ext
/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */
-#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)
+#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE
/* DATA imports from DLLs on WIN32 con't be const, because runtime
relocations are performed -- see ld's documentation on pseudo-relocs. */
# define LT@&t@_DLSYM_CONST
-#elif defined(__osf__)
+#elif defined __osf__
/* This system does not cope well with relocations in const data. */
# define LT@&t@_DLSYM_CONST
#else
diff --git a/tests/demo/foo.h b/tests/demo/foo.h
index e8a2c878..5609d8d3 100644
--- a/tests/demo/foo.h
+++ b/tests/demo/foo.h
@@ -67,7 +67,7 @@ or obtained by writing to the Free Software Foundation, Inc.,
that don't understand ANSI C prototypes still work, and ANSI C
compilers can issue warnings about type mismatches. */
#undef LTDL_PARAMS
-#if defined (__STDC__) || defined (_AIX) || (defined (__mips) && defined (_SYSTYPE_SVR4)) || defined(__CYGWIN__) || defined(__cplusplus)
+#if defined __STDC__ || defined _AIX || (defined __mips && defined _SYSTYPE_SVR4) || defined __CYGWIN__ || defined __cplusplus
# define LT_PARAMS(protos) protos
# define lt_ptr_t void*
#else
@@ -76,11 +76,11 @@ or obtained by writing to the Free Software Foundation, Inc.,
#endif
/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */
-#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)
+#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE
/* DATA imports from DLLs on WIN32 con't be const, because runtime
relocations are performed -- see ld's documentation on pseudo-relocs. */
# define LT_DLSYM_CONST
-#elif defined(__osf__)
+#elif defined __osf__
/* This system does not cope well with relocations in const data. */
# define LT_DLSYM_CONST
#else
diff --git a/tests/depdemo/sysdep.h b/tests/depdemo/sysdep.h
index 4430b618..7c00990e 100644
--- a/tests/depdemo/sysdep.h
+++ b/tests/depdemo/sysdep.h
@@ -44,7 +44,7 @@ or obtained by writing to the Free Software Foundation, Inc.,
that don't understand ANSI C prototypes still work, and ANSI C
compilers can issue warnings about type mismatches. */
#undef __P
-#if defined (__STDC__) || defined (_AIX) || (defined (__mips) && defined (_SYSTYPE_SVR4)) || defined(WIN32) || defined(__cplusplus)
+#if defined __STDC__ || defined _AIX || (defined __mips && defined _SYSTYPE_SVR4) || defined WIN32 || defined __cplusplus
# define __P(protos) protos
#else
# define __P(protos) ()
diff --git a/tests/exceptions.at b/tests/exceptions.at
index 286b2acc..c1dcce11 100644
--- a/tests/exceptions.at
+++ b/tests/exceptions.at
@@ -80,9 +80,9 @@ AT_DATA([common.h],
#include <exception>
#include <string>
-#if defined(__CYGWIN__) || defined(_WIN32)
-# if defined(DLL_EXPORT) || defined(USING_COMMON_DLL)
-# if defined(LIBTOOL_TEST_IN_COMMON)
+#if defined __CYGWIN__ || defined _WIN32
+# if defined DLL_EXPORT || defined USING_COMMON_DLL
+# if defined LIBTOOL_TEST_IN_COMMON
# define COMMON_IMPEXP __declspec (dllexport)
# else
# define COMMON_IMPEXP __declspec (dllimport)
@@ -124,9 +124,9 @@ int common_dummy (void)
AT_DATA([module.h],
[[#include "common.h"
-#if defined(__CYGWIN__) || defined(_WIN32)
-# if defined(DLL_EXPORT) || defined(USING_MODULE_DLL)
-# if defined(LIBTOOL_TEST_IN_MODULE)
+#if defined __CYGWIN__ || defined _WIN32
+# if defined DLL_EXPORT || defined USING_MODULE_DLL
+# if defined LIBTOOL_TEST_IN_MODULE
# define MODULE_IMPEXP __declspec (dllexport)
# else
# define MODULE_IMPEXP __declspec (dllimport)
@@ -170,9 +170,9 @@ AT_DATA([lib.h],
#include <string>
-#if defined(__CYGWIN__) || defined(_WIN32)
-# if defined(DLL_EXPORT) || defined(USING_LIB_DLL)
-# if defined(LIBTOOL_TEST_IN_LIB)
+#if defined __CYGWIN__ || defined _WIN32
+# if defined DLL_EXPORT || defined USING_LIB_DLL
+# if defined LIBTOOL_TEST_IN_LIB
# define LIB_IMPEXP __declspec (dllexport)
# else
# define LIB_IMPEXP __declspec (dllimport)
diff --git a/tests/export.at b/tests/export.at
index 39adfbc3..eaf4123e 100644
--- a/tests/export.at
+++ b/tests/export.at
@@ -103,18 +103,18 @@ AT_DATA(main.c,
* For users, it's best to realize that they should not provide any
* non-function API at all.
*/
-#if defined(LIBA_DLL_IMPORT)
-# if defined(_WIN32) || defined(WIN32) || defined(__CYGWIN__)
+#if defined LIBA_DLL_IMPORT
+# if defined _WIN32 || defined WIN32 || defined __CYGWIN__
# define LIBA_SCOPE extern __declspec(dllimport)
-# if defined(_MSC_VER)
+# if defined _MSC_VER
# define LIBA_SCOPE_VAR LIBA_SCOPE
# endif
# endif
#endif
-#if !defined(LIBA_SCOPE)
+#if !defined LIBA_SCOPE
# define LIBA_SCOPE extern
#endif
-#if !defined(LIBA_SCOPE_VAR)
+#if !defined LIBA_SCOPE_VAR
# define LIBA_SCOPE_VAR extern
#endif
#ifdef __cplusplus
diff --git a/tests/pdemo/foo.h b/tests/pdemo/foo.h
index d08303b5..2f666f36 100644
--- a/tests/pdemo/foo.h
+++ b/tests/pdemo/foo.h
@@ -53,7 +53,7 @@ or obtained by writing to the Free Software Foundation, Inc.,
that don't understand ANSI C prototypes still work, and ANSI C
compilers can issue warnings about type mismatches. */
#undef LTDL_PARAMS
-#if defined (__STDC__) || defined (_AIX) || (defined (__mips) && defined (_SYSTYPE_SVR4)) || defined(__CYGWIN32__) || defined(__cplusplus)
+#if defined __STDC__ || defined _AIX || (defined __mips && defined _SYSTYPE_SVR4) || defined __CYGWIN32__ || defined __cplusplus
# define LT_PARAMS(protos) protos
# define lt_ptr_t void*
#else
@@ -62,11 +62,11 @@ or obtained by writing to the Free Software Foundation, Inc.,
#endif
/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */
-#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)
+#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE
/* DATA imports from DLLs on WIN32 con't be const, because runtime
relocations are performed -- see ld's documentation on pseudo-relocs. */
# define LT_DLSYM_CONST
-#elif defined(__osf__)
+#elif defined __osf__
/* This system does not cope well with relocations in const data. */
# define LT_DLSYM_CONST
#else
diff --git a/tests/stresstest.at b/tests/stresstest.at
index c9caee2d..4722ffd0 100644
--- a/tests/stresstest.at
+++ b/tests/stresstest.at
@@ -90,18 +90,18 @@ int ab = 1;
AT_DATA(main.c,
[[
-#if defined(LIBA_DLL_IMPORT)
-# if defined(_WIN32) || defined(WIN32) || defined(__CYGWIN__)
+#if defined LIBA_DLL_IMPORT
+# if defined _WIN32 || defined WIN32 || defined __CYGWIN__
# define LIBA_SCOPE extern __declspec(dllimport)
-# if defined(_MSC_VER)
+# if defined _MSC_VER
# define LIBA_SCOPE_VAR LIBA_SCOPE
# endif
# endif
#endif
-#if !defined(LIBA_SCOPE)
+#if !defined LIBA_SCOPE
# define LIBA_SCOPE extern
#endif
-#if !defined(LIBA_SCOPE_VAR)
+#if !defined LIBA_SCOPE_VAR
# define LIBA_SCOPE_VAR extern
#endif
#ifdef __cplusplus
@@ -134,18 +134,18 @@ int main(void)
AT_DATA(dlself.c,
[[
-#if defined(LIBA_DLL_IMPORT)
-# if defined(_WIN32) || defined(WIN32) || defined(__CYGWIN__)
+#if defined LIBA_DLL_IMPORT
+# if defined _WIN32 || defined WIN32 || defined __CYGWIN__
# define LIBA_SCOPE extern __declspec(dllimport)
-# if defined(_MSC_VER)
+# if defined _MSC_VER
# define LIBA_SCOPE_VAR LIBA_SCOPE
# endif
# endif
#endif
-#if !defined(LIBA_SCOPE)
+#if !defined LIBA_SCOPE
# define LIBA_SCOPE extern
#endif
-#if !defined(LIBA_SCOPE_VAR)
+#if !defined LIBA_SCOPE_VAR
# define LIBA_SCOPE_VAR extern
#endif
#ifdef __cplusplus