syntax: Remove definitions of O_CLOEXEC, except in examples (thanks Jim Meyering).

The gnulib <fcntl.h> replacement header will now define this symbol if
it's not defined already.
This commit is contained in:
Richard W.M. Jones
2012-09-17 09:51:01 +01:00
parent 2337b9ccd7
commit cb13ffe190
10 changed files with 1 additions and 36 deletions

View File

@@ -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;

1
cfg.mk
View File

@@ -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 = \

View File

@@ -30,10 +30,6 @@
#include "guestfs_protocol.h"
#ifndef O_CLOEXEC
#define O_CLOEXEC 0
#endif
/*-- in guestfsd.c --*/
extern int verbose;

View File

@@ -23,10 +23,6 @@
#include "fish-cmds.h"
#ifndef O_CLOEXEC
#define O_CLOEXEC 0
#endif
#ifndef SOCK_CLOEXEC
#define SOCK_CLOEXEC 0
#endif

View File

@@ -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)

View File

@@ -30,10 +30,6 @@
#include "hash.h"
#ifndef O_CLOEXEC
#define O_CLOEXEC 0
#endif
#ifndef SOCK_CLOEXEC
#define SOCK_CLOEXEC 0
#endif

View File

@@ -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);

View File

@@ -31,10 +31,6 @@
#include "guestfs.h"
#ifndef O_CLOEXEC
#define O_CLOEXEC 0
#endif
int
main (int argc, char *argv[])
{

View File

@@ -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;

View File

@@ -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