[tz] [PROPOSED PATCH] Make the library thread-safe if THREAD_SAFE is defined.

Paul Eggert eggert at cs.ucla.edu
Mon Aug 18 14:48:01 UTC 2014


The attached minor fixup squashes a compiler warning caused by the 
proposed patch when compiled without STD_INSPIRED.
-------------- next part --------------
From 5e8482c23f95d1d241ef1628231f8fde50631935 Mon Sep 17 00:00:00 2001
From: Paul Eggert <eggert at cs.ucla.edu>
Date: Mon, 18 Aug 2014 07:42:39 -0700
Subject: [PATCH] * localtime.c (tzsetwall): Define only if STD_INSPIRED.

This removes lint in the !STD_INSPIRED case, as this function
is now unused in that case.
---
 localtime.c | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)

diff --git a/localtime.c b/localtime.c
index f499583..fef273d 100644
--- a/localtime.c
+++ b/localtime.c
@@ -1166,13 +1166,7 @@ tzsetwall_unlocked(void)
   lcl_is_set = -1;
 }
 
-#ifndef STD_INSPIRED
-/*
-** A non-static declaration of tzsetwall in a system header file
-** may cause a warning about this upcoming static declaration...
-*/
-static
-#endif /* !defined STD_INSPIRED */
+#ifdef STD_INSPIRED
 void
 tzsetwall(void)
 {
@@ -1181,6 +1175,7 @@ tzsetwall(void)
   tzsetwall_unlocked();
   unlock();
 }
+#endif
 
 static void
 tzset_unlocked(void)
-- 
1.9.1


More information about the tz mailing list