Unbreak compilation for compilers that don't recognize lone defs.
authorFabian Keil <fk@fabiankeil.de>
Thu, 28 May 2009 21:13:34 +0000 (21:13 +0000)
committerFabian Keil <fk@fabiankeil.de>
Thu, 28 May 2009 21:13:34 +0000 (21:13 +0000)
Reported by Lee.

cgi.c
errlog.c
jbsockets.c
parsers.c

diff --git a/cgi.c b/cgi.c
index d0c224d..9b0f4e3 100644 (file)
--- a/cgi.c
+++ b/cgi.c
@@ -1,4 +1,4 @@
-const char cgi_rcs[] = "$Id: cgi.c,v 1.117 2009/05/16 13:27:20 fabiankeil Exp $";
+const char cgi_rcs[] = "$Id: cgi.c,v 1.118 2009/05/28 17:07:42 fabiankeil Exp $";
 /*********************************************************************
  *
  * File        :  $Source: /cvsroot/ijbswa/current/cgi.c,v $
@@ -1409,7 +1409,7 @@ void get_http_time(int time_offset, char *buf, size_t buffer_size)
    /* get and save the gmt */
 #if HAVE_GMTIME_R
    t = gmtime_r(&current_time, &dummy);
-#elif def MUTEX_LOCKS_AVAILABLE
+#elif defined(MUTEX_LOCKS_AVAILABLE)
    privoxy_mutex_lock(&gmtime_mutex);
    t = gmtime(&current_time);
    privoxy_mutex_unlock(&gmtime_mutex);
@@ -1465,7 +1465,7 @@ static void get_locale_time(char *buf, size_t buffer_size)
 
 #if HAVE_LOCALTIME_R
    timeptr = localtime_r(&current_time, &dummy);
-#elif def MUTEX_LOCKS_AVAILABLE
+#elif defined(MUTEX_LOCKS_AVAILABLE)
    privoxy_mutex_lock(&localtime_mutex);
    timeptr = localtime(&current_time);
    privoxy_mutex_unlock(&localtime_mutex);
