Commits

Michał Górny  committed ee83b59

Move C standard definition back to .c file as different units may use
different features.

  • Participants
  • Parent commits 5e6c368

Comments (0)

Files changed (2)

File mirage-features.h

  * released under 3-clause BSD license
  */
 
-/* PART ONE: let user disable all of them easily */
-
 #ifdef NO_POSIX
 #	define NO_MMAPIO
 #	define NO_GNU
 #ifdef NO_GNU
 #	define NO_GETOPT_LONG
 #endif
-
-/* PART TWO: check if user has disabled all of them (easily or not) */
-
-#undef ANY_GNU
-#undef ANY_POSIX
-
-#ifndef NO_GETOPT_LONG
-#	define ANY_GNU 1
-#endif
-
-#ifndef NO_MMAPIO
-#	define ANY_POSIX 1
-#endif
-
-/* PART THREE: set right C standard */
-
-#ifdef ANY_GNU
-#	define _GNU_SOURCE 1
-#else
-#	ifdef ANY_POSIX
-#		define _POSIX_C_SOURCE 200112L
-#	else
-#		define _ISOC99_SOURCE 1
-#	endif
-#endif

File mirage2iso.c

 
 #include "mirage-features.h"
 
+#ifndef NO_MMAPIO
+#	define _POSIX_C_SOURCE 200112L
+#else
+#	define _ISOC99_SOURCE 1
+#endif
+
 #include <stdlib.h>
 #include <stdio.h>
 #include <stdbool.h>