binutils-gdb/include
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
..
aout
cgen
coff Enabling the HIGH_ENTROPY_VA flag allows the operating system to use 2014-08-20 16:10:29 +01:00
elf Mark R_X86_64_GOTPLT64 obsolete 2014-11-13 11:26:47 -08:00
gdb callback.h:struct host_callback_struct compilation error on Windows hosts. 2014-12-03 13:43:08 +04:00
mach-o
nlm
opcode Remove broken nios2 assembler dwim support. 2014-11-28 14:41:32 -08:00
som
vms
alloca-conf.h
ansidecl.h
bfdlink.h Add -z bndplt to generate BND prefix in PLT entries 2014-11-18 05:40:17 -08:00
binary-io.h
bout.h
ChangeLog Recognize new DWARFv5 C11, C++11 and C++14 DW_LANG constants. 2014-11-26 12:47:29 +01:00
ChangeLog-9103
COPYING
COPYING3
demangle.h Sync libiberty with upstream GCC. 2014-10-11 10:29:10 +01:00
dis-asm.h
dwarf2.def Merge include/* files from GCC commit 69a2f316d3. 2014-11-21 22:47:32 +00:00
dwarf2.h Recognize new DWARFv5 C11, C++11 and C++14 DW_LANG constants. 2014-11-26 12:47:29 +01:00
dyn-string.h
fibheap.h
filenames.h
floatformat.h
fnmatch.h
fopen-bin.h
fopen-same.h
fopen-vms.h
getopt.h
hashtab.h
hp-symtab.h
ieee.h
leb128.h
libiberty.h Sync libiberty with upstream GCC. 2014-10-11 10:29:10 +01:00
longlong.h Sync libiberty with upstream GCC. 2014-10-11 10:29:10 +01:00
lto-symtab.h
MAINTAINERS
md5.h
oasys.h
objalloc.h
obstack.h
os9k.h
partition.h
plugin-api.h
progress.h
safe-ctype.h
sha1.h
simple-object.h
sort.h
splay-tree.h
symcat.h
timeval-utils.h
vtv-change-permission.h
xregex2.h
xregex.h
xtensa-config.h
xtensa-isa-internal.h
xtensa-isa.h