syntax-check: fix violations and implement sc_trailing_blank-non-rfc3676.

* cfg.mk (local-checks-to-fix): Move sc_trailing_blank from
here...
(local-checks-to-skip): ...to here, because otherwise it flags
valid RFC3676 signature blocks.
(sc_trailing_blank-non-rfc3676): An improved sc_trailing_blank
implementation that doesn't flag signature blocks as violations.
* Makefile.am, bootstrap.conf, doc/PLATFORMS,
libltdl/config/ltmain.m4sh, libltdl/m4/libtool.m4,
libltdl/m4/lt~obsolete.m4, tests/archive-in-archive.at,
tests/convenience.at, tests/darwin.at, tests/depdemo/l1/l1.c,
tests/depdemo/l2/l2.c, tests/depdemo/l3/l3.c,
tests/depdemo/l4/l4.c, tests/f77demo/README,
tests/f77demo/cprogram.c, tests/f77demo/foof.f,
tests/f77demo/foof2.f, tests/f77demo/foof3.f,
tests/f77demo/fprogram.f, tests/fcdemo/README,
tests/fcdemo/cprogram.c, tests/fcdemo/foof.f90,
tests/fcdemo/foof2.f90, tests/fcdemo/foof3.f90,
tests/fcdemo/fprogram.f90, tests/mdemo/README,
tests/mdemo/main.c, tests/mdemo/mlib.c, tests/objectlist.test,
tests/static.at, tests/template.at, tests/testsuite.at: Remove
trailing blanks.

Signed-off-by: Gary V. Vaughan <gary@gnu.org>
This commit is contained in:
Gary V. Vaughan 2011-10-25 11:16:02 +07:00
parent 460eb0638a
commit d7919d50d0
32 changed files with 80 additions and 85 deletions

View File

@ -444,7 +444,7 @@ libtool_require_package_url ()
$require_configure_ac $require_configure_ac
func_extract_trace AC_INIT func_extract_trace AC_INIT
save_IFS="$IFS" save_IFS="$IFS"
IFS=: IFS=:
set dummy $func_extract_trace_result set dummy $func_extract_trace_result

11
cfg.mk
View File

@ -41,8 +41,7 @@ local-checks-to-fix = \
sc_prohibit_always-defined_macros \ sc_prohibit_always-defined_macros \
sc_prohibit_always_true_header_tests \ sc_prohibit_always_true_header_tests \
sc_require_config_h \ sc_require_config_h \
sc_require_config_h_first \ sc_require_config_h_first
sc_trailing_blank
local-checks-to-skip = \ local-checks-to-skip = \
$(local-checks-to-fix) \ $(local-checks-to-fix) \
@ -50,6 +49,7 @@ local-checks-to-skip = \
sc_bindtextdomain \ sc_bindtextdomain \
sc_cast_of_x_alloc_return_value \ sc_cast_of_x_alloc_return_value \
sc_program_name \ sc_program_name \
sc_trailing_blank \
sc_unmarked_diagnostics sc_unmarked_diagnostics
# GPL_version: checks for GPLv3, which we don't use # GPL_version: checks for GPLv3, which we don't use
@ -57,8 +57,14 @@ local-checks-to-skip = \
# cast_of_x_alloc_return_value: # cast_of_x_alloc_return_value:
# We support C++ compilation which does require casting here. # We support C++ compilation which does require casting here.
# program_name: libtool has no programs! # program_name: libtool has no programs!
# trailing_blank: flags valid rfc3676 separators
# unmarked_diagnostics: libtool isn't internationalized # unmarked_diagnostics: libtool isn't internationalized
sc_trailing_blank-non-rfc3676:
@prohibit='([^-][^-][ ][ ]*|^[ ][ ]*)$$' \
halt='found trailing blank(s)' \
$(_sc_search_regexp)
# List syntax-check exempted files. # List syntax-check exempted files.
exclude_file_name_regexp--sc_error_message_uppercase = \ exclude_file_name_regexp--sc_error_message_uppercase = \
^$(_build-aux)/cvsu$$ ^$(_build-aux)/cvsu$$
@ -67,3 +73,4 @@ exclude_file_name_regexp--sc_prohibit_strcmp = \
exclude_file_name_regexp--sc_prohibit_test_minus_ao = \ exclude_file_name_regexp--sc_prohibit_test_minus_ao = \
^m4/libtool.m4$$ ^m4/libtool.m4$$
exclude_file_name_regexp--sc_space_tab = \.diff$$ exclude_file_name_regexp--sc_space_tab = \.diff$$
exclude_file_name_regexp--sc_trailing_blank-non-rfc3676 = \.diff$$

