mirror of
https://github.com/darlinghq/darling-gdb.git
synced 2024-11-23 12:09:49 +00:00
* configure.in: Fix the check for basename declaration. Add check
for declarations of ftello, ftello64, fseeko, fseeko64. * configure: Regenerate. * config.in: Ditto. * sysdep.h: If needed, declare ftello, ftello64, fseeko, fseeko64.
This commit is contained in:
parent
30e6617391
commit
ec7b76fec3
@ -1,3 +1,11 @@
|
||||
2005-04-20 Jerome Guitton <guitton@gnat.com>
|
||||
|
||||
* configure.in: Fix the check for basename declaration. Add check
|
||||
for declarations of ftello, ftello64, fseeko, fseeko64.
|
||||
* configure: Regenerate.
|
||||
* config.in: Ditto.
|
||||
* sysdep.h: If needed, declare ftello, ftello64, fseeko, fseeko64.
|
||||
|
||||
2005-04-19 David S. Miller <davem@davemloft.net>
|
||||
|
||||
* elfxx-sparc.c: New file.
|
||||
|
@ -28,6 +28,22 @@
|
||||
don't. */
|
||||
#undef HAVE_DECL_BASENAME
|
||||
|
||||
/* Define to 1 if you have the declaration of `fseeko', and to 0 if you don't.
|
||||
*/
|
||||
#undef HAVE_DECL_FSEEKO
|
||||
|
||||
/* Define to 1 if you have the declaration of `fseeko64', and to 0 if you
|
||||
don't. */
|
||||
#undef HAVE_DECL_FSEEKO64
|
||||
|
||||
/* Define to 1 if you have the declaration of `ftello', and to 0 if you don't.
|
||||
*/
|
||||
#undef HAVE_DECL_FTELLO
|
||||
|
||||
/* Define to 1 if you have the declaration of `ftello64', and to 0 if you
|
||||
don't. */
|
||||
#undef HAVE_DECL_FTELLO64
|
||||
|
||||
/* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'.
|
||||
*/
|
||||
#undef HAVE_DIRENT_H
|
||||
|
291
bfd/configure
vendored
291
bfd/configure
vendored
@ -9556,8 +9556,7 @@ _ACEOF
|
||||
cat confdefs.h >>conftest.$ac_ext
|
||||
cat >>conftest.$ac_ext <<_ACEOF
|
||||
/* end confdefs.h. */
|
||||
#include "sysdep.h"
|
||||
|
||||
$ac_includes_default
|
||||
int
|
||||
main ()
|
||||
{
|
||||
@ -9618,6 +9617,294 @@ _ACEOF
|
||||
fi
|
||||
|
||||
|
||||
echo "$as_me:$LINENO: checking whether ftello is declared" >&5
|
||||
echo $ECHO_N "checking whether ftello is declared... $ECHO_C" >&6
|
||||
if test "${ac_cv_have_decl_ftello+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. */
|
||||
$ac_includes_default
|
||||
int
|
||||
main ()
|
||||
{
|
||||
#ifndef ftello
|
||||
char *p = (char *) ftello;
|
||||
#endif
|
||||
|
||||
;
|
||||
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
|
||||
ac_cv_have_decl_ftello=yes
|
||||
else
|
||||
echo "$as_me: failed program was:" >&5
|
||||
sed 's/^/| /' conftest.$ac_ext >&5
|
||||
|
||||
ac_cv_have_decl_ftello=no
|
||||
fi
|
||||
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||
fi
|
||||
echo "$as_me:$LINENO: result: $ac_cv_have_decl_ftello" >&5
|
||||
echo "${ECHO_T}$ac_cv_have_decl_ftello" >&6
|
||||
if test $ac_cv_have_decl_ftello = yes; then
|
||||
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
#define HAVE_DECL_FTELLO 1
|
||||
_ACEOF
|
||||
|
||||
|
||||
else
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
#define HAVE_DECL_FTELLO 0
|
||||
_ACEOF
|
||||
|
||||
|
||||
fi
|
||||
|
||||
|
||||
echo "$as_me:$LINENO: checking whether ftello64 is declared" >&5
|
||||
echo $ECHO_N "checking whether ftello64 is declared... $ECHO_C" >&6
|
||||
if test "${ac_cv_have_decl_ftello64+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. */
|
||||
$ac_includes_default
|
||||
int
|
||||
main ()
|
||||
{
|
||||
#ifndef ftello64
|
||||
char *p = (char *) ftello64;
|
||||
#endif
|
||||
|
||||
;
|
||||
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
|
||||
ac_cv_have_decl_ftello64=yes
|
||||
else
|
||||
echo "$as_me: failed program was:" >&5
|
||||
sed 's/^/| /' conftest.$ac_ext >&5
|
||||
|
||||
ac_cv_have_decl_ftello64=no
|
||||
fi
|
||||
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||
fi
|
||||
echo "$as_me:$LINENO: result: $ac_cv_have_decl_ftello64" >&5
|
||||
echo "${ECHO_T}$ac_cv_have_decl_ftello64" >&6
|
||||
if test $ac_cv_have_decl_ftello64 = yes; then
|
||||
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
#define HAVE_DECL_FTELLO64 1
|
||||
_ACEOF
|
||||
|
||||
|
||||
else
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
#define HAVE_DECL_FTELLO64 0
|
||||
_ACEOF
|
||||
|
||||
|
||||
fi
|
||||
|
||||
|
||||
echo "$as_me:$LINENO: checking whether fseeko is declared" >&5
|
||||
echo $ECHO_N "checking whether fseeko is declared... $ECHO_C" >&6
|
||||
if test "${ac_cv_have_decl_fseeko+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. */
|
||||
$ac_includes_default
|
||||
int
|
||||
main ()
|
||||
{
|
||||
#ifndef fseeko
|
||||
char *p = (char *) fseeko;
|
||||
#endif
|
||||
|
||||
;
|
||||
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
|
||||
ac_cv_have_decl_fseeko=yes
|
||||
else
|
||||
echo "$as_me: failed program was:" >&5
|
||||
sed 's/^/| /' conftest.$ac_ext >&5
|
||||
|
||||
ac_cv_have_decl_fseeko=no
|
||||
fi
|
||||
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||
fi
|
||||
echo "$as_me:$LINENO: result: $ac_cv_have_decl_fseeko" >&5
|
||||
echo "${ECHO_T}$ac_cv_have_decl_fseeko" >&6
|
||||
if test $ac_cv_have_decl_fseeko = yes; then
|
||||
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
#define HAVE_DECL_FSEEKO 1
|
||||
_ACEOF
|
||||
|
||||
|
||||
else
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
#define HAVE_DECL_FSEEKO 0
|
||||
_ACEOF
|
||||
|
||||
|
||||
fi
|
||||
|
||||
|
||||
echo "$as_me:$LINENO: checking whether fseeko64 is declared" >&5
|
||||
echo $ECHO_N "checking whether fseeko64 is declared... $ECHO_C" >&6
|
||||
if test "${ac_cv_have_decl_fseeko64+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. */
|
||||
$ac_includes_default
|
||||
int
|
||||
main ()
|
||||
{
|
||||
#ifndef fseeko64
|
||||
char *p = (char *) fseeko64;
|
||||
#endif
|
||||
|
||||
;
|
||||
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
|
||||
ac_cv_have_decl_fseeko64=yes
|
||||
else
|
||||
echo "$as_me: failed program was:" >&5
|
||||
sed 's/^/| /' conftest.$ac_ext >&5
|
||||
|
||||
ac_cv_have_decl_fseeko64=no
|
||||
fi
|
||||
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||
fi
|
||||
echo "$as_me:$LINENO: result: $ac_cv_have_decl_fseeko64" >&5
|
||||
echo "${ECHO_T}$ac_cv_have_decl_fseeko64" >&6
|
||||
if test $ac_cv_have_decl_fseeko64 = yes; then
|
||||
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
#define HAVE_DECL_FSEEKO64 1
|
||||
_ACEOF
|
||||
|
||||
|
||||
else
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
#define HAVE_DECL_FSEEKO64 0
|
||||
_ACEOF
|
||||
|
||||
|
||||
fi
|
||||
|
||||
|
||||
|
||||
|
||||
case "${host}" in
|
||||
|
@ -127,7 +127,11 @@ AC_HEADER_DIRENT
|
||||
AC_CHECK_FUNCS(fcntl getpagesize setitimer sysconf fdopen getuid getgid)
|
||||
AC_CHECK_FUNCS(strtoull)
|
||||
|
||||
AC_CHECK_DECLS(basename, , , [#include "sysdep.h"])
|
||||
AC_CHECK_DECLS(basename)
|
||||
AC_CHECK_DECLS(ftello)
|
||||
AC_CHECK_DECLS(ftello64)
|
||||
AC_CHECK_DECLS(fseeko)
|
||||
AC_CHECK_DECLS(fseeko64)
|
||||
|
||||
BFD_BINARY_FOPEN
|
||||
|
||||
|
24
bfd/sysdep.h
24
bfd/sysdep.h
@ -129,6 +129,30 @@ extern PTR realloc ();
|
||||
extern char *strstr ();
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_FTELLO
|
||||
#if !HAVE_DECL_FTELLO
|
||||
extern off_t ftello (FILE *stream);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_FTELLO64
|
||||
#if !HAVE_DECL_FTELLO64
|
||||
extern off64_t ftello64 (FILE *stream);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_FSEEKO
|
||||
#if !HAVE_DECL_FSEEKO
|
||||
extern int fseeko (FILE *stream, off_t offset, int whence);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_FSEEKO64
|
||||
#if !HAVE_DECL_FSEEKO64
|
||||
extern int fseeko64 (FILE *stream, off64_t offset, int whence);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* Define offsetof for those systems which lack it */
|
||||
|
||||
#ifndef offsetof
|
||||
|
Loading…
Reference in New Issue
Block a user