mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2025-01-12 16:23:57 +00:00
[HAVE_CONFIG_H]: Include config.h.
[! O_RDONLY]: Define it to zero. (main): Use O_RDONLY instead of explicit zero.
This commit is contained in:
parent
5181be3a88
commit
33b78bd601
@ -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 @@ main (argc, argv)
|
||||
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]);
|
||||
|
Loading…
Reference in New Issue
Block a user