From 6e60d4773533be8e1d2c27c5d5e7d1c48f53c53c Mon Sep 17 00:00:00 2001 From: Alexandre Oliva Date: Wed, 10 Mar 1999 14:33:22 +0000 Subject: [PATCH] * libltdl/ltdl.c (lt_dlopen): some preprocessors choke if the `#' of `#define' is not in column 1; let's go back to fortran! :-) Add #undefs too, to avoid potential warnings or errors. --- ChangeLog | 6 ++++++ libltdl/ltdl.c | 12 ++++++++---- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index ca01d351c..9c51f1702 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +1999-03-10 Alexandre Oliva + + * libltdl/ltdl.c (lt_dlopen): some preprocessors choke if the `#' + of `#define' is not in column 1; let's go back to fortran! :-) + Add #undefs too, to avoid potential warnings or errors. + 1999-03-09 Alexandre Oliva * libtool.m4 (AC_LIBLTDL_INSTALLABLE, AC_LIBLTDL_CONVENIENCE): diff --git a/libltdl/ltdl.c b/libltdl/ltdl.c index b05150694..8bf16a7cd 100644 --- a/libltdl/ltdl.c +++ b/libltdl/ltdl.c @@ -1142,31 +1142,35 @@ lt_dlopen (filename) } /* read the .la file */ while (!feof(file)) { - #define STR_DLNAME "dlname=" - #define STR_OLD_LIBRARY "old_library=" - #define STR_LIBDIR "libdir=" - #define STR_DL_DEPLIBS "dl_dependency_libs=" char line[LTDL_FILENAME_MAX]; if (!fgets(line, sizeof(line), file)) break; if (line[0] == '\n' || line[0] == '#') continue; +# undef STR_DLNAME +# define STR_DLNAME "dlname=" if (strncmp(line, STR_DLNAME, sizeof(STR_DLNAME) - 1) == 0) error = trim(&dlname, &line[sizeof(STR_DLNAME) - 1]); else +# undef STR_OLD_LIBRARY +# define STR_OLD_LIBRARY "old_library=" if (strncmp(line, STR_OLD_LIBRARY, sizeof(STR_OLD_LIBRARY) - 1) == 0) error = trim(&old_name, &line[sizeof(STR_OLD_LIBRARY) - 1]); else +# undef STR_LIBDIR +# define STR_LIBDIR "libdir=" if (strncmp(line, STR_LIBDIR, sizeof(STR_LIBDIR) - 1) == 0) error = trim(&libdir, &line[sizeof(STR_LIBDIR) - 1]); else +# undef STR_DL_DEPLIBS +# define STR_DL_DEPLIBS "dl_dependency_libs=" if (strncmp(line, STR_DL_DEPLIBS, sizeof(STR_DL_DEPLIBS) - 1) == 0) error = trim(&deplibs, -- 2.47.3