* 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.
This commit is contained in:
Alexandre Oliva 1999-03-10 14:33:22 +00:00 committed by Alexandre Oliva
parent ed604d082d
commit 6e60d47735
2 changed files with 14 additions and 4 deletions

View File

@ -1,3 +1,9 @@
1999-03-10 Alexandre Oliva <oliva@dcc.unicamp.br>
* 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 <oliva@dcc.unicamp.br>
* libtool.m4 (AC_LIBLTDL_INSTALLABLE, AC_LIBLTDL_CONVENIENCE):

View File

@ -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,