1999-01-20 Alexandre Oliva <oliva@dcc.unicamp.br>
+ * demo/configure.in (AC_C_CONST): added, for portability
+ * mdemo/configure.in (AC_C_CONST): ditto
+ * libltdl/configure.in (AC_C_CONST, AC_C_INLINE): ditto
+ * libltdl/ltdl.c (LTDL_FILENAME_MAX): use FILENAME_MAX if defined
+ (FILENAME_MAX): replace all explicit uses with LTDL_FILENAME_MAX
+ (presym_free_symlists, trim): don't return void, for portability
+ (lt_dlgetsearchpath): replace (void) with __P((void))
+
* ltmain.in (compile): when compiling both PIC and non-PIC, write
the PIC object to .libs/.lo and only rename it to .lo after
compiling the .o, to avoid fooling make dependencies
/* max. filename length */
#ifndef LTDL_FILENAME_MAX
-#define LTDL_FILENAME_MAX 1024
+# ifdef FILENAME_MAX
+# define LTDL_FILENAME_MAX FILENAME_MAX
+# else
+# define LTDL_FILENAME_MAX 1024
+# endif
#endif
#ifndef LTDL_SEARCHPATH_MAX
return 0;
}
-static void
+static int /* not all compilers support void */
presym_free_symlists ()
{
lt_dlsymlists_t *lists = preloaded_symbols;
free(tmp);
}
preloaded_symbols = 0;
+ return 0;
}
static int
return errors;
}
-static void
+static int /* not all compilers support void */
trim (dest, s)
char *dest;
const char *s;
dest[len-3] = '\0';
} else
*dest = '\0';
+ return 0;
}
static int
while (cur) {
next = strchr(cur, ':');
if (next) {
- if (next - cur + 1 >= FILENAME_MAX) {
+ if (next - cur + 1 >= LTDL_FILENAME_MAX) {
last_error = buffer_overflow_error;
return 1;
}
filename[next - cur] = '\0';
cur = next+1;
} else {
- if (strlen(cur)+1 >= FILENAME_MAX) {
+ if (strlen(cur)+1 >= LTDL_FILENAME_MAX) {
last_error = buffer_overflow_error;
return 1;
}
basename++;
else
basename = filename;
- if (basename - filename >= FILENAME_MAX) {
+ if (basename - filename >= LTDL_FILENAME_MAX) {
last_error = buffer_overflow_error;
return 0;
}
}
const char *
-lt_dlgetsearchpath (void)
+lt_dlgetsearchpath __P((void))
{
return usr_search_path;
}