]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
* demo/configure.in (AC_C_CONST): added, for portability
authorAlexandre Oliva <oliva@dcc.unicamp.br>
Wed, 20 Jan 1999 13:01:27 +0000 (13:01 +0000)
committerAlexandre Oliva <aoliva@redhat.com>
Wed, 20 Jan 1999 13:01:27 +0000 (13:01 +0000)
* 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))

ChangeLog
demo/configure.in
libltdl/configure.in
libltdl/ltdl.c
mdemo/configure.in

index 723c68cbc52974a61b98dd446ac25ab7b362c3c9..343c159c68797d5d4e39ec7c163cdd58c63351f5 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
 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
index 97511c2eb72bee8cb141d3107891d409356d6b81..f151af9183392e07d4ca0df39465dec879fbc32a 100644 (file)
@@ -3,6 +3,7 @@ AC_INIT(hello.c)
 AM_INIT_AUTOMAKE(hell,1.0)
 
 AC_PROG_CC
+AC_C_CONST
 AC_EXEEXT
 AM_PROG_LIBTOOL
 
index 377198bbd03c54fac5656b999f79f2d45b4b2b45..41e5a84cf70e13f1b29b5d25499aa25d88205431 100644 (file)
@@ -19,6 +19,8 @@ AC_SUBST(LIBLIBS)
 AC_SUBST(NOINSTLIBS)
 
 AC_PROG_CC
+AC_C_CONST
+AC_C_INLINE
 AM_PROG_LIBTOOL
 AC_SUBST(LIBTOOL_DEPS)
 
index 1accd116a85fd094ae0800efd6748d87e0001a1f..5ea3fd72e338b9f325aea28ec8df2bbf930a5a2c 100644 (file)
@@ -52,7 +52,11 @@ Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 
 /* 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
@@ -540,7 +544,7 @@ presym_init ()
        return 0;
 }
 
-static void
+static int /* not all compilers support void */
 presym_free_symlists ()
 {
        lt_dlsymlists_t *lists = preloaded_symbols;
@@ -552,6 +556,7 @@ presym_free_symlists ()
                free(tmp);
        }
        preloaded_symbols = 0;
+       return 0;
 }
 
 static int
@@ -751,7 +756,7 @@ lt_dlexit ()
        return errors;
 }
 
-static void
+static int /* not all compilers support void */
 trim (dest, s)
        char *dest;
        const char *s;
@@ -764,6 +769,7 @@ trim (dest, s)
                dest[len-3] = '\0';
        } else
                *dest = '\0';
+       return 0;
 }
 
 static int
@@ -867,7 +873,7 @@ find_library (handle, basename, search_path)
        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;
                        }
@@ -875,7 +881,7 @@ find_library (handle, basename, search_path)
                        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;
                        }
@@ -977,7 +983,7 @@ lt_dlopen (filename)
                basename++;
        else
                basename = filename;
-       if (basename - filename >= FILENAME_MAX) {
+       if (basename - filename >= LTDL_FILENAME_MAX) {
                last_error = buffer_overflow_error;
                return 0;
        }
@@ -1236,7 +1242,7 @@ lt_dlsetsearchpath (search_path)
 }
 
 const char *
-lt_dlgetsearchpath (void)
+lt_dlgetsearchpath __P((void))
 {
        return usr_search_path;
 }
index acad449d4c95fa0c8fb7ee06153ebe28144073fd..b070b9083935a01f764ded5985ed5d0e04befc5a 100644 (file)
@@ -3,6 +3,7 @@ AC_INIT(main.c)
 AM_INIT_AUTOMAKE(mdemo,0.1)
 
 AC_PROG_CC
+AC_C_CONST
 AC_EXEEXT
 AM_PROG_LIBTOOL