diff options
author | Aaron W. LaFramboise <aaronavay62@aaronwl.com> | 2005-03-30 02:55:13 +0000 |
---|---|---|
committer | Aaron W. LaFramboise <aaronavay62@aaronwl.com> | 2005-03-30 02:55:13 +0000 |
commit | e8a38df5d8d2502c3d3b3cd4054019d8d5748a90 (patch) | |
tree | 385a7d9222da45ab84094c0eabdbfb3263b22f01 | |
parent | efa9bda48249988ac6d0459f5331b73e0d43339e (diff) | |
download | gdb-e8a38df5d8d2502c3d3b3cd4054019d8d5748a90.zip gdb-e8a38df5d8d2502c3d3b3cd4054019d8d5748a90.tar.gz gdb-e8a38df5d8d2502c3d3b3cd4054019d8d5748a90.tar.bz2 |
* as.h [NEED_DECLARATION_FFS] (ffs): Prototype and alphabetize.
* config.in: Regenerate.
* configure: Regenerate.
* configure.in: Check for ffs decl and alphabetize.
-rw-r--r-- | gas/ChangeLog | 7 | ||||
-rw-r--r-- | gas/as.h | 21 | ||||
-rw-r--r-- | gas/config.in | 3 | ||||
-rwxr-xr-x | gas/configure | 192 | ||||
-rw-r--r-- | gas/configure.in | 12 |
5 files changed, 159 insertions, 76 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog index d6263e6..789b1a9 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,10 @@ +2005-03-30 Aaron W. LaFramboise <aaron98wiridge9@aaronwl.com> + + * as.h [NEED_DECLARATION_FFS] (ffs): Prototype and alphabetize. + * config.in: Regenerate. + * configure: Regenerate. + * configure.in: Check for ffs decl and alphabetize. + 2005-03-29 Daniel Jacobowitz <dan@codesourcery.com> Phil Blundell <philb@gnu.org> @@ -127,21 +127,24 @@ extern void *alloca (); #endif /* !__MWERKS__ */ /* Other stuff from config.h. */ -#ifdef NEED_DECLARATION_STRSTR -extern char *strstr (); +#ifdef NEED_DECLARATION_ENVIRON +extern char **environ; #endif -#ifdef NEED_DECLARATION_MALLOC -extern PTR malloc (); -extern PTR realloc (); +#ifdef NEED_DECLARATION_ERRNO +extern int errno; +#endif +#ifdef NEED_DECLARATION_FFS +extern int ffs (int); #endif #ifdef NEED_DECLARATION_FREE extern void free (); #endif -#ifdef NEED_DECLARATION_ERRNO -extern int errno; +#ifdef NEED_DECLARATION_MALLOC +extern PTR malloc (); +extern PTR realloc (); #endif -#ifdef NEED_DECLARATION_ENVIRON -extern char **environ; +#ifdef NEED_DECLARATION_STRSTR +extern char *strstr (); #endif /* This is needed for VMS. */ diff --git a/gas/config.in b/gas/config.in index 94b7215..6b5b8dc 100644 --- a/gas/config.in +++ b/gas/config.in @@ -183,6 +183,9 @@ /* Define if errno is not declared in system header files. */ #undef NEED_DECLARATION_ERRNO +/* 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/gas/configure b/gas/configure index 1ffb401..62c3df7 100755 --- a/gas/configure +++ b/gas/configure @@ -10444,9 +10444,84 @@ gas_test_headers=" #endif " -echo "$as_me:$LINENO: checking whether declaration is required for strstr" >&5 -echo $ECHO_N "checking whether declaration is required for strstr... $ECHO_C" >&6 -if test "${gas_cv_decl_needed_strstr+set}" = set; then +# Does errno.h declare errno, or do we have to add a separate declaration +# for it? + +echo "$as_me:$LINENO: checking whether declaration is required for errno" >&5 +echo $ECHO_N "checking whether declaration is required for errno... $ECHO_C" >&6 +if test "${gas_cv_decl_needed_errno+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. */ + +#ifdef HAVE_ERRNO_H +#include <errno.h> +#endif + +int +main () +{ + +typedef int f; +f x; +x = (f) errno; + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 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_exeext' + { (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 + gas_cv_decl_needed_errno=no +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +gas_cv_decl_needed_errno=yes +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $gas_cv_decl_needed_errno" >&5 +echo "${ECHO_T}$gas_cv_decl_needed_errno" >&6 +if test $gas_cv_decl_needed_errno = yes; then + +cat >>confdefs.h <<\_ACEOF +#define NEED_DECLARATION_ERRNO 1 +_ACEOF + +fi + + + +echo "$as_me:$LINENO: checking whether declaration is required for environ" >&5 +echo $ECHO_N "checking whether declaration is required for environ... $ECHO_C" >&6 +if test "${gas_cv_decl_needed_environ+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -10460,9 +10535,9 @@ int main () { -typedef char *(*f)(); +typedef char **f; f x; -x = (f) strstr; +x = (f) environ; ; return 0; @@ -10490,30 +10565,30 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - gas_cv_decl_needed_strstr=no + gas_cv_decl_needed_environ=no else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -gas_cv_decl_needed_strstr=yes +gas_cv_decl_needed_environ=yes fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $gas_cv_decl_needed_strstr" >&5 -echo "${ECHO_T}$gas_cv_decl_needed_strstr" >&6 -if test $gas_cv_decl_needed_strstr = yes; then +echo "$as_me:$LINENO: result: $gas_cv_decl_needed_environ" >&5 +echo "${ECHO_T}$gas_cv_decl_needed_environ" >&6 +if test $gas_cv_decl_needed_environ = yes; then cat >>confdefs.h <<\_ACEOF -#define NEED_DECLARATION_STRSTR 1 +#define NEED_DECLARATION_ENVIRON 1 _ACEOF fi -echo "$as_me:$LINENO: checking whether declaration is required for malloc" >&5 -echo $ECHO_N "checking whether declaration is required for malloc... $ECHO_C" >&6 -if test "${gas_cv_decl_needed_malloc+set}" = set; then +echo "$as_me:$LINENO: checking whether declaration is required for ffs" >&5 +echo $ECHO_N "checking whether declaration is required for ffs... $ECHO_C" >&6 +if test "${gas_cv_decl_needed_ffs+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -10527,9 +10602,9 @@ int main () { -typedef char *(*f)(); +typedef int (*f)(int); f x; -x = (f) malloc; +x = (f) ffs; ; return 0; @@ -10557,22 +10632,22 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - gas_cv_decl_needed_malloc=no + gas_cv_decl_needed_ffs=no else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -gas_cv_decl_needed_malloc=yes +gas_cv_decl_needed_ffs=yes fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $gas_cv_decl_needed_malloc" >&5 -echo "${ECHO_T}$gas_cv_decl_needed_malloc" >&6 -if test $gas_cv_decl_needed_malloc = yes; then +echo "$as_me:$LINENO: result: $gas_cv_decl_needed_ffs" >&5 +echo "${ECHO_T}$gas_cv_decl_needed_ffs" >&6 +if test $gas_cv_decl_needed_ffs = yes; then cat >>confdefs.h <<\_ACEOF -#define NEED_DECLARATION_MALLOC 1 +#define NEED_DECLARATION_FFS 1 _ACEOF fi @@ -10645,9 +10720,9 @@ _ACEOF fi -echo "$as_me:$LINENO: checking whether declaration is required for sbrk" >&5 -echo $ECHO_N "checking whether declaration is required for sbrk... $ECHO_C" >&6 -if test "${gas_cv_decl_needed_sbrk+set}" = set; then +echo "$as_me:$LINENO: checking whether declaration is required for malloc" >&5 +echo $ECHO_N "checking whether declaration is required for malloc... $ECHO_C" >&6 +if test "${gas_cv_decl_needed_malloc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -10663,7 +10738,7 @@ main () typedef char *(*f)(); f x; -x = (f) sbrk; +x = (f) malloc; ; return 0; @@ -10691,30 +10766,30 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - gas_cv_decl_needed_sbrk=no + gas_cv_decl_needed_malloc=no else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -gas_cv_decl_needed_sbrk=yes +gas_cv_decl_needed_malloc=yes fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $gas_cv_decl_needed_sbrk" >&5 -echo "${ECHO_T}$gas_cv_decl_needed_sbrk" >&6 -if test $gas_cv_decl_needed_sbrk = yes; then +echo "$as_me:$LINENO: result: $gas_cv_decl_needed_malloc" >&5 +echo "${ECHO_T}$gas_cv_decl_needed_malloc" >&6 +if test $gas_cv_decl_needed_malloc = yes; then cat >>confdefs.h <<\_ACEOF -#define NEED_DECLARATION_SBRK 1 +#define NEED_DECLARATION_MALLOC 1 _ACEOF fi -echo "$as_me:$LINENO: checking whether declaration is required for environ" >&5 -echo $ECHO_N "checking whether declaration is required for environ... $ECHO_C" >&6 -if test "${gas_cv_decl_needed_environ+set}" = set; then +echo "$as_me:$LINENO: checking whether declaration is required for sbrk" >&5 +echo $ECHO_N "checking whether declaration is required for sbrk... $ECHO_C" >&6 +if test "${gas_cv_decl_needed_sbrk+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -10728,9 +10803,9 @@ int main () { -typedef char **f; +typedef char *(*f)(); f x; -x = (f) environ; +x = (f) sbrk; ; return 0; @@ -10758,33 +10833,30 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - gas_cv_decl_needed_environ=no + gas_cv_decl_needed_sbrk=no else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -gas_cv_decl_needed_environ=yes +gas_cv_decl_needed_sbrk=yes fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $gas_cv_decl_needed_environ" >&5 -echo "${ECHO_T}$gas_cv_decl_needed_environ" >&6 -if test $gas_cv_decl_needed_environ = yes; then +echo "$as_me:$LINENO: result: $gas_cv_decl_needed_sbrk" >&5 +echo "${ECHO_T}$gas_cv_decl_needed_sbrk" >&6 +if test $gas_cv_decl_needed_sbrk = yes; then cat >>confdefs.h <<\_ACEOF -#define NEED_DECLARATION_ENVIRON 1 +#define NEED_DECLARATION_SBRK 1 _ACEOF fi -# Does errno.h declare errno, or do we have to add a separate declaration -# for it? - -echo "$as_me:$LINENO: checking whether declaration is required for errno" >&5 -echo $ECHO_N "checking whether declaration is required for errno... $ECHO_C" >&6 -if test "${gas_cv_decl_needed_errno+set}" = set; then +echo "$as_me:$LINENO: checking whether declaration is required for strstr" >&5 +echo $ECHO_N "checking whether declaration is required for strstr... $ECHO_C" >&6 +if test "${gas_cv_decl_needed_strstr+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -10793,18 +10865,14 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - -#ifdef HAVE_ERRNO_H -#include <errno.h> -#endif - +$gas_test_headers int main () { -typedef int f; +typedef char *(*f)(); f x; -x = (f) errno; +x = (f) strstr; ; return 0; @@ -10832,22 +10900,22 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - gas_cv_decl_needed_errno=no + gas_cv_decl_needed_strstr=no else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -gas_cv_decl_needed_errno=yes +gas_cv_decl_needed_strstr=yes fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $gas_cv_decl_needed_errno" >&5 -echo "${ECHO_T}$gas_cv_decl_needed_errno" >&6 -if test $gas_cv_decl_needed_errno = yes; then +echo "$as_me:$LINENO: result: $gas_cv_decl_needed_strstr" >&5 +echo "${ECHO_T}$gas_cv_decl_needed_strstr" >&6 +if test $gas_cv_decl_needed_strstr = yes; then cat >>confdefs.h <<\_ACEOF -#define NEED_DECLARATION_ERRNO 1 +#define NEED_DECLARATION_STRSTR 1 _ACEOF fi diff --git a/gas/configure.in b/gas/configure.in index e6a7267..790a8f2 100644 --- a/gas/configure.in +++ b/gas/configure.in @@ -707,11 +707,6 @@ gas_test_headers=" #include <unistd.h> #endif " -GAS_CHECK_DECL_NEEDED(strstr, f, char *(*f)(), $gas_test_headers) -GAS_CHECK_DECL_NEEDED(malloc, f, char *(*f)(), $gas_test_headers) -GAS_CHECK_DECL_NEEDED(free, f, void (*f)(), $gas_test_headers) -GAS_CHECK_DECL_NEEDED(sbrk, f, char *(*f)(), $gas_test_headers) -GAS_CHECK_DECL_NEEDED(environ, f, char **f, $gas_test_headers) # Does errno.h declare errno, or do we have to add a separate declaration # for it? @@ -721,6 +716,13 @@ GAS_CHECK_DECL_NEEDED(errno, f, int f, [ #endif ]) +GAS_CHECK_DECL_NEEDED(environ, f, char **f, $gas_test_headers) +GAS_CHECK_DECL_NEEDED(ffs, f, int (*f)(int), $gas_test_headers) +GAS_CHECK_DECL_NEEDED(free, f, void (*f)(), $gas_test_headers) +GAS_CHECK_DECL_NEEDED(malloc, f, char *(*f)(), $gas_test_headers) +GAS_CHECK_DECL_NEEDED(sbrk, f, char *(*f)(), $gas_test_headers) +GAS_CHECK_DECL_NEEDED(strstr, f, char *(*f)(), $gas_test_headers) + dnl This must come last. dnl We used to make symlinks to files in the source directory, but now |