[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] fcntl-h: define O_CLOEXEC and O_EXEC if not defined; use new
From: |
Bruno Haible |
Subject: |
Re: [PATCH] fcntl-h: define O_CLOEXEC and O_EXEC if not defined; use new defines |
Date: |
Fri, 10 Sep 2010 21:46:57 +0200 |
User-agent: |
KMail/1.9.9 |
Hi Paul,
> * lib/progreloc.c (find_executable): Use O_EXEC rather than O_RDONLY.
The lib/progreloc.c file is used by the modules 'relocatable-prog' and
'relocatable-prog-wrapper'. The latter module is careful to require no
.h file overrides from gnulib, as it would complicate the build process of
this module. So, this file cannot assume that O_EXEC is defined. I'm
adding this fix:
2010-09-10 Bruno Haible <address@hidden>
relocatable-prog-wrapper: Fix compilation failure due to O_EXEC.
* lib/progreloc.c (O_EXEC): Define fallback.
--- lib/progreloc.c.orig Fri Sep 10 21:36:47 2010
+++ lib/progreloc.c Fri Sep 10 21:35:06 2010
@@ -59,6 +59,10 @@
# include "xalloc.h"
#endif
+#ifndef O_EXEC
+# define O_EXEC O_RDONLY /* This is often close enough in older systems. */
+#endif
+
/* Declare canonicalize_file_name.
The <stdlib.h> included above may be the system's one, not the gnulib
one. */