aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2014-06-18 01:50:10 +0200
committerMattias Andrée <maandree@operamail.com>2014-06-18 01:50:10 +0200
commit132d5fad266b1af8ea0cc61c8d55192113f14e2b (patch)
tree094f320da925c488bf452cece7518e49985adafb
parentadd missing _error suffix (diff)
downloadlibgamma-132d5fad266b1af8ea0cc61c8d55192113f14e2b.tar.gz
libgamma-132d5fad266b1af8ea0cc61c8d55192113f14e2b.tar.bz2
libgamma-132d5fad266b1af8ea0cc61c8d55192113f14e2b.tar.xz
use, and define, __GCC__ rather than usign __GNUC__
Signed-off-by: Mattias Andrée <maandree@operamail.com>
-rw-r--r--DEPENDENCIES4
-rw-r--r--Makefile6
-rw-r--r--src/lib/fake-quartz-cg.c4
-rw-r--r--src/lib/fake-quartz-cg.h2
-rw-r--r--src/lib/fake-w32-gdi.c4
-rw-r--r--src/lib/fake-w32-gdi.h2
-rw-r--r--src/lib/gamma-helper.c4
-rw-r--r--src/lib/gamma-x-randr.c4
-rw-r--r--src/lib/libgamma-error.h2
-rw-r--r--src/lib/libgamma-facade.c.gpp4
-rw-r--r--src/lib/libgamma-method.h2
-rw-r--r--src/test/methods.h2
-rw-r--r--src/test/test.c4
-rw-r--r--src/test/update-warnings.h2
14 files changed, 26 insertions, 20 deletions
diff --git a/DEPENDENCIES b/DEPENDENCIES
index 45722e9..75db006 100644
--- a/DEPENDENCIES
+++ b/DEPENDENCIES
@@ -23,7 +23,7 @@ BUILD DEPENDENCIES:
grep
sed
coreutils
- gcc
+ c99 gcc is preferred
general-preprocessor (gpp)
python Both Python 2 and Python 3 will work
texinfo Optional: for info, pdf, ps and dvi manuals
@@ -46,7 +46,7 @@ DEPENDENCIES SOURCES:
grep https://www.gnu.org/software/grep
sed https://www.gnu.org/software/sed
coreutils https://www.gnu.org/software/coreutils
- gcc https://gcc.gnu.org
+ c99 https://gcc.gnu.org
general-preprocessor (gpp) https://github.com/maandree/gpp
python https://www.python.org/
texinfo https://www.gnu.org/software/texinfo/
diff --git a/Makefile b/Makefile
index 179d44f..1dc49d3 100644
--- a/Makefile
+++ b/Makefile
@@ -116,6 +116,12 @@ endif
LIB_FLAGS = $(TEST_FLAGS) $(DEBUG_FLAGS) $(DEFINITIONS) -DLIBGAMMA_CONFIG_H
+ifeq ($(CC),gcc)
+TEST_FLAGS += -D__GCC__
+LIB_FLAGS += -D__GCC__
+endif
+
+
# Build rules.
.PHONY: default
diff --git a/src/lib/fake-quartz-cg.c b/src/lib/fake-quartz-cg.c
index a3e405f..e52ef71 100644
--- a/src/lib/fake-quartz-cg.c
+++ b/src/lib/fake-quartz-cg.c
@@ -147,7 +147,7 @@ static uint16_t* restrict original_ramps = NULL;
/* xcb violates the rule to never return struct:s. */
-#ifdef __GNUC__
+#ifdef __GCC__
# pragma GCC diagnostic push
# pragma GCC diagnostic ignored "-Waggregate-return"
#endif
@@ -364,7 +364,7 @@ uint32_t CGDisplayGammaTableCapacity(CGDirectDisplayID display)
}
-#ifdef __GNUC__
+#ifdef __GCC__
# pragma GCC diagnostic pop
#endif
diff --git a/src/lib/fake-quartz-cg.h b/src/lib/fake-quartz-cg.h
index 2a4630c..a19b3e9 100644
--- a/src/lib/fake-quartz-cg.h
+++ b/src/lib/fake-quartz-cg.h
@@ -23,7 +23,7 @@
#endif
-#ifndef __GNUC__
+#ifndef __GCC__
# define __attribute__
#endif
diff --git a/src/lib/fake-w32-gdi.c b/src/lib/fake-w32-gdi.c
index fe4732e..f151186 100644
--- a/src/lib/fake-w32-gdi.c
+++ b/src/lib/fake-w32-gdi.c
@@ -205,7 +205,7 @@ int GetDeviceCaps(HDC hDC, int nIndex)
/* xcb violates the rule to never return struct:s. */
-#ifdef __GNUC__
+#ifdef __GCC__
# pragma GCC diagnostic push
# pragma GCC diagnostic ignored "-Waggregate-return"
#endif
@@ -320,7 +320,7 @@ HDC CreateDC(LPCTSTR restrict lpszDriver, LPCTSTR restrict lpszDevice,
}
-#ifdef __GNUC__
+#ifdef __GCC__
# pragma GCC diagnostic pop
#endif
diff --git a/src/lib/fake-w32-gdi.h b/src/lib/fake-w32-gdi.h
index 8af440e..07f81a6 100644
--- a/src/lib/fake-w32-gdi.h
+++ b/src/lib/fake-w32-gdi.h
@@ -23,7 +23,7 @@
#endif
-#ifndef __GNUC__
+#ifndef __GCC__
# define __attribute__
#endif
diff --git a/src/lib/gamma-helper.c b/src/lib/gamma-helper.c
index b674ac9..45a38b5 100644
--- a/src/lib/gamma-helper.c
+++ b/src/lib/gamma-helper.c
@@ -55,7 +55,7 @@ static inline uint64_t float_to_64(float value)
{
/* XXX Which is faster? */
-#ifdef __GNUC__
+#ifdef __GCC__
/* `__int128` is a GNU C extension, which
(because it is not ISO C) emits a warning
under -pedantic. */
@@ -121,7 +121,7 @@ static inline uint64_t double_to_64(double value)
{
/* XXX Which is faster? */
-#ifdef __GNUC__
+#ifdef __GCC__
/* `__int128` is a GNU C extension, which
(because it is not ISO C) emits a warning
under -pedantic. */
diff --git a/src/lib/gamma-x-randr.c b/src/lib/gamma-x-randr.c
index efb3fb9..78695c5 100644
--- a/src/lib/gamma-x-randr.c
+++ b/src/lib/gamma-x-randr.c
@@ -162,7 +162,7 @@ void libgamma_x_randr_method_capabilities(libgamma_method_capabilities_t* restri
/* xcb violates the rule to never return struct:s. */
-#ifdef __GNUC__
+#ifdef __GCC__
# pragma GCC diagnostic push
# pragma GCC diagnostic ignored "-Waggregate-return"
#endif
@@ -974,7 +974,7 @@ int libgamma_x_randr_crtc_set_gamma_ramps(libgamma_crtc_state_t* restrict this,
}
-#ifdef __GNUC__
+#ifdef __GCC__
# pragma GCC diagnostic pop
#endif
diff --git a/src/lib/libgamma-error.h b/src/lib/libgamma-error.h
index 5d6e300..7b02e50 100644
--- a/src/lib/libgamma-error.h
+++ b/src/lib/libgamma-error.h
@@ -23,7 +23,7 @@
#endif
-#ifndef __GNUC__
+#ifndef __GCC__
# define __attribute__
#endif
diff --git a/src/lib/libgamma-facade.c.gpp b/src/lib/libgamma-facade.c.gpp
index 07ee4b9..349a63e 100644
--- a/src/lib/libgamma-facade.c.gpp
+++ b/src/lib/libgamma-facade.c.gpp
@@ -60,7 +60,7 @@ $>done
not have any adjustment methods enabled. */
#ifndef HAVE_LIBGAMMA_METHODS
# define HAVE_NO_LIBGAMMA_METHODS
-# ifdef __GNUC__
+# ifdef __GCC__
# pragma GCC diagnostic push
# pragma GCC diagnostic ignored "-Wsuggest-attribute=const"
# endif
@@ -1053,7 +1053,7 @@ $>crtc_set_gamma_ramps_f double rampsd
#ifdef HAVE_NO_LIBGAMMA_METHODS
-# ifdef __GNUC__
+# ifdef __GCC__
# pragma GCC diagnostic pop
# endif
#endif
diff --git a/src/lib/libgamma-method.h b/src/lib/libgamma-method.h
index 13eb9d9..303f912 100644
--- a/src/lib/libgamma-method.h
+++ b/src/lib/libgamma-method.h
@@ -23,7 +23,7 @@
#endif
-#ifndef __GNUC__
+#ifndef __GCC__
# define __attribute__
#endif
diff --git a/src/test/methods.h b/src/test/methods.h
index 8e99921..46b7319 100644
--- a/src/test/methods.h
+++ b/src/test/methods.h
@@ -19,7 +19,7 @@
#define LIBGAMMA_TEST_METHODS_H
-#ifndef __GNUC__
+#ifndef __GCC__
# define __attribute__()
#endif
diff --git a/src/test/test.c b/src/test/test.c
index 53b0515..eafe90f 100644
--- a/src/test/test.c
+++ b/src/test/test.c
@@ -126,12 +126,12 @@ typedef const char* str;
print_crtc_information_(size_t, "lu")
print_crtc_information_(signed, "i")
print_crtc_information_(int, "i")
-#ifdef __GNUC__
+#ifdef __GCC__
# pragma GCC diagnostic push
# pragma GCC diagnostic ignored "-Wdouble-promotion"
#endif
print_crtc_information_(float, "f")
-#ifdef __GNUC__
+#ifdef __GCC__
# pragma GCC diagnostic pop
#endif
print_crtc_information_(str, "s")
diff --git a/src/test/update-warnings.h b/src/test/update-warnings.h
index f361b8e..b400fe3 100644
--- a/src/test/update-warnings.h
+++ b/src/test/update-warnings.h
@@ -43,7 +43,7 @@
* accomplish this.
*/
-#ifdef __GNUC__
+#ifdef __GCC__
# if LIBGAMMA_ERROR_MIN < -46
# warning New error codes have been added to libgamma.
# endif