public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Re: egcs-19980425, system.h stuff part 3/6
@ 1998-05-04 12:46 Kaveh R. Ghazi
  1998-05-05  5:03 ` Jeffrey A Law
  0 siblings, 1 reply; 4+ messages in thread
From: Kaveh R. Ghazi @ 1998-05-04 12:46 UTC (permalink / raw)
  To: jfc; +Cc: egcs

 > From: John Carr <jfc@mit.edu>
 > 
 > > 	* system.h: Wrap time.h and sys/file.h in autoconf checks.
 > > 	Provide default definitions for O_RDONLY and O_WRONLY here.
 > 
 > What build systems supported by gcc need definitions of O_RDONLY and
 > O_WRONLY?

	None that I have access to or am aware of.  However I suppose
they must exist somewhere else gcc wouldn't have had support for it
scattered amongst several files. 

		--Kaveh
--
Kaveh R. Ghazi			Project Manager / Custom Development
ghazi@caip.rutgers.edu		Icon CMT Corp.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: egcs-19980425, system.h stuff part 3/6
  1998-05-04 12:46 egcs-19980425, system.h stuff part 3/6 Kaveh R. Ghazi
@ 1998-05-05  5:03 ` Jeffrey A Law
  0 siblings, 0 replies; 4+ messages in thread
From: Jeffrey A Law @ 1998-05-05  5:03 UTC (permalink / raw)
  To: Kaveh R. Ghazi; +Cc: jfc, egcs

  In message < 199805041945.PAA09982@caip.rutgers.edu >you write:
  >  > From: John Carr <jfc@mit.edu>
  >  > 
  >  > > 	* system.h: Wrap time.h and sys/file.h in autoconf checks.
  >  > > 	Provide default definitions for O_RDONLY and O_WRONLY here.
  >  > 
  >  > What build systems supported by gcc need definitions of O_RDONLY and
  >  > O_WRONLY?
  > 
  > 	None that I have access to or am aware of.  However I suppose
  > they must exist somewhere else gcc wouldn't have had support for it
  > scattered amongst several files. 
I see a half-dozen or so occurences of the O_RDONLY stuff throughout
the sources.  O_WRONLY is less common.

I'd say let's go ahead and keep the code to provide default definitions
of O_RDONLY/O_WRONLY if none exist -- keeping that code can't hurt.

And burying it in system.h seems like the right place to work around
such lossage.


jeff

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: egcs-19980425, system.h stuff part 3/6
  1998-05-01 17:34 Kaveh R. Ghazi
@ 1998-05-02  6:13 ` John Carr
  0 siblings, 0 replies; 4+ messages in thread
From: John Carr @ 1998-05-02  6:13 UTC (permalink / raw)
  To: Kaveh R. Ghazi; +Cc: egcs

> 	* system.h: Wrap time.h and sys/file.h in autoconf checks.
> 	Provide default definitions for O_RDONLY and O_WRONLY here.

What build systems supported by gcc need definitions of O_RDONLY and
O_WRONLY?


^ permalink raw reply	[flat|nested] 4+ messages in thread

* egcs-19980425, system.h stuff part 3/6
@ 1998-05-01 17:34 Kaveh R. Ghazi
  1998-05-02  6:13 ` John Carr
  0 siblings, 1 reply; 4+ messages in thread
From: Kaveh R. Ghazi @ 1998-05-01 17:34 UTC (permalink / raw)
  To: egcs

	This is part 3/6.


Fri May  1 12:53:29 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>

	* system.h: Wrap time.h and sys/file.h in autoconf checks.
	Provide default definitions for O_RDONLY and O_WRONLY here.

	* cccp.c, cpplib.c, fix-header.c, gcc.c, protoize.c: Not here.



diff -rup orig/egcs-19980425/gcc/system.h egcs-19980425/gcc/system.h
--- orig/egcs-19980425/gcc/system.h	Fri Apr  3 11:37:09 1998
+++ egcs-19980425/gcc/system.h	Fri May  1 12:37:52 1998
@@ -104,16 +104,20 @@ extern int errno;
 # include <time.h>
 #else
 # if HAVE_SYS_TIME_H
-# include <sys/time.h>
+#  include <sys/time.h>
 # else
