This is the mail archive of the binutils@sourceware.cygnus.com mailing list for the binutils project.


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

minor patch for include/fopen-bin.h


That patch adds 't' to the text mode fopen macros for DOS and Windows. Since the 
default can either be binary or text depending on the particular system library, it's 
better to explicitly set text mode instead of presuming it's the default. I'd also like 
to remove the out-of-place swipe at DOS.

include/ChangeLog:

2000-05-30 Mark Elbrecht <snowball3@bigfoot.com>

	* fopen-bin.h (FOPEN_RT, FOPEN_WT, FOPEN_AT): Add 't'.
	  (FOPEN_RUT, FOPEN_WUT, FOPEN_AUT): Add 't'.
	* fopen-bin.h: Revise comment.

Index: src/include/fopen-bin.h
===================================================================
RCS file: /cvs/src/src/include/fopen-bin.h,v
retrieving revision 1.1.1.1
diff -c -r1.1.1.1 fopen-bin.h
*** fopen-bin.h	1999/05/03 07:29:01	1.1.1.1
--- fopen-bin.h	2000/05/31 03:25:05
***************
*** 3,10 ****
  	<Read|Write>[Update]<Binary file|text file>
  
     This version is for "binary" systems, where text and binary files are
!    different.  An example is Mess-Dose.  Many Unix systems could also
!    cope with a "b" in the string, indicating binary files, but some reject this
     (and thereby don't conform to ANSI C, but what else is new?).
  
     This file is designed for inclusion by host-dependent .h files.  No
--- 3,10 ----
  	<Read|Write>[Update]<Binary file|text file>
  
     This version is for "binary" systems, where text and binary files are
!    different.  An example is DOS.  Many Unix systems could also cope with
!    a "b" in the string, indicating binary files, but some reject this
     (and thereby don't conform to ANSI C, but what else is new?).
  
     This file is designed for inclusion by host-dependent .h files.  No
***************
*** 19,27 ****
  #define FOPEN_WUB 	"w+b"
  #define FOPEN_AUB 	"a+b"
  
! #define FOPEN_RT	"r"
! #define FOPEN_WT 	"w"
! #define FOPEN_AT 	"a"
! #define FOPEN_RUT 	"r+"
! #define FOPEN_WUT 	"w+"
! #define FOPEN_AUT 	"a+"
--- 19,27 ----
  #define FOPEN_WUB 	"w+b"
  #define FOPEN_AUB 	"a+b"
  
! #define FOPEN_RT        "rt"
! #define FOPEN_WT        "wt"
! #define FOPEN_AT        "at"
! #define FOPEN_RUT       "rt+"
! #define FOPEN_WUT       "wt+"
! #define FOPEN_AUT       "at+"



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