View File

@ -110,7 +110,7 @@ mips-sgi-irix5.2 cc 1.3b ok
mips-sni-sysv4 cc 1.3.5 ok mips-sni-sysv4 cc 1.3.5 ok
(Siemens C-compiler) (Siemens C-compiler)
mips-sni-sysv4 gcc 1.3.5 ok mips-sni-sysv4 gcc 1.3.5 ok
(gcc-2.7.2.3, GNU assembler 2.8.1, native ld) (gcc-2.7.2.3, GNU assembler 2.8.1, native ld)
mipsel-unknown-openbsd2.1 gcc 1.0 ok mipsel-unknown-openbsd2.1 gcc 1.0 ok
powerpc-apple-darwin6.4 gcc 1.5 ok powerpc-apple-darwin6.4 gcc 1.5 ok
(apple dev tools released 12/2002) (apple dev tools released 12/2002)

View File

@ -1409,7 +1409,7 @@ func_require_ac_ltdl_mode ()
*" recursive "*) ac_ltdl_mode=recursive ;; *" recursive "*) ac_ltdl_mode=recursive ;;
*" subproject "*) ac_ltdl_mode=subproject ;; *" subproject "*) ac_ltdl_mode=subproject ;;
esac esac
require_ac_ltdl_mode=: require_ac_ltdl_mode=:
} }

2
m4/libtool.m4 vendored
View File

@ -1195,7 +1195,7 @@ fi
# Invoke $ECHO with all args, space-separated. # Invoke $ECHO with all args, space-separated.
func_echo_all () func_echo_all ()
{ {
$ECHO "$*" $ECHO "$*"
} }
case "$ECHO" in case "$ECHO" in

2
m4/lt~obsolete.m4 vendored
View File

@ -25,7 +25,7 @@
# included after everything else. This provides aclocal with the # included after everything else. This provides aclocal with the
# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything # AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
# because those macros already exist, or will be overwritten later. # because those macros already exist, or will be overwritten later.
# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. # We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6.
# #
# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. # Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
# Yes, that means every name once taken will need to remain here until # Yes, that means every name once taken will need to remain here until

View File

