From e81b8727aaafa306858565c0e4116703c4893459 Mon Sep 17 00:00:00 2001 From: Fredrik Roubert Date: Mon, 22 Jan 2024 13:43:19 +0900 Subject: [PATCH] ICU-22532 Move the definition of _POSIX_C_SOURCE to the Makefile. This is already set in Makefile.in and therefore results in a macro redefined warning if also defined in the source file. It seems that setting this in the Makefile was how it was originally intended do be done (but then it was just never updated there). --- icu4c/source/tools/tzcode/Makefile.in | 3 ++- icu4c/source/tools/tzcode/zic.c | 3 --- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/icu4c/source/tools/tzcode/Makefile.in b/icu4c/source/tools/tzcode/Makefile.in index d1008426136..ac517714788 100644 --- a/icu4c/source/tools/tzcode/Makefile.in +++ b/icu4c/source/tools/tzcode/Makefile.in @@ -27,7 +27,8 @@ TDATA = $(PRIMARY_DATA) $(SUPPLEMENTAL_DATA) TZDIR=zoneinfo -CFLAGS+=-D_POSIX_C_SOURCE +# https://man7.org/linux/man-pages/man2/symlink.2.html +CFLAGS+=-D_POSIX_C_SOURCE=200112L CPPFLAGS+= -DTZDIR=\"$(TZDIR)\" # more data diff --git a/icu4c/source/tools/tzcode/zic.c b/icu4c/source/tools/tzcode/zic.c index ed3e79239df..54576780d5f 100644 --- a/icu4c/source/tools/tzcode/zic.c +++ b/icu4c/source/tools/tzcode/zic.c @@ -3,9 +3,6 @@ ** 2006-07-17 by Arthur David Olson. */ -/* https://man7.org/linux/man-pages/man2/symlink.2.html */ -#define _POSIX_C_SOURCE 200112L - /* Enable extensions and modifications for ICU. */ #define ICU