-#  include <time.h>
-#endif
+#  ifdef HAVE_TIME_H
+#   include <time.h>
+#  endif
+# endif
 #endif
 
 #ifdef HAVE_FCNTL_H
 # include <fcntl.h>
 #else
-# include <sys/file.h>
+# ifdef HAVE_SYS_FILE_H
+#  include <sys/file.h>
+# endif
 #endif
 
 #ifndef SEEK_SET
@@ -126,6 +130,12 @@ extern int errno;
 # define X_OK 1
 # define W_OK 2
 # define R_OK 4
+#endif
+#ifndef O_RDONLY
+# define O_RDONLY 0
+#endif
+#ifndef O_WRONLY
+# define O_WRONLY 1
 #endif
 
 
diff -rup orig/egcs-19980425/gcc/cccp.c egcs-19980425/gcc/cccp.c
--- orig/egcs-19980425/gcc/cccp.c	Mon Apr  6 10:01:23 1998
+++ egcs-19980425/gcc/cccp.c	Fri May  1 12:33:31 1998
@@ -105,10 +105,6 @@ static void hack_vms_include_specificati
 #define INO_T_EQ(a, b) 0
 #endif
 
-#ifndef O_RDONLY
-#define O_RDONLY 0
-#endif
-
 #undef MIN
 #undef MAX
 #define MIN(X,Y) ((X) < (Y) ? (X) : (Y))
diff -rup orig/egcs-19980425/gcc/cpplib.c egcs-19980425/gcc/cpplib.c
--- orig/egcs-19980425/gcc/cpplib.c	Sat Apr  4 12:37:41 1998
+++ egcs-19980425/gcc/cpplib.c	Fri May  1 12:33:51 1998
@@ -45,10 +45,6 @@ Foundation, 59 Temple Place - Suite 330,
 
 extern char *update_path ();
 
-#ifndef O_RDONLY
-#define O_RDONLY 0
-#endif
-
 #undef MIN
 #undef MAX
 #define MIN(X,Y) ((X) < (Y) ? (X) : (Y))
diff -rup orig/egcs-19980425/gcc/fix-header.c egcs-19980425/gcc/fix-header.c
--- orig/egcs-19980425/gcc/fix-header.c	Sun Apr 19 02:48:07 1998
+++ egcs-19980425/gcc/fix-header.c	Fri May  1 12:34:12 1998
@@ -77,10 +77,6 @@ Foundation, 59 Temple Place - Suite 330,
 #include "cpplib.h"
 #include "gansidecl.h"
 
-#ifndef O_RDONLY
-#define O_RDONLY 0
-#endif
-
 extern void cpp_fatal ();
 
 #if !__STDC__ && !defined(const)
diff -rup orig/egcs-19980425/gcc/gcc.c egcs-19980425/gcc/gcc.c
--- orig/egcs-19980425/gcc/gcc.c	Mon Apr 20 16:51:02 1998
+++ egcs-19980425/gcc/gcc.c	Fri May  1 12:34:28 1998
@@ -75,11 +75,6 @@ extern void set_std_prefix PROTO((char *
 #define exit __posix_exit
 #endif
 
-/* Define O_RDONLY if the system hasn't defined it for us.  */
-#ifndef O_RDONLY
-#define O_RDONLY 0
-#endif
-
 #ifdef USG
 #define vfork fork
 #endif /* USG */
diff -rup orig/egcs-19980425/gcc/protoize.c egcs-19980425/gcc/protoize.c
--- orig/egcs-19980425/gcc/protoize.c	Mon Apr 20 09:30:32 1998
+++ egcs-19980425/gcc/protoize.c	Fri May  1 12:34:42 1998
@@ -144,14 +144,6 @@ typedef char * pointer_type;
 typedef char * const_pointer_type;
 #endif
 
-#ifndef O_RDONLY
-#define O_RDONLY        0
-#endif
-
-#ifndef O_WRONLY
-#define O_WRONLY        1
-#endif
-
 #if defined(POSIX)
 
 #include <signal.h>

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~1998-05-05  5:03 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-05-04 12:46 egcs-19980425, system.h stuff part 3/6 Kaveh R. Ghazi
1998-05-05  5:03 ` Jeffrey A Law
  -- strict thread matches above, loose matches on Subject: below --
1998-05-01 17:34 Kaveh R. Ghazi
1998-05-02  6:13 ` John Carr

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).