@ -44,7 +44,7 @@ $LIBTOOL --mode=compile --tag=CC $CC $CPPFLAGS $CFLAGS -c -o foo.lo foo.c
$LIBTOOL --mode=compile --tag=CC $CC $CPPFLAGS $CFLAGS -c -o bar.lo bar.c $LIBTOOL --mode=compile --tag=CC $CC $CPPFLAGS $CFLAGS -c -o bar.lo bar.c
$LIBTOOL --mode=link --tag=CC --tag=disable-shared $CC $CFLAGS $LDFLAGS \ $LIBTOOL --mode=link --tag=CC --tag=disable-shared $CC $CFLAGS $LDFLAGS \
-o libfoo.la foo.lo -version-info 1:0:0 -rpath $thisdir -o libfoo.la foo.lo -version-info 1:0:0 -rpath $thisdir
$LIBTOOL --mode=install cp libfoo.la $thisdir $LIBTOOL --mode=install cp libfoo.la $thisdir
eval `$EGREP '^(old_library)=' < libfoo.la` eval `$EGREP '^(old_library)=' < libfoo.la`
libfoo=$old_library libfoo=$old_library
AT_CHECK([$LIBTOOL --mode=link --tag=CC --tag=disable-shared $CC $CFLAGS $LDFLAGS \ AT_CHECK([$LIBTOOL --mode=link --tag=CC --tag=disable-shared $CC $CFLAGS $LDFLAGS \

View File

@ -43,7 +43,7 @@ cat >main3.c <<EOF
extern int a1(void), a2(void), a3(void); extern int a1(void), a2(void), a3(void);
int main(void) { return a1() + a2() + a3() != 6; } int main(void) { return a1() + a2() + a3() != 6; }
EOF EOF
for i in 1 2 3; do for i in 1 2 3; do
echo "int a$i(void) { return $i; }" > a$i.c echo "int a$i(void) { return $i; }" > a$i.c
$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c main$i.c $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c main$i.c
$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c a$i.c $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c a$i.c
@ -83,7 +83,7 @@ cat >main3.cpp <<EOF
extern int a1(void), a2(void), a3(void); extern int a1(void), a2(void), a3(void);
int main(void) { return a1() + a2() + a3() != 6; } int main(void) { return a1() + a2() + a3() != 6; }
EOF EOF
for i in 1 2 3; do for i in 1 2 3; do
echo "int a$i(void) { return $i; }" > a$i.cpp echo "int a$i(void) { return $i; }" > a$i.cpp
$LIBTOOL --tag=CXX --mode=compile $CXX $CXXFLAGS -c main$i.cpp $LIBTOOL --tag=CXX --mode=compile $CXX $CXXFLAGS -c main$i.cpp
$LIBTOOL --tag=CXX --mode=compile $CXX $CXXFLAGS -c a$i.cpp $LIBTOOL --tag=CXX --mode=compile $CXX $CXXFLAGS -c a$i.cpp
@ -136,7 +136,7 @@ cat >main3.f <<EOF
end end
EOF EOF
for i in 1 2 3; do for i in 1 2 3; do
cat >a$i.f <<EOF cat >a$i.f <<EOF
subroutine a$i(res) subroutine a$i(res)
implicit none implicit none
@ -196,7 +196,7 @@ cat >main3.f <<EOF
end end
EOF EOF
for i in 1 2 3; do for i in 1 2 3; do
cat >a$i.f <<EOF cat >a$i.f <<EOF
subroutine a$i(res) subroutine a$i(res)
implicit none implicit none

View File

@ -36,7 +36,7 @@ int main() { return 0;}
$noskip && { $noskip && {
$CC $CPPFLAGS $CFLAGS -arch ppc -arch i386 -o simple simple.c 2>&1 > /dev/null || noskip=false $CC $CPPFLAGS $CFLAGS -arch ppc -arch i386 -o simple simple.c 2>&1 > /dev/null || noskip=false
rm -f simple rm -f simple
} }
AT_CHECK([$noskip || (exit 77)]) AT_CHECK([$noskip || (exit 77)])

View File

@ -37,5 +37,5 @@ func_l1 (int indent)
putchar(' '); putchar(' ');
printf("l1 (%i)\n", var_l1); printf("l1 (%i)\n", var_l1);
var_l1++; var_l1++;
return 0; return 0;
} }

View File

@ -40,5 +40,5 @@ func_l2 (int indent)
printf("l2 (%i)\n", var_l2); printf("l2 (%i)\n", var_l2);
func_l1(indent+1); func_l1(indent+1);
var_l2 += var_l1; var_l2 += var_l1;
return 0; return 0;
} }

View File

@ -42,5 +42,5 @@ func_l3 (int indent)
func_l1(indent+1); func_l1(indent+1);
func_l2(indent+1); func_l2(indent+1);
var_l3 += var_l1 + var_l2; var_l3 += var_l1 + var_l2;
return 0; return 0;
} }

View File

