freetype-commit
[Top][All Lists]
Advanced

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

[freetype2] master 1c8bb63: [ftrandom] Minor improvements.


From: Werner LEMBERG
Subject: [freetype2] master 1c8bb63: [ftrandom] Minor improvements.
Date: Mon, 5 Sep 2016 06:14:16 +0000 (UTC)

branch: master
commit 1c8bb632991cbd06e5e44c892e4daec472b08cc6
Author: Werner Lemberg <address@hidden>
Commit: Werner Lemberg <address@hidden>

    [ftrandom] Minor improvements.
    
    * src/tools/ftrandom/ftrandom.c (_XOPEN_SOURCE): New macro, set to
    500.
    
    * src/tools/ftrandom/Makefile (CFLAGS): Split off include
    directories to ...
    (INCLUDES): ... this new variable.
    (LDFLAGS): New variable.
    (ftrandom.o, ftrandom): Updated.
---
 ChangeLog                     |   13 +++++++++++++
 src/tools/ftrandom/Makefile   |    9 +++++----
 src/tools/ftrandom/ftrandom.c |    3 +++
 3 files changed, 21 insertions(+), 4 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 2dd9f5c..c48ce6f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,18 @@
 2016-09-05  Werner Lemberg  <address@hidden>
 
+       [ftrandom] Minor improvements.
+
+       * src/tools/ftrandom/ftrandom.c (_XOPEN_SOURCE): New macro, set to
+       500.
+
+       * src/tools/ftrandom/Makefile (CFLAGS): Split off include
+       directories to ...
+       (INCLUDES): ... this new variable.
+       (LDFLAGS): New variable.
+       (ftrandom.o, ftrandom): Updated.
+
+2016-09-05  Werner Lemberg  <address@hidden>
+
        [autofit] Improve Armenian support.
 
        Thanks to Hrant H Papazian <address@hidden> for help.
diff --git a/src/tools/ftrandom/Makefile b/src/tools/ftrandom/Makefile
index 61fdf48..24dc49c 100644
--- a/src/tools/ftrandom/Makefile
+++ b/src/tools/ftrandom/Makefile
@@ -25,8 +25,9 @@ WFLAGS = -Wmissing-prototypes \
          -Wchar-subscripts \
          -Wsequence-point
 CFLAGS = $(WFLAGS) \
-         -g \
-         -I $(TOP_DIR)/include
+         -g
+INCLUDES = -I $(TOP_DIR)/include
+LDFLAGS =
 LIBS = -lm \
        -lz \
        -lpng \
@@ -36,9 +37,9 @@ LIBS = -lm \
 all: $(OBJ_DIR)/ftrandom
 
 $(OBJ_DIR)/ftrandom.o: $(SRC_DIR)/ftrandom.c
-       $(CC) -c -o $@ $(CFLAGS) $<
+       $(CC) $(CFLAGS) $(INCLUDES) -c -o $@ $<
 
 $(OBJ_DIR)/ftrandom: $(OBJ_DIR)/ftrandom.o libfreetype.a
-       $(CC) -o $(OBJ_DIR)/ftrandom $^ $(LIBS)
+       $(CC) $(LDFLAGS) -o $@ $^ $(LIBS)
 
 # EOF
diff --git a/src/tools/ftrandom/ftrandom.c b/src/tools/ftrandom/ftrandom.c
index 2ae2a8a..ff31169 100644
--- a/src/tools/ftrandom/ftrandom.c
+++ b/src/tools/ftrandom/ftrandom.c
@@ -29,6 +29,9 @@
 /* This file is now part of the FreeType library */
 
 
+#define _XOPEN_SOURCE 500 /* for `kill', `strdup', `random', and `srandom' */
+
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>



reply via email to

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