index ea3ad10..a6b4774 100644 (file)
--- a/errlog.c
+++ b/errlog.c
@@ -1,4 +1,4 @@
-const char errlog_rcs[] = "$Id: errlog.c,v 1.94 2009/05/19 17:47:22 fabiankeil Exp $";
+const char errlog_rcs[] = "$Id: errlog.c,v 1.95 2009/05/28 17:07:42 fabiankeil Exp $";
 /*********************************************************************
  *
  * File        :  $Source: /cvsroot/ijbswa/current/errlog.c,v $
@@ -427,7 +427,7 @@ static inline size_t get_log_timestamp(char *buffer, size_t buffer_size)
 
 #ifdef HAVE_LOCALTIME_R
    tm_now = *localtime_r(&now, &tm_now);
-#elif def MUTEX_LOCKS_AVAILABLE
+#elif defined(MUTEX_LOCKS_AVAILABLE)
    privoxy_mutex_lock(&localtime_mutex);
    tm_now = *localtime(&now); 
    privoxy_mutex_unlock(&localtime_mutex);
@@ -485,7 +485,7 @@ static inline size_t get_clf_timestamp(char *buffer, size_t buffer_size)
    time (&now); 
 #ifdef HAVE_GMTIME_R
    gmt = *gmtime_r(&now, &gmt);
-#elif def MUTEX_LOCKS_AVAILABLE
+#elif defined(MUTEX_LOCKS_AVAILABLE)
    privoxy_mutex_lock(&gmtime_mutex);
    gmt = *gmtime(&now);
    privoxy_mutex_unlock(&gmtime_mutex);
@@ -494,7 +494,7 @@ static inline size_t get_clf_timestamp(char *buffer, size_t buffer_size)
 #endif
 #ifdef HAVE_LOCALTIME_R
    tm_now = localtime_r(&now, &dummy);
-#elif def MUTEX_LOCKS_AVAILABLE
+#elif defined(MUTEX_LOCKS_AVAILABLE)
    privoxy_mutex_lock(&localtime_mutex);
    tm_now = localtime(&now); 
    privoxy_mutex_unlock(&localtime_mutex);
index 1133708..2a669cc 100644 (file)
@@ -1,4 +1,4 @@
-const char jbsockets_rcs[] = "$Id: jbsockets.c,v 1.59 2009/05/25 15:43:34 fabiankeil Exp $";
+const char jbsockets_rcs[] = "$Id: jbsockets.c,v 1.60 2009/05/28 17:07:42 fabiankeil Exp $";
 /*********************************************************************
  *
  * File        :  $Source: /cvsroot/ijbswa/current/jbsockets.c,v $
@@ -945,7 +945,7 @@ void get_host_information(jb_socket afd, char **ip_address, char **hostname)
       {
          host = NULL;
       }
-#elif def MUTEX_LOCKS_AVAILABLE
+#elif defined(MUTEX_LOCKS_AVAILABLE)
       privoxy_mutex_lock(&resolver_mutex);
       host = gethostbyaddr((const char *)&server.sin_addr, 
                            sizeof(server.sin_addr), AF_INET);
@@ -1111,7 +1111,7 @@ unsigned long resolve_hostname_to_ip(const char *host)
       {
          hostp = NULL;
       }
-#elif def MUTEX_LOCKS_AVAILABLE
+#elif defined(MUTEX_LOCKS_AVAILABLE)
       privoxy_mutex_lock(&resolver_mutex);
       while (NULL == (hostp = gethostbyname(host))
              && (h_errno == TRY_AGAIN) && (dns_retries++ < MAX_DNS_RETRIES))
index 0ee8ea7..aca606e 100644 (file)
--- a/parsers.c
+++ b/parsers.c
@@ -1,4 +1,4 @@
-const char parsers_rcs[] = "$Id: parsers.c,v 1.165 2009/05/28 17:07:42 fabiankeil Exp $";
+const char parsers_rcs[] = "$Id: parsers.c,v 1.166 2009/05/28 18:42:30 fabiankeil Exp $";
 /*********************************************************************
  *
  * File        :  $Source: /cvsroot/ijbswa/current/parsers.c,v $
@@ -2280,7 +2280,7 @@ static jb_err server_last_modified(struct client_state *csp, char **header)
       now = time(NULL);
 #ifdef HAVE_GMTIME_R
       gmtime_r(&now, &gmt);
-#elif def MUTEX_LOCKS_AVAILABLE
+#elif defined(MUTEX_LOCKS_AVAILABLE)
       privoxy_mutex_lock(&gmtime_mutex);
       gmtime(&now);
       privoxy_mutex_unlock(&gmtime_mutex);
@@ -2310,7 +2310,7 @@ static jb_err server_last_modified(struct client_state *csp, char **header)
             last_modified += rtime;
 #ifdef HAVE_GMTIME_R
             timeptr = gmtime_r(&last_modified, &gmt);
-#elif def MUTEX_LOCKS_AVAILABLE
+#elif defined(MUTEX_LOCKS_AVAILABLE)
             privoxy_mutex_lock(&gmtime_mutex);
             timeptr = gmtime(&last_modified);
             privoxy_mutex_unlock(&gmtime_mutex);
@@ -3030,7 +3030,7 @@ static jb_err client_if_modified_since(struct client_state *csp, char **header)
             tm += rtime * (negative ? -1 : 1);
 #ifdef HAVE_GMTIME_R
             timeptr = gmtime_r(&tm, &gmt);
-#elif def MUTEX_LOCKS_AVAILABLE
+#elif defined(MUTEX_LOCKS_AVAILABLE)
             privoxy_mutex_lock(&gmtime_mutex);
             timeptr = gmtime(&tm);
             privoxy_mutex_unlock(&gmtime_mutex);