forked from Imagelibrary/binutils-gdb
sim: assume sys/stat.h always exists (via gnulib)
We have many uses of sys/stat.h that are unprotected by HAVE_SYS_STAT_H, so this is more formalizing the reality that we require this header. Since we switched to gnulib, it guarantees that a sys/stat.h exists for us to include, so we're doubly OK.
This commit is contained in:
@@ -30,9 +30,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
#ifdef HAVE_SYS_MMAN_H
|
||||
#include <sys/mman.h>
|
||||
#endif
|
||||
#ifdef HAVE_SYS_STAT_H
|
||||
#include <sys/stat.h>
|
||||
#endif
|
||||
|
||||
#include "sim-main.h"
|
||||
#include "sim-assert.h"
|
||||
|
||||
33
sim/configure
vendored
33
sim/configure
vendored
@@ -2810,7 +2810,6 @@ as_fn_append ac_header_list " sys/mount.h"
|
||||
as_fn_append ac_header_list " sys/param.h"
|
||||
as_fn_append ac_header_list " sys/resource.h"
|
||||
as_fn_append ac_header_list " sys/socket.h"
|
||||
as_fn_append ac_header_list " sys/stat.h"
|
||||
as_fn_append ac_header_list " sys/statfs.h"
|
||||
as_fn_append ac_header_list " sys/termio.h"
|
||||
as_fn_append ac_header_list " sys/termios.h"
|
||||
@@ -5262,8 +5261,6 @@ done
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -8425,9 +8422,7 @@ fi
|
||||
ac_fn_c_check_member "$LINENO" "struct stat" "st_dev" "ac_cv_member_struct_stat_st_dev" "#ifdef HAVE_SYS_TYPES_H
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
#ifdef HAVE_SYS_STAT_H
|
||||
#include <sys/stat.h>
|
||||
#endif
|
||||
"
|
||||
if test "x$ac_cv_member_struct_stat_st_dev" = xyes; then :
|
||||
|
||||
@@ -8440,9 +8435,7 @@ fi
|
||||
ac_fn_c_check_member "$LINENO" "struct stat" "st_ino" "ac_cv_member_struct_stat_st_ino" "#ifdef HAVE_SYS_TYPES_H
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
#ifdef HAVE_SYS_STAT_H
|
||||
#include <sys/stat.h>
|
||||
#endif
|
||||
"
|
||||
if test "x$ac_cv_member_struct_stat_st_ino" = xyes; then :
|
||||
|
||||
@@ -8455,9 +8448,7 @@ fi
|
||||
ac_fn_c_check_member "$LINENO" "struct stat" "st_mode" "ac_cv_member_struct_stat_st_mode" "#ifdef HAVE_SYS_TYPES_H
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
#ifdef HAVE_SYS_STAT_H
|
||||
#include <sys/stat.h>
|
||||
#endif
|
||||
"
|
||||
if test "x$ac_cv_member_struct_stat_st_mode" = xyes; then :
|
||||
|
||||
@@ -8470,9 +8461,7 @@ fi
|
||||
ac_fn_c_check_member "$LINENO" "struct stat" "st_nlink" "ac_cv_member_struct_stat_st_nlink" "#ifdef HAVE_SYS_TYPES_H
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
#ifdef HAVE_SYS_STAT_H
|
||||
#include <sys/stat.h>
|
||||
#endif
|
||||
"
|
||||
if test "x$ac_cv_member_struct_stat_st_nlink" = xyes; then :
|
||||
|
||||
@@ -8485,9 +8474,7 @@ fi
|
||||
ac_fn_c_check_member "$LINENO" "struct stat" "st_uid" "ac_cv_member_struct_stat_st_uid" "#ifdef HAVE_SYS_TYPES_H
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
#ifdef HAVE_SYS_STAT_H
|
||||
#include <sys/stat.h>
|
||||
#endif
|
||||
"
|
||||
if test "x$ac_cv_member_struct_stat_st_uid" = xyes; then :
|
||||
|
||||
@@ -8500,9 +8487,7 @@ fi
|
||||
ac_fn_c_check_member "$LINENO" "struct stat" "st_gid" "ac_cv_member_struct_stat_st_gid" "#ifdef HAVE_SYS_TYPES_H
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
#ifdef HAVE_SYS_STAT_H
|
||||
#include <sys/stat.h>
|
||||
#endif
|
||||
"
|
||||
if test "x$ac_cv_member_struct_stat_st_gid" = xyes; then :
|
||||
|
||||
@@ -8515,9 +8500,7 @@ fi
|
||||
ac_fn_c_check_member "$LINENO" "struct stat" "st_rdev" "ac_cv_member_struct_stat_st_rdev" "#ifdef HAVE_SYS_TYPES_H
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
#ifdef HAVE_SYS_STAT_H
|
||||
#include <sys/stat.h>
|
||||
#endif
|
||||
"
|
||||
if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
|
||||
|
||||
@@ -8530,9 +8513,7 @@ fi
|
||||
ac_fn_c_check_member "$LINENO" "struct stat" "st_size" "ac_cv_member_struct_stat_st_size" "#ifdef HAVE_SYS_TYPES_H
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
#ifdef HAVE_SYS_STAT_H
|
||||
#include <sys/stat.h>
|
||||
#endif
|
||||
"
|
||||
if test "x$ac_cv_member_struct_stat_st_size" = xyes; then :
|
||||
|
||||
@@ -8545,9 +8526,7 @@ fi
|
||||
ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "#ifdef HAVE_SYS_TYPES_H
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
#ifdef HAVE_SYS_STAT_H
|
||||
#include <sys/stat.h>
|
||||
#endif
|
||||
"
|
||||
if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
|
||||
|
||||
@@ -8560,9 +8539,7 @@ fi
|
||||
ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "#ifdef HAVE_SYS_TYPES_H
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
#ifdef HAVE_SYS_STAT_H
|
||||
#include <sys/stat.h>
|
||||
#endif
|
||||
"
|
||||
if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
|
||||
|
||||
@@ -8575,9 +8552,7 @@ fi
|
||||
ac_fn_c_check_member "$LINENO" "struct stat" "st_atime" "ac_cv_member_struct_stat_st_atime" "#ifdef HAVE_SYS_TYPES_H
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
#ifdef HAVE_SYS_STAT_H
|
||||
#include <sys/stat.h>
|
||||
#endif
|
||||
"
|
||||
if test "x$ac_cv_member_struct_stat_st_atime" = xyes; then :
|
||||
|
||||
@@ -8590,9 +8565,7 @@ fi
|
||||
ac_fn_c_check_member "$LINENO" "struct stat" "st_mtime" "ac_cv_member_struct_stat_st_mtime" "#ifdef HAVE_SYS_TYPES_H
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
#ifdef HAVE_SYS_STAT_H
|
||||
#include <sys/stat.h>
|
||||
#endif
|
||||
"
|
||||
if test "x$ac_cv_member_struct_stat_st_mtime" = xyes; then :
|
||||
|
||||
@@ -8605,9 +8578,7 @@ fi
|
||||
ac_fn_c_check_member "$LINENO" "struct stat" "st_ctime" "ac_cv_member_struct_stat_st_ctime" "#ifdef HAVE_SYS_TYPES_H
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
#ifdef HAVE_SYS_STAT_H
|
||||
#include <sys/stat.h>
|
||||
#endif
|
||||
"
|
||||
if test "x$ac_cv_member_struct_stat_st_ctime" = xyes; then :
|
||||
|
||||
@@ -12286,7 +12257,7 @@ else
|
||||
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
|
||||
lt_status=$lt_dlunknown
|
||||
cat > conftest.$ac_ext <<_LT_EOF
|
||||
#line 12289 "configure"
|
||||
#line 12260 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
#if HAVE_DLFCN_H
|
||||
@@ -12392,7 +12363,7 @@ else
|
||||
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
|
||||
lt_status=$lt_dlunknown
|
||||
cat > conftest.$ac_ext <<_LT_EOF
|
||||
#line 12395 "configure"
|
||||
#line 12366 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
#if HAVE_DLFCN_H
|
||||
|
||||
@@ -39,9 +39,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
#ifdef HAVE_SYS_PARAM_H
|
||||
#include <sys/param.h>
|
||||
#endif
|
||||
#ifdef HAVE_SYS_STAT_H
|
||||
#include <sys/stat.h>
|
||||
#endif
|
||||
/* For PATH_MAX, originally. */
|
||||
#ifdef HAVE_LIMITS_H
|
||||
#include <limits.h>
|
||||
|
||||
@@ -26,11 +26,11 @@
|
||||
#ifdef HAVE_SYS_PARAM_H
|
||||
#include <sys/param.h>
|
||||
#endif
|
||||
#include <sys/stat.h>
|
||||
|
||||
#include "bfd.h"
|
||||
#include "sim-main.h"
|
||||
#include "sim/sim-h8300.h"
|
||||
#include "sys/stat.h"
|
||||
#include "sys/types.h"
|
||||
#include "sim-options.h"
|
||||
#include "sim-signal.h"
|
||||
|
||||
@@ -37,7 +37,6 @@ AC_CHECK_HEADERS_ONCE(m4_flatten([
|
||||
sys/param.h
|
||||
sys/resource.h
|
||||
sys/socket.h
|
||||
sys/stat.h
|
||||
sys/statfs.h
|
||||
sys/termio.h
|
||||
sys/termios.h
|
||||
@@ -126,9 +125,7 @@ AC_CHECK_MEMBERS([[struct stat.st_dev], [struct stat.st_ino],
|
||||
[[#ifdef HAVE_SYS_TYPES_H
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
#ifdef HAVE_SYS_STAT_H
|
||||
#include <sys/stat.h>
|
||||
#endif]])
|
||||
#include <sys/stat.h>]])
|
||||
|
||||
AC_CHECK_TYPES([__int128])
|
||||
AC_CHECK_TYPES(socklen_t, [], [],
|
||||
|
||||
@@ -1055,7 +1055,6 @@ typedef uint32_t solaris_ino_t;
|
||||
typedef uint32_t solaris_mode_t;
|
||||
typedef uint32_t solaris_nlink_t;
|
||||
|
||||
#ifdef HAVE_SYS_STAT_H
|
||||
#define SOLARIS_ST_FSTYPSZ 16 /* array size for file system type name */
|
||||
|
||||
/* AIX 7.1 defines st_pad[123] to st_[amc]tim.tv_pad, respectively */
|
||||
@@ -1145,7 +1144,6 @@ convert_to_solaris_stat(unsigned_word addr,
|
||||
|
||||
emul_write_buffer(&target, addr, sizeof(target), processor, cia);
|
||||
}
|
||||
#endif /* HAVE_SYS_STAT_H */
|
||||
|
||||
#ifndef HAVE_STAT
|
||||
#define do_solaris_stat 0
|
||||
@@ -2011,7 +2009,6 @@ typedef int32_t linux_time_t;
|
||||
typedef int32_t linux_clock_t;
|
||||
typedef int32_t linux_daddr_t;
|
||||
|
||||
#ifdef HAVE_SYS_STAT_H
|
||||
/* For the PowerPC, don't both with the 'old' stat structure, since there
|
||||
should be no extant binaries with that structure. */
|
||||
|
||||
@@ -2082,7 +2079,6 @@ convert_to_linux_stat(unsigned_word addr,
|
||||
|
||||
emul_write_buffer(&target, addr, sizeof(target), processor, cia);
|
||||
}
|
||||
#endif /* HAVE_SYS_STAT_H */
|
||||
|
||||
#ifndef HAVE_STAT
|
||||
#define do_linux_stat 0
|
||||
|
||||
@@ -38,9 +38,7 @@
|
||||
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#ifdef HAVE_SYS_STAT_H
|
||||
#include <sys/stat.h>
|
||||
#endif
|
||||
#include <time.h>
|
||||
#include <sys/time.h>
|
||||
#ifdef HAVE_UTIME_H
|
||||
|
||||
Reference in New Issue
Block a user