diff options
author | Aaron W. LaFramboise <aaronavay62@aaronwl.com> | 2005-03-30 02:46:25 +0000 |
---|---|---|
committer | Aaron W. LaFramboise <aaronavay62@aaronwl.com> | 2005-03-30 02:46:25 +0000 |
commit | efa9bda48249988ac6d0459f5331b73e0d43339e (patch) | |
tree | 6e8eebae84ede3a6a8372ca9121f5dc23901133c | |
parent | 9ac9941eecc39478176fa5be5c2e92ca397551f1 (diff) | |
download | fsf-binutils-gdb-efa9bda48249988ac6d0459f5331b73e0d43339e.zip fsf-binutils-gdb-efa9bda48249988ac6d0459f5331b73e0d43339e.tar.gz fsf-binutils-gdb-efa9bda48249988ac6d0459f5331b73e0d43339e.tar.bz2 |
* configure.in: Check for ffs decl and alphabetize.
* config.in: Regenerate.
* configure: Regenerate.
* sysdep.h [NEED_DECLARATION_FFS] (ffs): Prototype and
alphabetize.
-rw-r--r-- | bfd/ChangeLog | 8 | ||||
-rw-r--r-- | bfd/config.in | 3 | ||||
-rwxr-xr-x | bfd/configure | 176 | ||||
-rw-r--r-- | bfd/configure.in | 7 | ||||
-rw-r--r-- | bfd/sysdep.h | 20 |
5 files changed, 153 insertions, 61 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 0b64c62..146f92d 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,11 @@ +2005-03-29 Aaron W. LaFramboise <aaron98wiridge9@aaronwl.com> + + * configure.in: Check for ffs decl and alphabetize. + * config.in: Regenerate. + * configure: Regenerate. + * sysdep.h [NEED_DECLARATION_FFS] (ffs): Prototype and + alphabetize. + 2005-03-29 Fred Fish <fnf@specifixinc.com> * dwarf2.c (struct comp_unit): Fix typo. diff --git a/bfd/config.in b/bfd/config.in index a379372..3ea2d28 100644 --- a/bfd/config.in +++ b/bfd/config.in @@ -237,6 +237,9 @@ /* Define to 1 if you have the `__argz_stringify' function. */ #undef HAVE___ARGZ_STRINGIFY +/* Define if ffs is not declared in system header files. */ +#undef NEED_DECLARATION_FFS + /* Define if free is not declared in system header files. */ #undef NEED_DECLARATION_FREE diff --git a/bfd/configure b/bfd/configure index ff8d47f..7f9654b 100755 --- a/bfd/configure +++ b/bfd/configure @@ -9549,9 +9549,9 @@ _ACEOF ;; esac -echo "$as_me:$LINENO: checking whether strstr must be declared" >&5 -echo $ECHO_N "checking whether strstr must be declared... $ECHO_C" >&6 -if test "${bfd_cv_decl_needed_strstr+set}" = set; then +echo "$as_me:$LINENO: checking whether ffs must be declared" >&5 +echo $ECHO_N "checking whether ffs must be declared... $ECHO_C" >&6 +if test "${bfd_cv_decl_needed_ffs+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -9578,7 +9578,7 @@ cat >>conftest.$ac_ext <<_ACEOF int main () { -char *(*pfn) = (char *(*)) strstr +char *(*pfn) = (char *(*)) ffs ; return 0; } @@ -9605,29 +9605,29 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - bfd_cv_decl_needed_strstr=no + bfd_cv_decl_needed_ffs=no else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -bfd_cv_decl_needed_strstr=yes +bfd_cv_decl_needed_ffs=yes fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $bfd_cv_decl_needed_strstr" >&5 -echo "${ECHO_T}$bfd_cv_decl_needed_strstr" >&6 -if test $bfd_cv_decl_needed_strstr = yes; then +echo "$as_me:$LINENO: result: $bfd_cv_decl_needed_ffs" >&5 +echo "${ECHO_T}$bfd_cv_decl_needed_ffs" >&6 +if test $bfd_cv_decl_needed_ffs = yes; then cat >>confdefs.h <<\_ACEOF -#define NEED_DECLARATION_STRSTR 1 +#define NEED_DECLARATION_FFS 1 _ACEOF fi -echo "$as_me:$LINENO: checking whether malloc must be declared" >&5 -echo $ECHO_N "checking whether malloc must be declared... $ECHO_C" >&6 -if test "${bfd_cv_decl_needed_malloc+set}" = set; then +echo "$as_me:$LINENO: checking whether free must be declared" >&5 +echo $ECHO_N "checking whether free must be declared... $ECHO_C" >&6 +if test "${bfd_cv_decl_needed_free+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -9654,7 +9654,7 @@ cat >>conftest.$ac_ext <<_ACEOF int main () { -char *(*pfn) = (char *(*)) malloc +char *(*pfn) = (char *(*)) free ; return 0; } @@ -9681,29 +9681,29 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - bfd_cv_decl_needed_malloc=no + bfd_cv_decl_needed_free=no else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -bfd_cv_decl_needed_malloc=yes +bfd_cv_decl_needed_free=yes fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $bfd_cv_decl_needed_malloc" >&5 -echo "${ECHO_T}$bfd_cv_decl_needed_malloc" >&6 -if test $bfd_cv_decl_needed_malloc = yes; then +echo "$as_me:$LINENO: result: $bfd_cv_decl_needed_free" >&5 +echo "${ECHO_T}$bfd_cv_decl_needed_free" >&6 +if test $bfd_cv_decl_needed_free = yes; then cat >>confdefs.h <<\_ACEOF -#define NEED_DECLARATION_MALLOC 1 +#define NEED_DECLARATION_FREE 1 _ACEOF fi -echo "$as_me:$LINENO: checking whether realloc must be declared" >&5 -echo $ECHO_N "checking whether realloc must be declared... $ECHO_C" >&6 -if test "${bfd_cv_decl_needed_realloc+set}" = set; then +echo "$as_me:$LINENO: checking whether getenv must be declared" >&5 +echo $ECHO_N "checking whether getenv must be declared... $ECHO_C" >&6 +if test "${bfd_cv_decl_needed_getenv+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -9730,7 +9730,7 @@ cat >>conftest.$ac_ext <<_ACEOF int main () { -char *(*pfn) = (char *(*)) realloc +char *(*pfn) = (char *(*)) getenv ; return 0; } @@ -9757,29 +9757,29 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - bfd_cv_decl_needed_realloc=no + bfd_cv_decl_needed_getenv=no else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -bfd_cv_decl_needed_realloc=yes +bfd_cv_decl_needed_getenv=yes fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $bfd_cv_decl_needed_realloc" >&5 -echo "${ECHO_T}$bfd_cv_decl_needed_realloc" >&6 -if test $bfd_cv_decl_needed_realloc = yes; then +echo "$as_me:$LINENO: result: $bfd_cv_decl_needed_getenv" >&5 +echo "${ECHO_T}$bfd_cv_decl_needed_getenv" >&6 +if test $bfd_cv_decl_needed_getenv = yes; then cat >>confdefs.h <<\_ACEOF -#define NEED_DECLARATION_REALLOC 1 +#define NEED_DECLARATION_GETENV 1 _ACEOF fi -echo "$as_me:$LINENO: checking whether free must be declared" >&5 -echo $ECHO_N "checking whether free must be declared... $ECHO_C" >&6 -if test "${bfd_cv_decl_needed_free+set}" = set; then +echo "$as_me:$LINENO: checking whether malloc must be declared" >&5 +echo $ECHO_N "checking whether malloc must be declared... $ECHO_C" >&6 +if test "${bfd_cv_decl_needed_malloc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -9806,7 +9806,7 @@ cat >>conftest.$ac_ext <<_ACEOF int main () { -char *(*pfn) = (char *(*)) free +char *(*pfn) = (char *(*)) malloc ; return 0; } @@ -9833,29 +9833,29 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - bfd_cv_decl_needed_free=no + bfd_cv_decl_needed_malloc=no else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -bfd_cv_decl_needed_free=yes +bfd_cv_decl_needed_malloc=yes fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $bfd_cv_decl_needed_free" >&5 -echo "${ECHO_T}$bfd_cv_decl_needed_free" >&6 -if test $bfd_cv_decl_needed_free = yes; then +echo "$as_me:$LINENO: result: $bfd_cv_decl_needed_malloc" >&5 +echo "${ECHO_T}$bfd_cv_decl_needed_malloc" >&6 +if test $bfd_cv_decl_needed_malloc = yes; then cat >>confdefs.h <<\_ACEOF -#define NEED_DECLARATION_FREE 1 +#define NEED_DECLARATION_MALLOC 1 _ACEOF fi -echo "$as_me:$LINENO: checking whether getenv must be declared" >&5 -echo $ECHO_N "checking whether getenv must be declared... $ECHO_C" >&6 -if test "${bfd_cv_decl_needed_getenv+set}" = set; then +echo "$as_me:$LINENO: checking whether realloc must be declared" >&5 +echo $ECHO_N "checking whether realloc must be declared... $ECHO_C" >&6 +if test "${bfd_cv_decl_needed_realloc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -9882,7 +9882,7 @@ cat >>conftest.$ac_ext <<_ACEOF int main () { -char *(*pfn) = (char *(*)) getenv +char *(*pfn) = (char *(*)) realloc ; return 0; } @@ -9909,22 +9909,98 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - bfd_cv_decl_needed_getenv=no + bfd_cv_decl_needed_realloc=no else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -bfd_cv_decl_needed_getenv=yes +bfd_cv_decl_needed_realloc=yes fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $bfd_cv_decl_needed_getenv" >&5 -echo "${ECHO_T}$bfd_cv_decl_needed_getenv" >&6 -if test $bfd_cv_decl_needed_getenv = yes; then +echo "$as_me:$LINENO: result: $bfd_cv_decl_needed_realloc" >&5 +echo "${ECHO_T}$bfd_cv_decl_needed_realloc" >&6 +if test $bfd_cv_decl_needed_realloc = yes; then cat >>confdefs.h <<\_ACEOF -#define NEED_DECLARATION_GETENV 1 +#define NEED_DECLARATION_REALLOC 1 +_ACEOF + +fi + +echo "$as_me:$LINENO: checking whether strstr must be declared" >&5 +echo $ECHO_N "checking whether strstr must be declared... $ECHO_C" >&6 +if test "${bfd_cv_decl_needed_strstr+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#include <stdio.h> +#ifdef HAVE_STRING_H +#include <string.h> +#else +#ifdef HAVE_STRINGS_H +#include <strings.h> +#endif +#endif +#ifdef HAVE_STDLIB_H +#include <stdlib.h> +#endif +#ifdef HAVE_UNISTD_H +#include <unistd.h> +#endif +int +main () +{ +char *(*pfn) = (char *(*)) strstr + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + bfd_cv_decl_needed_strstr=no +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +bfd_cv_decl_needed_strstr=yes +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +echo "$as_me:$LINENO: result: $bfd_cv_decl_needed_strstr" >&5 +echo "${ECHO_T}$bfd_cv_decl_needed_strstr" >&6 +if test $bfd_cv_decl_needed_strstr = yes; then + +cat >>confdefs.h <<\_ACEOF +#define NEED_DECLARATION_STRSTR 1 _ACEOF fi diff --git a/bfd/configure.in b/bfd/configure.in index 3735490..3578403 100644 --- a/bfd/configure.in +++ b/bfd/configure.in @@ -164,11 +164,12 @@ AC_CHECK_FUNCS(strtoull) BFD_BINARY_FOPEN -BFD_NEED_DECLARATION(strstr) -BFD_NEED_DECLARATION(malloc) -BFD_NEED_DECLARATION(realloc) +BFD_NEED_DECLARATION(ffs) BFD_NEED_DECLARATION(free) BFD_NEED_DECLARATION(getenv) +BFD_NEED_DECLARATION(malloc) +BFD_NEED_DECLARATION(realloc) +BFD_NEED_DECLARATION(strstr) # If we are configured native, pick a core file support file. COREFILE= diff --git a/bfd/sysdep.h b/bfd/sysdep.h index 1954470..e94491d 100644 --- a/bfd/sysdep.h +++ b/bfd/sysdep.h @@ -105,8 +105,16 @@ extern char *strrchr (); #include "filenames.h" -#ifdef NEED_DECLARATION_STRSTR -extern char *strstr (); +#ifdef NEED_DECLARATION_FFS +extern int ffs (int); +#endif + +#ifdef NEED_DECLARATION_FREE +extern void free (); +#endif + +#ifdef NEED_DECLARATION_GETENV +extern char *getenv (); #endif #ifdef NEED_DECLARATION_MALLOC @@ -117,12 +125,8 @@ extern PTR malloc (); extern PTR realloc (); #endif -#ifdef NEED_DECLARATION_FREE -extern void free (); -#endif - -#ifdef NEED_DECLARATION_GETENV -extern char *getenv (); +#ifdef NEED_DECLARATION_STRSTR +extern char *strstr (); #endif /* Define offsetof for those systems which lack it */ |