]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
* libltdl/ltdl.c (lt_dlseterror): Catch errorcodes below 0 as
authorGary V. Vaughan <gary@gnu.org>
Fri, 28 Jan 2000 01:39:00 +0000 (01:39 +0000)
committerGary V. Vaughan <gary@gnu.org>
Fri, 28 Jan 2000 01:39:00 +0000 (01:39 +0000)
invalid.
* libltdl/ltdl.h (LTDL_ERROR): Added missing '_' in K&R
definition.

ChangeLog
libltdl/ltdl.c
libltdl/ltdl.h

index 8ae837773daa84fe37fdc1a98a5cbcf6296f97be..0fb8b1f0d485c6f8186c5c6727dbb05eea2d0d8b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2000-01-28  Gary V. Vaughan  <gary@oranda.demon.co.uk>
 
+       * libltdl/ltdl.c (lt_dlseterror): Catch errorcodes below 0 as
+       invalid.
+       * libltdl/ltdl.h (LTDL_ERROR): Added missing '_' in K&R
+       definition.
+
        * libltdl/ltdl.h (ltdl_error_table): Added missing error code, and
        fixed typo in another code.
        * doc/libtool.texi (Libltdl interface): Added missing @end
index a3185c1b9dbdfa9ff92374c60f9b0b3bde7eaa36..a9bfe3fbaa2fcc06db218b9e7718de5081e4188e 100644 (file)
@@ -1902,7 +1902,7 @@ int
 lt_dlseterror (index)
        int index;
 {
-       if (index >= errorcode) {
+       if (index >= errorcode || index < 0) {
                last_error = LT_DLSTRERROR(INVALID_ERRORCODE);
                return 1;
        }
index 1bdb14c724f0ce78d4549eef725411ede0d38dee..8a161e88a72fb8dfeb1948eff057894f5ca80425 100644 (file)
@@ -134,7 +134,7 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
 #ifdef __STDC__ 
 #  define LTDL_ERROR(name, diagnostic) LTDL_ERROR_##name,
 #else
-#  define LTDL_ERROR(name, diagnostic) LTDL_ERROR/**/name,
+#  define LTDL_ERROR(name, diagnostic) LTDL_ERROR_/**/name,
 #endif
 enum {
        ltdl_error_table