@ -44,5 +44,5 @@ func_l4 (int indent)
putchar(' '); putchar(' ');
printf("libm [sin(1.5) = %f]\n", sin(1.5)); printf("libm [sin(1.5) = %f]\n", sin(1.5));
var_l4 += var_l3; var_l4 += var_l3;
return 0; return 0;
} }

View File

@ -1,12 +1,12 @@
This is a short demo of the fortran support in libtool. This is a short demo of the fortran support in libtool.
fprogram is a pure-fortran program which is linked fprogram is a pure-fortran program which is linked
against the fortran-only library libfoo.la against the fortran-only library libfoo.la
cprogram is a C program, which is linked against the cprogram is a C program, which is linked against the
mixed C and fortran library libmix.la. The program mixed C and fortran library libmix.la. The program
calls a C function, which in turn calls a fortran calls a C function, which in turn calls a fortran
function. function.
This demo requires GNU autoconf, automake, This demo requires GNU autoconf, automake,
libtool with the F77 tag and quite obvious Fortran 77. libtool with the F77 tag and quite obvious Fortran 77.

View File

@ -28,26 +28,26 @@ int
main () main ()
{ {
int arg,cres,fres; int arg,cres,fres;
printf ("Welcome to GNU libtool mixed C/Fortran demo!\n"); printf ("Welcome to GNU libtool mixed C/Fortran demo!\n");
arg=2; arg=2;
cres=csub(arg); cres=csub(arg);
printf ("The C subroutine returned, claiming that 2*%d = %d\n",arg,cres); printf ("The C subroutine returned, claiming that 2*%d = %d\n",arg,cres);
if(cres==2*arg) if(cres==2*arg)
printf ("The C subroutine is ok!\n"); printf ("The C subroutine is ok!\n");
printf("\nCalling the C wrapper routine...\n"); printf("\nCalling the C wrapper routine...\n");
fres=fwrapper(arg); fres=fwrapper(arg);
printf ("The C wrapper to the fortran subroutine returned,\n" printf ("The C wrapper to the fortran subroutine returned,\n"
"claiming that 2*%d = %d\n",arg,fres); "claiming that 2*%d = %d\n",arg,fres);
if(fres==2*arg) if(fres==2*arg)
printf ("The Fortran 77 subroutine is ok!\n"); printf ("The Fortran 77 subroutine is ok!\n");
return 0; return 0;
} }

View File

@ -1,9 +1,7 @@
C
C This program is free software; you can redistribute it and/or C This program is free software; you can redistribute it and/or
C modify it under the terms of the GNU General Public License C modify it under the terms of the GNU General Public License
C as published by the Free Software Foundation; either version 2 C as published by the Free Software Foundation; either version 2
C of the License, or (at your option) any later version. C of the License, or (at your option) any later version.
C
subroutine fsub(arg,res) subroutine fsub(arg,res)
write(*,*) 'fsub called' write(*,*) 'fsub called'

View File

@ -1,9 +1,7 @@
C
C This program is free software; you can redistribute it and/or C This program is free software; you can redistribute it and/or
C modify it under the terms of the GNU General Public License C modify it under the terms of the GNU General Public License
C as published by the Free Software Foundation; either version 2 C as published by the Free Software Foundation; either version 2
C of the License, or (at your option) any later version. C of the License, or (at your option) any later version.
C
subroutine fsubf(arg,res) subroutine fsubf(arg,res)
implicit none implicit none

View File

@ -1,9 +1,7 @@
C
C This program is free software; you can redistribute it and/or C This program is free software; you can redistribute it and/or
C modify it under the terms of the GNU General Public License C modify it under the terms of the GNU General Public License
C as published by the Free Software Foundation; either version 2 C as published by the Free Software Foundation; either version 2
C of the License, or (at your option) any later version. C of the License, or (at your option) any later version.
C
subroutine fsub3(arg,res) subroutine fsub3(arg,res)
implicit none implicit none

View File

