]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
syntax-check: fix prohibit_strcmp syntax-check violation.
authorGary V. Vaughan <gary@gnu.org>
Thu, 3 Jan 2013 06:41:02 +0000 (13:41 +0700)
committerGary V. Vaughan <gary@gnu.org>
Thu, 3 Jan 2013 06:41:02 +0000 (13:41 +0700)
* build-aux/ltmain.in (func_generate_dlsyms): Add a definition for
STREQ, and then use it in place of !strcmp.

Signed-off-by: Gary V. Vaughan <gary@gnu.org>
build-aux/ltmain.in

index b9a4f671d01072c559a86a30ee09d795931a317c..c8cdb9c9be7eab79ed537c2e58dcda317f3cb6b0 100644 (file)
@@ -2660,6 +2660,8 @@ extern \"C\" {
 # define LT_DLSYM_CONST const
 #endif
 
+#define STREQ(s1, s2) (strcmp ((s1), (s2)) == 0)
+
 /* External symbol declarations for the compiler. */\
 "
 
@@ -2821,7 +2823,7 @@ static void lt_syminit(void)
   LT_DLSYM_CONST lt_dlsymlist *symbol = lt_${my_prefix}_LTX_preloaded_symbols;
   for (; symbol->name; ++symbol)
     {"
-           $SED 's/.*/      if (!strcmp (symbol->name, \"&\")) symbol->address = (void *) \&&;/' < "$nlist"I >> "$output_objdir/$my_dlsyms"
+           $SED 's/.*/      if (STREQ (symbol->name, \"&\")) symbol->address = (void *) \&&;/' < "$nlist"I >> "$output_objdir/$my_dlsyms"
            echo >> "$output_objdir/$my_dlsyms" "\
     }
 }"