Merged revisions 291791 via svnmerge from
authorJeff Peeler <jpeeler@digium.com>
Thu, 14 Oct 2010 18:46:54 +0000 (18:46 +0000)
committerJeff Peeler <jpeeler@digium.com>
Thu, 14 Oct 2010 18:46:54 +0000 (18:46 +0000)
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r291791 | jpeeler | 2010-10-14 13:45:02 -0500 (Thu, 14 Oct 2010) | 10 lines

  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
........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@291792 65c4cc65-6c06-0410-ace0-fbb531ad65f3

main/stdtime/localtime.c

index 1e75edd..4e0fd76 100644 (file)
@@ -250,7 +250,9 @@ static int          tzparse P((const char * name, struct state * sp,
                                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 @@ static void *notify_daemon(void *data)
                        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);