@ -1,9 +1,7 @@
C
C This program is free software; you can redistribute it and/or C This program is free software; you can redistribute it and/or
C modify it under the terms of the GNU General Public License C modify it under the terms of the GNU General Public License
C as published by the Free Software Foundation; either version 2 C as published by the Free Software Foundation; either version 2
C of the License, or (at your option) any later version. C of the License, or (at your option) any later version.
C
program fprogram program fprogram
implicit none implicit none

View File

@ -1,12 +1,12 @@
This is a short demo of the fortran support in libtool. This is a short demo of the fortran support in libtool.
fprogram is a pure-fortran program which is linked fprogram is a pure-fortran program which is linked
against the fortran-only library libfoo.la against the fortran-only library libfoo.la
cprogram is a C program, which is linked against the cprogram is a C program, which is linked against the
mixed C and fortran library libmix.la. The program mixed C and fortran library libmix.la. The program
calls a C function, which in turn calls a fortran calls a C function, which in turn calls a fortran
function. function.
This demo requires GNU autoconf, automake, This demo requires GNU autoconf, automake,
libtool with the FC tag and quite obvious Fortran. libtool with the FC tag and quite obvious Fortran.

View File

@ -29,26 +29,26 @@ int
main () main ()
{ {
int arg,cres,fres; int arg,cres,fres;
printf ("Welcome to GNU libtool mixed C/Fortran demo!\n"); printf ("Welcome to GNU libtool mixed C/Fortran demo!\n");
arg = 2; arg = 2;
cres = csub (arg); cres = csub (arg);
printf ("The C subroutine returned, claiming that 2*%d = %d\n",arg,cres); printf ("The C subroutine returned, claiming that 2*%d = %d\n",arg,cres);
if (cres == 2*arg) if (cres == 2*arg)
printf ("The C subroutine is ok!\n"); printf ("The C subroutine is ok!\n");
printf ("\nCalling the C wrapper routine...\n"); printf ("\nCalling the C wrapper routine...\n");
fres = fwrapper (arg); fres = fwrapper (arg);
printf ("The C wrapper to the fortran subroutine returned,\n" printf ("The C wrapper to the fortran subroutine returned,\n"
"claiming that 2*%d = %d\n",arg,fres); "claiming that 2*%d = %d\n",arg,fres);
if (fres == 2*arg) if (fres == 2*arg)
printf ("The Fortran subroutine is ok!\n"); printf ("The Fortran subroutine is ok!\n");
return 0; return 0;
} }

View File

@ -1,9 +1,8 @@
!
! This program is free software; you can redistribute it and/or ! This program is free software; you can redistribute it and/or
! modify it under the terms of the GNU General Public License ! modify it under the terms of the GNU General Public License
! as published by the Free Software Foundation; either version 2 ! as published by the Free Software Foundation; either version 2
! of the License, or (at your option) any later version. ! of the License, or (at your option) any later version.
!
subroutine fsub(arg,res) subroutine fsub(arg,res)
write(*,*) 'fsub called' write(*,*) 'fsub called'
call fsubf(arg,res) call fsubf(arg,res)

View File

@ -1,9 +1,8 @@
!
! This program is free software; you can redistribute it and/or ! This program is free software; you can redistribute it and/or
! modify it under the terms of the GNU General Public License ! modify it under the terms of the GNU General Public License
! as published by the Free Software Foundation; either version 2 ! as published by the Free Software Foundation; either version 2
! of the License, or (at your option) any later version. ! of the License, or (at your option) any later version.
!
subroutine fsubf(arg,res) subroutine fsubf(arg,res)
implicit none implicit none
integer arg,res integer arg,res

View File

@ -1,9 +1,8 @@
!
! This program is free software; you can redistribute it and/or ! This program is free software; you can redistribute it and/or
! modify it under the terms of the GNU General Public License ! modify it under the terms of the GNU General Public License
! as published by the Free Software Foundation; either version 2 ! as published by the Free Software Foundation; either version 2
! of the License, or (at your option) any later version. ! of the License, or (at your option) any later version.
!
subroutine fsub3(arg,res) subroutine fsub3(arg,res)
implicit none implicit none
integer arg,res integer arg,res

