[svn-commits] jpeeler: branch 1.8 r291791 - /branches/1.8/main/stdtime/localtime.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Thu Oct 14 13:45:08 CDT 2010


Author: jpeeler
Date: Thu Oct 14 13:45:02 2010
New Revision: 291791

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=291791
Log:
Add missing ifdefs for test framework and new locale code.

(closes issue #18137)
Reported by: ovi
Patches: 
      18137_test_framework_ifdef.patch uploaded by wdoekes (license 717)
      18137_localelist_warning.patch uploaded by wdoekes (license 717)
Tested by: ovi


Modified:
    branches/1.8/main/stdtime/localtime.c

Modified: branches/1.8/main/stdtime/localtime.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.8/main/stdtime/localtime.c?view=diff&rev=291791&r1=291790&r2=291791
==============================================================================
--- branches/1.8/main/stdtime/localtime.c (original)
+++ branches/1.8/main/stdtime/localtime.c Thu Oct 14 13:45:02 2010
@@ -250,7 +250,9 @@
 				int lastditch));
 
 static AST_LIST_HEAD_STATIC(zonelist, state);
+#ifdef HAVE_NEWLOCALE
 static AST_LIST_HEAD_STATIC(localelist, locale_entry);
+#endif
 
 #ifndef TZ_STRLEN_MAX
 #define TZ_STRLEN_MAX 255
@@ -554,9 +556,12 @@
 			stat(name, &st);
 			lstat(name, &lst);
 			if (st.st_mtime > cur->mtime[0] || lst.st_mtime > cur->mtime[1]) {
+#ifdef TEST_FRAMEWORK
 				if (test) {
 					ast_test_status_update(test, "Removing cached TZ entry '%s' because underlying file changed. (%ld != %ld) or (%ld != %ld)\n", name, st.st_mtime, cur->mtime[0], lst.st_mtime, cur->mtime[1]);
-				} else {
+				} else
+#endif
+				{
 					ast_log(LOG_NOTICE, "Removing cached TZ entry '%s' because underlying file changed.\n", name);
 				}
 				AST_LIST_REMOVE_CURRENT(list);




More information about the svn-commits mailing list