diff options
Diffstat (limited to 'libltdl/libltdl')
-rw-r--r-- | libltdl/libltdl/lt__alloc.h | 12 | ||||
-rw-r--r-- | libltdl/libltdl/lt__dirent.h | 10 | ||||
-rw-r--r-- | libltdl/libltdl/lt__glibc.h | 8 | ||||
-rw-r--r-- | libltdl/libltdl/lt__private.h | 20 | ||||
-rw-r--r-- | libltdl/libltdl/lt__strl.h | 14 | ||||
-rw-r--r-- | libltdl/libltdl/lt_dlloader.h | 4 | ||||
-rw-r--r-- | libltdl/libltdl/lt_error.h | 4 | ||||
-rw-r--r-- | libltdl/libltdl/lt_system.h | 46 | ||||
-rw-r--r-- | libltdl/libltdl/slist.h | 12 |
9 files changed, 65 insertions, 65 deletions
diff --git a/libltdl/libltdl/lt__alloc.h b/libltdl/libltdl/lt__alloc.h index 23807c8b..1ceddf00 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" @@ -37,10 +37,10 @@ LT_BEGIN_C_DECLS #define MALLOC(tp, n) (tp*) lt__malloc((n) * sizeof(tp)) #define REALLOC(tp, mem, n) (tp*) lt__realloc((mem), (n) * sizeof(tp)) -#define FREE(mem) LT_STMT_START { \ - free (mem); mem = NULL; } LT_STMT_END -#define MEMREASSIGN(p, q) LT_STMT_START { \ - if ((p) != (q)) { free (p); (p) = (q); (q) = 0; } \ +#define FREE(mem) LT_STMT_START { \ + if (mem) { free ((void *)mem); mem = NULL; } } LT_STMT_END +#define MEMREASSIGN(p, q) LT_STMT_START { \ + if ((p) != (q)) { if (p) free (p); (p) = (q); (q) = 0; } \ } LT_STMT_END /* If set, this function is called when memory allocation has failed. */ @@ -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 b4554226..4f24f82a 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 a8f0bc32..f284773d 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 5fb489e6..f4c4a3d7 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 @@ -94,8 +94,8 @@ LT_SCOPE void lt__alloc_die_callback (void); /* For readability: */ -#define STRNEQ(s1, s2) (strcmp((s1), (s2)) != 0) -#define STREQ(s1, s2) (strcmp((s1), (s2)) == 0) +#define strneq(s1, s2) (strcmp((s1), (s2)) != 0) +#define streq(s1, s2) (!strcmp((s1), (s2))) @@ -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 915a688c..5799dc8a 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 ed9b4893..589fd0dc 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 5c2dab2c..e789b3a4 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 2d65eb59..f1545ce3 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 0cd7f0c4..4d565099 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)*/ |