View File

@ -1,9 +1,8 @@
!
! This program is free software; you can redistribute it and/or ! This program is free software; you can redistribute it and/or
! modify it under the terms of the GNU General Public License ! modify it under the terms of the GNU General Public License
! as published by the Free Software Foundation; either version 2 ! as published by the Free Software Foundation; either version 2
! of the License, or (at your option) any later version. ! of the License, or (at your option) any later version.
!
program fprogram program fprogram
implicit none implicit none
integer arg,res integer arg,res

View File

@ -1,10 +1,10 @@
This is mdemo, an example package that uses GNU libtool with an This is mdemo, an example package that uses GNU libtool with an
Automake-generated environment to build two simple modules and Automake-generated environment to build two simple modules and
a program. a program.
It demonstrates how to build both dynamic and static libraries It demonstrates how to build both dynamic and static libraries
that can be dlopened. mdemo uses libtool's portable dlopen that can be dlopened. mdemo uses libtool's portable dlopen
wrapper called "libltdl". wrapper called "libltdl".
All exported symbols are prefixed with "libname_LTX_" to avoid All exported symbols are prefixed with "libname_LTX_" to avoid
symbols conflicts, especially when linking statically. symbols conflicts, especially when linking statically.
libltdl will automatically cut the prefix off to get the real name. libltdl will automatically cut the prefix off to get the real name.

View File

