freetype-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[freetype2-demos] master 5b6ddbd: Minor compilation issues.


From: Werner LEMBERG
Subject: [freetype2-demos] master 5b6ddbd: Minor compilation issues.
Date: Sat, 29 Oct 2016 12:37:13 +0000 (UTC)

branch: master
commit 5b6ddbd132627edf74bc5ee7cdaf7e011db3f5ed
Author: Werner Lemberg <address@hidden>
Commit: Werner Lemberg <address@hidden>

    Minor compilation issues.
    
    * Makefile: Use ANSIFLAGS and select C99 for GNU-like compilers.
    
    * src/ftbench.c, src/ftcommon.c (_GNU_SOURCE): Define.  We use
    functionality not covered by ANSI.
---
 ChangeLog      |    9 +++++++++
 Makefile       |    6 ++++++
 src/ftbench.c  |    2 ++
 src/ftcommon.c |    2 ++
 4 files changed, 19 insertions(+)

diff --git a/ChangeLog b/ChangeLog
index 742f23f..6916475 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,14 @@
 2016-10-29  Werner Lemberg  <address@hidden>
 
+       Minor compilation issues.
+
+       * Makefile: Use ANSIFLAGS and select C99 for GNU-like compilers.
+
+       * src/ftbench.c, src/ftcommon.c (_GNU_SOURCE): Define.  We use
+       functionality not covered by ANSI.
+
+2016-10-29  Werner Lemberg  <address@hidden>
+
        Fix clang warnings.
 
        We now have a new `FT_ENCODING_OTHER' tag used for internal
diff --git a/Makefile b/Makefile
index 428d91e..25ca4ad 100644
--- a/Makefile
+++ b/Makefile
@@ -129,9 +129,15 @@ else
 
   COMPILE = $(CC) $(CPPFLAGS) \
                   $(CFLAGS) \
+                  $(ANSIFLAGS) \
                   $(INCLUDES:%=$I%) \
                   $DFT_CONFIG_MODULES_H="<ftmodule.h>"
 
+  # Enable C99 for gcc and g++ to avoid warnings.
+  ifneq ($(findstring -pedantic,$(COMPILE)),)
+    COMPILE += -std=c99
+  endif
+
   FTLIB := $(LIB_DIR)/$(LIBRARY).$A
 
   # `-lm' is required to compile on some Unix systems.
diff --git a/src/ftbench.c b/src/ftbench.c
index c3e7cce..63ef445 100644
--- a/src/ftbench.c
+++ b/src/ftbench.c
@@ -10,6 +10,8 @@
 /****************************************************************************/
 
 
+#define _GNU_SOURCE /* we want to use extensions to `time.h' if available */
+
 #include <stdlib.h>
 #include <stdio.h>
 #include <string.h>
diff --git a/src/ftcommon.c b/src/ftcommon.c
index 71972fb..2855c93 100644
--- a/src/ftcommon.c
+++ b/src/ftcommon.c
@@ -11,6 +11,8 @@
 /****************************************************************************/
 
 
+#define _GNU_SOURCE /* we use `strcasecmp' */
+
 #include <ft2build.h>
 #include FT_FREETYPE_H
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]