This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

[PATCH]: S_IROTH defn. for Microsoft C


I will be committing the enclosed patch shortly.

remote-mips.c contains a hack so that S_IROTH is defined to S_IREAD if
it is not defined by sys/stat.h.  A comment suggests this is because
Microsoft C's stat.h does not define all the POSIX file modes.

This change moves that hack from remote-mips.c to gdb_stat.h, which is
the header we use to fix similar botches in the sys/stat.h macros.

        --jtc

2001-04-02  J.T. Conklin  <jtc@redback.com>

	* remote-mips.c (S_IROTH): Moved definition from here.
	* gdb_stat.h (S_IROTH): to here.

Index: gdb_stat.h
===================================================================
RCS file: /cvs/src/src/gdb/gdb_stat.h,v
retrieving revision 1.1.1.2
diff -c -r1.1.1.2 gdb_stat.h
*** gdb_stat.h	1999/07/07 20:06:13	1.1.1.2
--- gdb_stat.h	2001/04/03 01:45:00
***************
*** 66,69 ****
--- 66,74 ----
  #define S_ISNWK(m) (((m) & S_IFMT) == S_IFNWK)
  #endif
  
+ /* Microsoft C's stat.h doesn't define all the POSIX file modes.  */
+ #ifndef S_IROTH
+ #define S_IROTH	S_IREAD
+ #endif
+ 
  #endif /* !defined(GDB_STAT_H) */
Index: remote-mips.c
===================================================================
RCS file: /cvs/src/src/gdb/remote-mips.c,v
retrieving revision 1.19
diff -c -r1.19 remote-mips.c
*** remote-mips.c	2001/03/06 08:21:12	1.19
--- remote-mips.c	2001/04/03 01:45:01
***************
*** 31,47 ****
  #include "target.h"
  #include "remote-utils.h"
  #include "gdb_string.h"
  #include "regcache.h"
- 
- #include <sys/types.h>
- #include <sys/stat.h>
  #include <ctype.h>
- 
- /* Microsoft C's stat.h doesn't define all the POSIX file modes.  */
- #ifndef S_IROTH
- #define S_IROTH S_IREAD
- #endif
- 
  
  
  /* Breakpoint types.  Values 0, 1, and 2 must agree with the watch
--- 31,39 ----
  #include "target.h"
  #include "remote-utils.h"
  #include "gdb_string.h"
+ #include "gdb_stat.h"
  #include "regcache.h"
  #include <ctype.h>
  
  
  /* Breakpoint types.  Values 0, 1, and 2 must agree with the watch



-- 
J.T. Conklin
RedBack Networks


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]