@ -34,7 +34,7 @@ LT_END_C_DECLS
int int
test_dl (char *filename, int test_ext) test_dl (char *filename, int test_ext)
{ {
lt_dlhandle handle; lt_dlhandle handle;
const lt_dlinfo *info; const lt_dlinfo *info;
int (*pfoo1)() = 0; int (*pfoo1)() = 0;
int (*pfoo2)() = 0; int (*pfoo2)() = 0;
@ -65,12 +65,12 @@ test_dl (char *filename, int test_ext)
} }
printf ("module filename: %s\n", info->filename); printf ("module filename: %s\n", info->filename);
printf ("module reference count: %i\n", info->ref_count); printf ("module reference count: %i\n", info->ref_count);
phello = (int(*)())lt_dlsym(handle, "hello"); phello = (int(*)())lt_dlsym(handle, "hello");
if (phello) if (phello)
{ {
int value = (*phello) (); int value = (*phello) ();
printf ("hello returned: %i\n", value); printf ("hello returned: %i\n", value);
if (value == HELLO_RET) if (value == HELLO_RET)
printf("hello is ok!\n"); printf("hello is ok!\n");
@ -82,7 +82,7 @@ test_dl (char *filename, int test_ext)
ret = 1; ret = 1;
} }
pnothing = (int*)lt_dlsym(handle, "nothing"); pnothing = (int*)lt_dlsym(handle, "nothing");
/* Try assigning to the nothing variable. */ /* Try assigning to the nothing variable. */
if (pnothing) if (pnothing)
*pnothing = 1; *pnothing = 1;
@ -93,7 +93,7 @@ test_dl (char *filename, int test_ext)
ret = 1; ret = 1;
} }
pfoo1 = (int(*)())lt_dlsym(handle, "foo1"); pfoo1 = (int(*)())lt_dlsym(handle, "foo1");
/* Just call the functions and check return values. */ /* Just call the functions and check return values. */
if (pfoo1) if (pfoo1)
{ {
@ -103,7 +103,7 @@ test_dl (char *filename, int test_ext)
ret = 1; ret = 1;
} }
else { else {
pfoo2 = (int(*)())lt_dlsym(handle, "foo2"); pfoo2 = (int(*)())lt_dlsym(handle, "foo2");
if (pfoo2) if (pfoo2)
{ {
if ((*pfoo2) () == FOO_RET) if ((*pfoo2) () == FOO_RET)
@ -132,7 +132,7 @@ int myvar;
int int
test_dlself () test_dlself ()
{ {
lt_dlhandle handle; lt_dlhandle handle;
int (*pmyfunc)() = 0; int (*pmyfunc)() = 0;
int *pmyvar = 0; int *pmyvar = 0;
int ret = 0; int ret = 0;
@ -148,7 +148,7 @@ test_dlself ()
if (pmyfunc) if (pmyfunc)
{ {
int value = (*pmyfunc) (); int value = (*pmyfunc) ();
printf ("myfunc returned: %i\n", value); printf ("myfunc returned: %i\n", value);
if (value == HELLO_RET) if (value == HELLO_RET)
printf("myfunc is ok!\n"); printf("myfunc is ok!\n");
@ -160,7 +160,7 @@ test_dlself ()
ret = 1; ret = 1;
} }
pmyvar = (int*)lt_dlsym(handle, "myvar"); pmyvar = (int*)lt_dlsym(handle, "myvar");
/* Try assigning to the variable. */ /* Try assigning to the variable. */
if (pmyvar) if (pmyvar)
*pmyvar = 1; *pmyvar = 1;

View File

@ -30,7 +30,7 @@ or obtained by writing to the Free Software Foundation, Inc.,
int int
test_dl (char *filename) test_dl (char *filename)
{ {
lt_dlhandle handle; lt_dlhandle handle;
const lt_dlinfo *info; const lt_dlinfo *info;
int (*pfoo1)() = 0; int (*pfoo1)() = 0;
int (*pfoo2)() = 0; int (*pfoo2)() = 0;
@ -57,12 +57,12 @@ test_dl (char *filename)
} }
printf ("module filename: %s\n", info->filename); printf ("module filename: %s\n", info->filename);
printf ("module reference count: %i\n", info->ref_count); printf ("module reference count: %i\n", info->ref_count);
phello = (int(*)())lt_dlsym(handle, "hello"); phello = (int(*)())lt_dlsym(handle, "hello");
if (phello) if (phello)
{ {
int value = (*phello) (); int value = (*phello) ();
printf ("hello returned: %i\n", value); printf ("hello returned: %i\n", value);
if (value == HELLO_RET) if (value == HELLO_RET)
printf("hello is ok!\n"); printf("hello is ok!\n");
@ -74,7 +74,7 @@ test_dl (char *filename)
ret = 1; ret = 1;
} }
pnothing = (int*)lt_dlsym(handle, "nothing"); pnothing = (int*)lt_dlsym(handle, "nothing");
/* Try assigning to the nothing variable. */ /* Try assigning to the nothing variable. */
if (pnothing) if (pnothing)
*pnothing = 1; *pnothing = 1;
@ -85,7 +85,7 @@ test_dl (char *filename)
ret = 1; ret = 1;
} }
pfoo1 = (int(*)())lt_dlsym(handle, "foo1"); pfoo1 = (int(*)())lt_dlsym(handle, "foo1");
/* Just call the functions and check return values. */ /* Just call the functions and check return values. */
if (pfoo1) if (pfoo1)
{ {
@ -95,7 +95,7 @@ test_dl (char *filename)
ret = 1; ret = 1;
} }
else { else {
pfoo2 = (int(*)())lt_dlsym(handle, "foo2"); pfoo2 = (int(*)())lt_dlsym(handle, "foo2");
if (pfoo2) if (pfoo2)
{ {
if ((*pfoo2) () == FOO_RET) if ((*pfoo2) () == FOO_RET)
@ -113,7 +113,7 @@ test_dl (char *filename)
return ret; return ret;
} }
int int
mlib_func (int argc, char **argv) mlib_func (int argc, char **argv)
{ {
int ret = 0; int ret = 0;

View File

@ -43,6 +43,6 @@ rm -f "$objlist"
echo "$linkresult" | ${EGREP} "spaces" >/dev/null 2>&1 && { echo "$linkresult" | ${EGREP} "spaces" >/dev/null 2>&1 && {
func_msg "$progname: -objectlist with spaces in filename not recognized." func_msg "$progname: -objectlist with spaces in filename not recognized."
exit $EXIT_FAILURE exit $EXIT_FAILURE
} }
exit $EXIT_SUCCESS exit $EXIT_SUCCESS

View File

@ -37,9 +37,9 @@
# will only cause the linker not to consider `*.so' libraries, but only # will only cause the linker not to consider `*.so' libraries, but only
# `*.a'. The latter, however, may still be shared images. :-/ # `*.a'. The latter, however, may still be shared images. :-/
# `-all-static' still works, however. # `-all-static' still works, however.
# #
# It will not work with dlpreloading until we fix its related bug. # It will not work with dlpreloading until we fix its related bug.
# #
# Let's try the latter until we know better. # Let's try the latter until we know better.
# - Test -Bstatic/-Bdynamic. It should work with all of: # - Test -Bstatic/-Bdynamic. It should work with all of:
@ -248,7 +248,7 @@ for withdep in no yes; do
$LIBTOOL --mode=install cp a1/liba1.la $libdir1/liba1.la $LIBTOOL --mode=install cp a1/liba1.la $libdir1/liba1.la
$LIBTOOL --mode=install cp a3/liba3.la $libdir3/liba3.la $LIBTOOL --mode=install cp a3/liba3.la $libdir3/liba3.la
$LIBTOOL --mode=clean rm -f a1/liba1.la a3/liba3.la $LIBTOOL --mode=clean rm -f a1/liba1.la a3/liba3.la
test "$withdep" = yes && $LIBTOOL --mode=clean rm -f a1/liba1dep.la test "$withdep" = yes && $LIBTOOL --mode=clean rm -f a1/liba1dep.la
# simulate a non-libtool lib: # simulate a non-libtool lib:
rm -f $libdir3/liba3.la rm -f $libdir3/liba3.la
@ -307,7 +307,7 @@ for withdep in no yes; do
### install the programs. ### install the programs.
# We can't install any program that links dynamically against liba2. # We can't install any program that links dynamically against liba2.
for st in -static -static-libtool-libs $can_link_all_static `$per_deplib && echo 2 12 23 123 123a`; do for st in -static -static-libtool-libs $can_link_all_static `$per_deplib && echo 2 12 23 123 123a`; do
echo "# m$st" echo "# m$st"
AT_CHECK([$LIBTOOL --mode=install cp m${st}$EXEEXT $bindir/m${st}$EXEEXT], [0], [ignore], [stderr]) AT_CHECK([$LIBTOOL --mode=install cp m${st}$EXEEXT $bindir/m${st}$EXEEXT], [0], [ignore], [stderr])
if $have_static; then if $have_static; then
@ -318,7 +318,7 @@ for withdep in no yes; do
### Run each program once so that relinking has happened. ### Run each program once so that relinking has happened.
func_fix_path $prefix1 $prefix2 $prefix3 func_fix_path $prefix1 $prefix2 $prefix3
func_test_exec -static -static-libtool-libs -all-static `$per_deplib && echo 1 2 3 12 13 23 31 123 123a` func_test_exec -static -static-libtool-libs -all-static `$per_deplib && echo 1 2 3 12 13 23 31 123 123a`
func_restore_path func_restore_path

View File

@ -129,7 +129,7 @@ AT_KEYWORDS([libtool])
noskip=: noskip=:
# Mac OS X. # Mac OS X.
# The linker has issues with this test. # The linker has issues with this test.
case $host in case $host in
*-darwin*) noskip=false ;; *-darwin*) noskip=false ;;
esac esac

View File

@ -442,7 +442,7 @@ module.lo: $(LIBTOOL) module.c
$(LTCOMPILE) -c module.c $(LTCOMPILE) -c module.c
]]) ]])
cat >> Makefile <<EOF cat >> Makefile <<EOF
SHELL = $SHELL SHELL = $SHELL
EOF EOF
]) ])
m4_popdef([_ARG_DIR]) m4_popdef([_ARG_DIR])