efl_io_file: unbreak windows build (missing O_CLOEXEC).
authorGustavo Sverzut Barbieri <barbieri@profusion.mobi>
Fri, 16 Sep 2016 10:26:54 +0000 (07:26 -0300)
committerGustavo Sverzut Barbieri <barbieri@profusion.mobi>
Fri, 16 Sep 2016 10:26:54 +0000 (07:26 -0300)
To avoid many ifdef, define the flag to 0 so we "| 0" or "& ~0", that
have no effect.

Fixes T4612.

src/lib/ecore/efl_io_file.c

index a5ec38f..f6588bb 100644 (file)
 #include <sys/stat.h>
 #include <fcntl.h>
 
+#ifndef O_CLOEXEC
+/* If a platform doesn't define O_CLOEXEC, then use 0 as we'll "| 0"
+ * and "& ~0", which have no effect.
+ *
+ * This should be the case on _WIN32.
+ */
+#define O_CLOEXEC (0)
+#endif
+
 #define MY_CLASS EFL_IO_FILE_CLASS
 
 typedef struct _Efl_Io_File_Data