binutils-gdb/sim/common
Joel Brobecker 2d7bb7580a callback.h:struct host_callback_struct compilation error on Windows hosts.
On Windows, a recent gnulib update imported the lstat module, and
this caused a remote-sim.c build failure in struct host_callback_struct:

    In file included from /[...]/gdb/remote-sim.c:34:0:
    /[...]/gdb/../include/gdb/callback.h:93:9: error: duplicate member '_stati64'
       int (*lstat) (host_callback *, const char *, struct stat *);
             ^
What happens it that gnulib's stat.h makes the following defines:

     /* Large File Support on native Windows.  */
     #if 1
     # define stat _stati64
     #endif

and then:

    #if 1
    # if ! 0
    /* mingw does not support symlinks, therefore it does not have lstat.  But
       without links, stat does just fine.  */
    #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
    #   define lstat stat
    #  endif

So, the following fields in struct host_callback_struct...

      int (*stat) (host_callback *, const char *, struct stat *);
      int (*fstat) (host_callback *, int, struct stat *);
      int (*lstat) (host_callback *, const char *, struct stat *);

... get translated to...

      int (*_stati64) (host_callback *, const char *, struct _stati64 *);
      int (*_fstati64) (host_callback *, int, struct _stati64 *);
      int (*_stati64) (host_callback *, const char *, struct _stati64 *);

... which causes two fields to have the same name.

This patch fixes the issue by renaming the stat-related fields
by adding a "to_" prefix, similar to what is done in GDB's
target_ops vector.

include/gdb/ChangeLog:

	* callback.h (struct host_callback_struct) <to_stat>: Renamed
	from "stat".
	<to_fstat>: Renamed from "fstat".
	<to_lstat>: Renamed from "lstat".

sim/common/ChangeLog:

	* sim-io.c (sim_io_stat, sim_io_fstat): Adjust calls to "stat"
	and "fstat" callbacks by calls to "to_stat" and "to_fstat" (resp)
	callbacks following renaming in callback.h.
	* syscall.c (cb_syscall): Likewise.  Adjust calls to "lstat"
	callback by call to "to_lstat" callback

sim/cris/ChangeLog:

	* traps.c (cris_break_13_handler): Adjust call to "fstat" callback
	by call to "to_fstat" following renaming in callback.h.

sim/h8300/ChangeLog:

	* compile.c (sim_resume):  Adjust calls to "stat" and "fstat"
	callbacks by calls to "to_stat" and "to_fstat" (resp) callbacks
	following renaming in callback.h.
2014-12-03 13:43:08 +04:00
..
ChangeLog callback.h:struct host_callback_struct compilation error on Windows hosts. 2014-12-03 13:43:08 +04:00
Make-common.in Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
Makefile.in Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
acinclude.m4 sim: convert old style prototypes 2014-03-04 02:54:50 -05:00
aclocal.m4 sim: use AM_MAINTAINER_MODE 2013-06-05 01:42:13 +00:00
callback.c sim: convert old style prototypes 2014-03-04 02:54:50 -05:00
cgen-accfp.c
cgen-cpu.h Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
cgen-defs.h Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
cgen-engine.h Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
cgen-fpu.c
cgen-fpu.h
cgen-mem.h Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
cgen-ops.h Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
cgen-par.c Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
cgen-par.h Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
cgen-run.c Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
cgen-scache.c Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
cgen-scache.h Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
cgen-sim.h Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
cgen-trace.c remove VA_* macros from sim 2014-01-07 09:17:05 -07:00
cgen-trace.h Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
cgen-types.h Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
cgen-utils.c Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
cgen.sh
config.in Regenerate sim configury. 2014-08-15 15:51:50 -07:00
configure Fix --diable-shared --enable-plugins build breakage 2014-08-19 21:59:56 +09:30
configure.ac
create-version.sh Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
dv-cfi.c Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
dv-cfi.h Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
dv-core.c Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
dv-glue.c Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
dv-pal.c Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
dv-sockser.c Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
dv-sockser.h Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
gdbinit.in
genmloop.sh Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
gennltvals.sh * msp430: New Directory. 2013-06-21 10:59:14 +00:00
gentmap.c
gentvals.sh
hw-alloc.c Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
hw-alloc.h Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
hw-base.c Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
hw-base.h Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
hw-device.c Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
hw-device.h Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
hw-events.c Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
hw-events.h Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
hw-handles.c Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
hw-handles.h Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
hw-instances.c Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
hw-instances.h Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
hw-main.h Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
hw-ports.c Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
hw-ports.h Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
hw-properties.c Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
hw-properties.h Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
hw-tree.c Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
hw-tree.h Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
nltvals.def * msp430: New Directory. 2013-06-21 10:59:14 +00:00
nrun.c Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
run-sim.h remove PARAMS from sim 2014-01-07 09:17:05 -07:00
run.1 Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
run.c remove PARAMS from sim 2014-01-07 09:17:05 -07:00
sim-abort.c Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
sim-alu.h Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
sim-arange.c Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
sim-arange.h Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
sim-assert.h Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
sim-base.h remove PARAMS from sim 2014-01-07 09:17:05 -07:00
sim-basics.h Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
sim-bits.c Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
sim-bits.h Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
sim-command.c sim: constify arg to sim_do_command 2014-03-10 22:57:29 -04:00
sim-config.c Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
sim-config.h Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
sim-core.c Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
sim-core.h Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
sim-cpu.c Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
sim-cpu.h Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
sim-endian.c Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
sim-endian.h Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
sim-engine.c Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
sim-engine.h Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
sim-events.c Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
sim-events.h Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
sim-fpu.c Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
sim-fpu.h Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
sim-hload.c sim: constify prog_name 2014-03-05 01:42:44 -05:00
sim-hrw.c Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
sim-hw.c Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
sim-hw.h Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
sim-info.c Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
sim-inline.c Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
sim-inline.h Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
sim-io.c callback.h:struct host_callback_struct compilation error on Windows hosts. 2014-12-03 13:43:08 +04:00
sim-io.h Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
sim-load.c sim: constify prog_name 2014-03-05 01:42:44 -05:00
sim-memopt.c Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
sim-memopt.h Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
sim-model.c Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
sim-model.h Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
sim-module.c Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
sim-module.h Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
sim-n-bits.h Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
sim-n-core.h Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
sim-n-endian.h Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
sim-options.c sim: constify arg to sim_do_command 2014-03-10 22:57:29 -04:00
sim-options.h sim: constify arg to sim_do_command 2014-03-10 22:57:29 -04:00
sim-profile.c Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
sim-profile.h Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
sim-reason.c Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
sim-reg.c Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
sim-resume.c Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
sim-run.c Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
sim-signal.c Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
sim-signal.h Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
sim-stop.c Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
sim-trace.c remove VA_* macros from sim 2014-01-07 09:17:05 -07:00
sim-trace.h Shadow SIM's debug_printf function 2014-08-28 11:59:09 +01:00
sim-types.h Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
sim-utils.c sim: constify prog_name 2014-03-05 01:42:44 -05:00
sim-utils.h sim: constify prog_name 2014-03-05 01:42:44 -05:00
sim-watch.c Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
sim-watch.h Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
syscall.c callback.h:struct host_callback_struct compilation error on Windows hosts. 2014-12-03 13:43:08 +04:00
tconfig.in
version.h Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00