old-cross-binutils/sim
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
..
arm Fix --diable-shared --enable-plugins build breakage 2014-08-19 21:59:56 +09:30
avr Fix --diable-shared --enable-plugins build breakage 2014-08-19 21:59:56 +09:30
bfin Fix --diable-shared --enable-plugins build breakage 2014-08-19 21:59:56 +09:30
common callback.h:struct host_callback_struct compilation error on Windows hosts. 2014-12-03 13:43:08 +04:00
cr16 Fix --diable-shared --enable-plugins build breakage 2014-08-19 21:59:56 +09:30
cris callback.h:struct host_callback_struct compilation error on Windows hosts. 2014-12-03 13:43:08 +04:00
d10v Fix --diable-shared --enable-plugins build breakage 2014-08-19 21:59:56 +09:30
erc32 Fix --diable-shared --enable-plugins build breakage 2014-08-19 21:59:56 +09:30
frv Fix frv-elf sim, default hardware to off. 2014-08-23 04:16:58 +02:00
h8300 callback.h:struct host_callback_struct compilation error on Windows hosts. 2014-12-03 13:43:08 +04:00
igen sim/igen/: Change immediatly to immediately 2014-11-23 07:09:16 +04:00
iq2000 Fix iq2000-elf sim, default hardware to off. 2014-08-23 04:27:26 +02:00
lm32 Fix --diable-shared --enable-plugins build breakage 2014-08-19 21:59:56 +09:30
m32c Fix --diable-shared --enable-plugins build breakage 2014-08-19 21:59:56 +09:30
m32r Fix m32r-elf sim, default hardware to off. 2014-08-23 04:53:28 +02:00
m68hc11 Fix --diable-shared --enable-plugins build breakage 2014-08-19 21:59:56 +09:30
mcore Fix --diable-shared --enable-plugins build breakage 2014-08-19 21:59:56 +09:30
microblaze Fix --diable-shared --enable-plugins build breakage 2014-08-19 21:59:56 +09:30
mips Fix --diable-shared --enable-plugins build breakage 2014-08-19 21:59:56 +09:30
mn10300 Fix --diable-shared --enable-plugins build breakage 2014-08-19 21:59:56 +09:30
moxie Fix --diable-shared --enable-plugins build breakage 2014-08-19 21:59:56 +09:30
msp430 Fix --diable-shared --enable-plugins build breakage 2014-08-19 21:59:56 +09:30
ppc sim/ppc/*: Change immediatly to immediately 2014-11-23 07:11:39 +04:00
rl78 Fix --diable-shared --enable-plugins build breakage 2014-08-19 21:59:56 +09:30
rx Fix --diable-shared --enable-plugins build breakage 2014-08-19 21:59:56 +09:30
sh Correct fabs and fneg insns in simulator 2014-11-28 19:44:03 +04:00
sh64 Fix sh64-elf sim, default hardware to off. 2014-08-23 04:40:36 +02:00
testsuite sim: msp430: start a test framework 2014-03-10 23:59:59 -04:00
v850 Fix --diable-shared --enable-plugins build breakage 2014-08-19 21:59:56 +09:30
.gitignore sim: ignore generated hw-config.h 2011-01-05 17:17:44 +00:00
ChangeLog Sim - Use long int format instead of int to avoid compiling warning 2014-06-30 17:40:02 -07:00
configure sim: msp430: start a test framework 2014-03-10 23:59:59 -04:00
configure.ac sim: unify target->subdir handling for default tests 2010-04-26 16:23:24 +00:00
configure.tgt sim: msp430: start a test framework 2014-03-10 23:59:59 -04:00
MAINTAINERS Add myself as the maintainer for the MSP430 sim. 2014-03-12 11:02:57 +00:00
Makefile.in Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
README-HACKING remove PARAMS from sim 2014-01-07 09:17:05 -07:00