summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--cat/virt-ls.c4
-rw-r--r--cfg.mk1
-rw-r--r--daemon/daemon.h4
-rw-r--r--fish/fish.h4
-rw-r--r--generator/tests_c_api.ml4
-rw-r--r--src/guestfs-internal.h4
-rw-r--r--src/info.c4
-rw-r--r--tests/c-api/test-last-errno.c4
-rw-r--r--tests/c-api/test-user-cancel.c4
-rw-r--r--tests/xml/fake-libvirt-xml.c4
10 files changed, 1 insertions, 36 deletions
diff --git a/cat/virt-ls.c b/cat/virt-ls.c
index 9e64e240..f47cf37b 100644
--- a/cat/virt-ls.c
+++ b/cat/virt-ls.c
@@ -36,10 +36,6 @@
#include "guestfs.h"
#include "options.h"
-#ifndef O_CLOEXEC
-#define O_CLOEXEC 0
-#endif
-
/* Currently open libguestfs handle. */
guestfs_h *g;
diff --git a/cfg.mk b/cfg.mk
index b134842e..d06cefe1 100644
--- a/cfg.mk
+++ b/cfg.mk
@@ -27,6 +27,7 @@ url_dir_list = \
# Exclude some filenames.
exclude_file_name_regexp--sc_bindtextdomain = ^(daemon|erlang|examples|tests)/
exclude_file_name_regexp--sc_error_message_period = ^php/
+exclude_file_name_regexp--sc_prohibit_always-defined_macros = ^examples/
# Tests not to run as part of "make distcheck".
local-checks-to-skip = \
diff --git a/daemon/daemon.h b/daemon/daemon.h
index a483208b..54bd4881 100644
--- a/daemon/daemon.h
+++ b/daemon/daemon.h
@@ -30,10 +30,6 @@
#include "guestfs_protocol.h"
-#ifndef O_CLOEXEC
-#define O_CLOEXEC 0
-#endif
-
/*-- in guestfsd.c --*/
extern int verbose;
diff --git a/fish/fish.h b/fish/fish.h
index cc4065ae..e14053ad 100644
--- a/fish/fish.h
+++ b/fish/fish.h
@@ -23,10 +23,6 @@
#include "fish-cmds.h"
-#ifndef O_CLOEXEC
-#define O_CLOEXEC 0
-#endif
-
#ifndef SOCK_CLOEXEC
#define SOCK_CLOEXEC 0
#endif
diff --git a/generator/tests_c_api.ml b/generator/tests_c_api.ml
index acd8a749..ebde7b70 100644
--- a/generator/tests_c_api.ml
+++ b/generator/tests_c_api.ml
@@ -42,10 +42,6 @@ let rec generate_tests () =
#include <sys/types.h>
#include <fcntl.h>
-#ifndef O_CLOEXEC
-#define O_CLOEXEC 0
-#endif
-
#include \"guestfs.h\"
#define STREQ(a,b) (strcmp((a),(b)) == 0)
diff --git a/src/guestfs-internal.h b/src/guestfs-internal.h
index 9bc41f0c..8f2e26dc 100644
--- a/src/guestfs-internal.h
+++ b/src/guestfs-internal.h
@@ -30,10 +30,6 @@
#include "hash.h"
-#ifndef O_CLOEXEC
-#define O_CLOEXEC 0
-#endif
-
#ifndef SOCK_CLOEXEC
#define SOCK_CLOEXEC 0
#endif
diff --git a/src/info.c b/src/info.c
index 76f1f4e0..958f7b02 100644
--- a/src/info.c
+++ b/src/info.c
@@ -33,10 +33,6 @@
#include "guestfs-internal-actions.h"
#include "guestfs_protocol.h"
-#ifndef O_CLOEXEC
-#define O_CLOEXEC 0
-#endif
-
static int run_qemu_img_info (guestfs_h *g, const char *filename, int (*fn) (guestfs_h *g, char *line, void *data), void *data);
static int check_disk_format (guestfs_h *h, char *line, void *data);
static int check_disk_virtual_size (guestfs_h *h, char *line, void *data);
diff --git a/tests/c-api/test-last-errno.c b/tests/c-api/test-last-errno.c
index b515624f..1773349a 100644
--- a/tests/c-api/test-last-errno.c
+++ b/tests/c-api/test-last-errno.c
@@ -31,10 +31,6 @@
#include "guestfs.h"
-#ifndef O_CLOEXEC
-#define O_CLOEXEC 0
-#endif
-
int
main (int argc, char *argv[])
{
diff --git a/tests/c-api/test-user-cancel.c b/tests/c-api/test-user-cancel.c
index 8bc2fc20..164997a4 100644
--- a/tests/c-api/test-user-cancel.c
+++ b/tests/c-api/test-user-cancel.c
@@ -46,10 +46,6 @@
#include "guestfs.h"
-#ifndef O_CLOEXEC
-#define O_CLOEXEC 0
-#endif
-
static const char *filename = "test.img";
static const off_t filesize = 1024*1024*1024;
diff --git a/tests/xml/fake-libvirt-xml.c b/tests/xml/fake-libvirt-xml.c
index 61065d3d..a34b700a 100644
--- a/tests/xml/fake-libvirt-xml.c
+++ b/tests/xml/fake-libvirt-xml.c
@@ -25,10 +25,6 @@
#include <sys/types.h>
#include <sys/stat.h>
-#ifndef O_CLOEXEC
-#define O_CLOEXEC 0
-#endif
-
/* Old <libvirt.h> had a slightly different definition of
* virDomainGetXMLDesc (using 'int' for flags instead of 'unsigned
* int'). To avoid an error trying to redefine it with a different