ref: 1c8bb632991cbd06e5e44c892e4daec472b08cc6
parent: c9adf1a14d55e1825633935d9e697e3b247f32e9
author: Werner Lemberg <[email protected]>
date: Mon Sep 5 04:13:42 EDT 2016
[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.
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,18 @@
2016-09-05 Werner Lemberg <[email protected]>
+ [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 <[email protected]>
+
[autofit] Improve Armenian support.
Thanks to Hrant H Papazian <[email protected]> for help.
--- a/src/tools/ftrandom/Makefile
+++ b/src/tools/ftrandom/Makefile
@@ -25,8 +25,9 @@
-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 @@
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
--- 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>