mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2025-01-30 12:44:10 +08:00
* configure.in (mips-sony-bsd*): Fix typo in AC_DEFINE.
(AC_CHECK_HEADERS): Check for sys/time.h (AC_HEADER_TIME): Add macro. * configure: Rebuild. * sysdep.h: Use TIME_WITH_SYS_TIME and HAVE_SYS_TIME_H to control what combination of <time> and <sys/time.h> get included.
This commit is contained in:
parent
72c9954b87
commit
ab1aa5cd6c
@ -1,3 +1,13 @@
|
||||
Thu Apr 4 18:49:09 1996 Fred Fish <fnf@cygnus.com>
|
||||
|
||||
* configure.in (mips-sony-bsd*): Fix typo in AC_DEFINE.
|
||||
(AC_CHECK_HEADERS): Check for sys/time.h
|
||||
(AC_HEADER_TIME): Add macro.
|
||||
* configure: Rebuild.
|
||||
* sysdep.h: Use TIME_WITH_SYS_TIME and HAVE_SYS_TIME_H
|
||||
to control what combination of <time> and <sys/time.h>
|
||||
get included.
|
||||
|
||||
Tue Apr 2 13:11:53 1996 Doug Evans <dje@canuck.cygnus.com>
|
||||
|
||||
* aoutf1.h (sunos_32_set_arch_mach): Handle M_SPARCLET.
|
||||
|
66
bfd/configure
vendored
66
bfd/configure
vendored
@ -1172,7 +1172,7 @@ else
|
||||
fi
|
||||
done
|
||||
|
||||
for ac_hdr in fcntl.h sys/file.h
|
||||
for ac_hdr in fcntl.h sys/file.h sys/time.h
|
||||
do
|
||||
ac_safe=`echo "$ac_hdr" | tr './\055' '___'`
|
||||
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
|
||||
@ -1209,6 +1209,40 @@ else
|
||||
fi
|
||||
done
|
||||
|
||||
echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
|
||||
if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 1218 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <sys/types.h>
|
||||
#include <sys/time.h>
|
||||
#include <time.h>
|
||||
int main() { return 0; }
|
||||
int t() {
|
||||
struct tm *tp;
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:1228: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
rm -rf conftest*
|
||||
ac_cv_header_time=yes
|
||||
else
|
||||
rm -rf conftest*
|
||||
ac_cv_header_time=no
|
||||
fi
|
||||
rm -f conftest*
|
||||
|
||||
fi
|
||||
|
||||
echo "$ac_t""$ac_cv_header_time" 1>&6
|
||||
if test $ac_cv_header_time = yes; then
|
||||
cat >> confdefs.h <<\EOF
|
||||
#define TIME_WITH_SYS_TIME 1
|
||||
EOF
|
||||
|
||||
fi
|
||||
|
||||
for ac_func in fcntl getpagesize
|
||||
do
|
||||
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
|
||||
@ -1216,7 +1250,7 @@ if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 1220 "configure"
|
||||
#line 1254 "configure"
|
||||
#include "confdefs.h"
|
||||
/* System header to define __stub macros and hopefully few prototypes,
|
||||
which can conflict with char $ac_func(); below. */
|
||||
@ -1238,7 +1272,7 @@ $ac_func();
|
||||
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:1242: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
|
||||
if { (eval echo configure:1276: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
|
||||
rm -rf conftest*
|
||||
eval "ac_cv_func_$ac_func=yes"
|
||||
else
|
||||
@ -1275,7 +1309,7 @@ if eval "test \"`echo '$''{'bfd_cv_decl_needed_malloc'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 1279 "configure"
|
||||
#line 1313 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
#include <stdio.h>
|
||||
@ -1290,7 +1324,7 @@ int t() {
|
||||
char *(*pfn) = (char *(*)) malloc
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:1294: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
if { (eval echo configure:1328: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
rm -rf conftest*
|
||||
bfd_cv_decl_needed_malloc=no
|
||||
else
|
||||
@ -1315,7 +1349,7 @@ if eval "test \"`echo '$''{'bfd_cv_decl_needed_free'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 1319 "configure"
|
||||
#line 1353 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
#include <stdio.h>
|
||||
@ -1330,7 +1364,7 @@ int t() {
|
||||
char *(*pfn) = (char *(*)) free
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:1334: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
if { (eval echo configure:1368: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
rm -rf conftest*
|
||||
bfd_cv_decl_needed_free=no
|
||||
else
|
||||
@ -1475,7 +1509,7 @@ EOF
|
||||
mips-sony-bsd*)
|
||||
COREFILE=trad-core.o
|
||||
cat >> confdefs.h <<\EOF
|
||||
#define TRAD_HEADER "hosts/news-mips".h
|
||||
#define TRAD_HEADER "hosts/news-mips.h"
|
||||
EOF
|
||||
|
||||
;;
|
||||
@ -1602,7 +1636,7 @@ EOF
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 1606 "configure"
|
||||
#line 1640 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <sys/procfs.h>
|
||||
int main() { return 0; }
|
||||
@ -1610,7 +1644,7 @@ int t() {
|
||||
prstatus_t t;
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:1614: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
if { (eval echo configure:1648: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
rm -rf conftest*
|
||||
bfd_cv_header_sys_procfs_h=yes
|
||||
else
|
||||
@ -1890,7 +1924,7 @@ if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 1894 "configure"
|
||||
#line 1928 "configure"
|
||||
#include "confdefs.h"
|
||||
/* System header to define __stub macros and hopefully few prototypes,
|
||||
which can conflict with char $ac_func(); below. */
|
||||
@ -1912,7 +1946,7 @@ $ac_func();
|
||||
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:1916: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
|
||||
if { (eval echo configure:1950: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
|
||||
rm -rf conftest*
|
||||
eval "ac_cv_func_$ac_func=yes"
|
||||
else
|
||||
@ -1942,7 +1976,7 @@ else
|
||||
ac_cv_func_mmap=no
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 1946 "configure"
|
||||
#line 1980 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
/* Thanks to Mike Haertel and Jim Avera for this test. */
|
||||
@ -2011,7 +2045,7 @@ main()
|
||||
}
|
||||
|
||||
EOF
|
||||
{ (eval echo configure:2015: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
|
||||
{ (eval echo configure:2049: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
|
||||
if test -s conftest && (./conftest; exit) 2>/dev/null; then
|
||||
ac_cv_func_mmap=yes
|
||||
else
|
||||
@ -2036,7 +2070,7 @@ if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 2040 "configure"
|
||||
#line 2074 "configure"
|
||||
#include "confdefs.h"
|
||||
/* System header to define __stub macros and hopefully few prototypes,
|
||||
which can conflict with char $ac_func(); below. */
|
||||
@ -2058,7 +2092,7 @@ $ac_func();
|
||||
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:2062: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
|
||||
if { (eval echo configure:2096: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
|
||||
rm -rf conftest*
|
||||
eval "ac_cv_func_$ac_func=yes"
|
||||
else
|
||||
|
@ -116,7 +116,8 @@ AC_SUBST(HOST_64BIT_LONG)
|
||||
BFD_CC_FOR_BUILD
|
||||
|
||||
AC_CHECK_HEADERS(stddef.h string.h strings.h stdlib.h time.h unistd.h)
|
||||
AC_CHECK_HEADERS(fcntl.h sys/file.h)
|
||||
AC_CHECK_HEADERS(fcntl.h sys/file.h sys/time.h)
|
||||
AC_HEADER_TIME
|
||||
AC_CHECK_FUNCS(fcntl getpagesize)
|
||||
|
||||
BFD_BINARY_FOPEN
|
||||
@ -223,7 +224,7 @@ changequote([,])dnl
|
||||
;;
|
||||
mips-sony-bsd*)
|
||||
COREFILE=trad-core.o
|
||||
AC_DEFINE(TRAD_HEADER,"hosts/news-mips".h)
|
||||
AC_DEFINE(TRAD_HEADER,"hosts/news-mips.h")
|
||||
;;
|
||||
m68*-bull*-sysv*)
|
||||
COREFILE=trad-core.o
|
||||
|
114
bfd/sysdep.h
Normal file
114
bfd/sysdep.h
Normal file
@ -0,0 +1,114 @@
|
||||
/* sysdep.h -- handle host dependencies for the BFD library
|
||||
Copyright 1995 Free Software Foundation, Inc.
|
||||
Written by Cygnus Support.
|
||||
|
||||
This file is part of BFD, the Binary File Descriptor library.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
#ifndef BFD_SYSDEP_H
|
||||
#define BFD_SYSDEP_H
|
||||
|
||||
#include "ansidecl.h"
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#ifdef HAVE_STDDEF_H
|
||||
#include <stddef.h>
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
#include <errno.h>
|
||||
#ifndef errno
|
||||
extern int errno;
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_STRING_H
|
||||
#include <string.h>
|
||||
#else
|
||||
#ifdef HAVE_STRINGS_H
|
||||
#include <strings.h>
|
||||
#else
|
||||
extern char *strchr ();
|
||||
extern char *strrchr ();
|
||||
extern char *strstr ();
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_STDLIB_H
|
||||
#include <stdlib.h>
|
||||
#endif
|
||||
|
||||
#if TIME_WITH_SYS_TIME
|
||||
#include <sys/time.h>
|
||||
#include <time.h>
|
||||
#else
|
||||
#if HAVE_SYS_TIME_H
|
||||
#include <sys/time.h>
|
||||
#else
|
||||
#include <time.h>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_UNISTD_H
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
#ifdef USE_BINARY_FOPEN
|
||||
#include "fopen-bin.h"
|
||||
#else
|
||||
#include "fopen-same.h"
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_FCNTL_H
|
||||
#include <fcntl.h>
|
||||
#else
|
||||
#ifdef HAVE_SYS_FILE_H
|
||||
#include <sys/file.h>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef O_RDONLY
|
||||
#define O_RDONLY 0
|
||||
#endif
|
||||
#ifndef O_WRONLY
|
||||
#define O_WRONLY 1
|
||||
#endif
|
||||
#ifndef O_RDWR
|
||||
#define O_RDWR 2
|
||||
#endif
|
||||
#ifndef O_ACCMODE
|
||||
#define O_ACCMODE (O_RDONLY | O_WRONLY | O_RDWR)
|
||||
#endif
|
||||
|
||||
#ifndef SEEK_SET
|
||||
#define SEEK_SET 0
|
||||
#endif
|
||||
#ifndef SEEK_CUR
|
||||
#define SEEK_CUR 1
|
||||
#endif
|
||||
|
||||
#ifdef NEED_DECLARATION_MALLOC
|
||||
extern PTR malloc ();
|
||||
#endif
|
||||
|
||||
#ifdef NEED_DECLARATION_FREE
|
||||
extern void free ();
|
||||
#endif
|
||||
|
||||
#endif /* ! defined (BFD_SYSDEP_H) */
|
Loading…
Reference in New Issue
Block a user