changeset 12935:f65e672e038e

[HAVE_CONFIG_H]: Include config.h. [! O_RDONLY]: Define it to zero. (main): Use O_RDONLY instead of explicit zero.
author Roland McGrath <roland@gnu.org>
date Wed, 23 Aug 1995 17:42:20 +0000
parents 7fd541abf2af
children 1548eeb34926
files lib-src/test-distrib.c
diffstat 1 files changed, 10 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/lib-src/test-distrib.c	Tue Aug 22 20:55:36 1995 +0000
+++ b/lib-src/test-distrib.c	Wed Aug 23 17:42:20 1995 +0000
@@ -1,5 +1,14 @@
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
 #include <stdio.h>
 
+#ifndef O_RDONLY
+#define O_RDONLY 0
+#endif
+
+
 /* Break string in two parts to avoid buggy C compilers that ignore characters
    after nulls in strings.  */
 
@@ -44,7 +53,7 @@
       fprintf (stderr, "Usage: %s testfile\n", argv[0]);
       exit (2);
     }
-  fd = open (argv[1], 0);
+  fd = open (argv[1], O_RDONLY);
   if (fd < 0)
     {
       perror (argv[1]);