* handle webcit version through sysdep.h
authorWilfried Göesgens <willi@citadel.org>
Thu, 25 Oct 2007 21:51:16 +0000 (21:51 +0000)
committerWilfried Göesgens <willi@citadel.org>
Thu, 25 Oct 2007 21:51:16 +0000 (21:51 +0000)
webcit/autocompletion.c
webcit/configure.ac
webcit/groupdav_main.c
webcit/messages.c
webcit/rss.c
webcit/summary.c
webcit/webcit.c
webcit/webcit.h
webcit/webserver.c

index 8c516f767000aac459b23116afd1722a8924960b..e9c87ab0d6e2509d1fdd38479831207750527677 100644 (file)
@@ -25,7 +25,7 @@ void recp_autocomplete(char *partial) {
                "Cache-Control: no-store\r\n"
                "Expires: -1\r\n"
                ,
-               SERVER);
+               PACKAGE_STRING);
        begin_burst();
 
        wprintf("<ul>");
index 18dccdf75db0b83115ab9a5c1d9059e1cd38ad6a..06e7247c75623aca10bad59027892e5513999906 100644 (file)
@@ -1,14 +1,6 @@
 dnl Process this file with autoconf to produce a configure script.
 dnl $Id$
-AC_INIT(webserver.c)
-
-
-PACKAGE=webcit
-VERSION=7.22
-AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [our package name])
-AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [our package version])
-AC_SUBST(PACKAGE)
-AC_SUBST(VERSION)
+AC_INIT([WebCit], [7.22], [http://www.citadel.org/])
 
 AC_SUBST(PROG_SUBDIRS)
 AC_DEFINE(PROG_SUBDIRS, [], [Program dirs])
index fe3bbe64343a45aaad15990cbd7d742f55cba5bc..651cdb28d956c7ea0360738b2a053d5b2a14e968 100644 (file)
@@ -22,7 +22,7 @@ void groupdav_common_headers(void) {
        wprintf(
                "Server: %s / %s\r\n"
                "Connection: close\r\n",
-               SERVER, serv_info.serv_software
+               PACKAGE_STRING, serv_info.serv_software
        );
 }
 
index f06d17fd9ccb41eae09db20e6310d1fc18f9886e..0c417baedd63c7b940b976357708223b5bfdc439 100644 (file)
@@ -1257,7 +1257,7 @@ void print_message(char *msgnum_as_string) {
        wprintf("Content-type: text/html\r\n"
                "Server: %s\r\n"
                "Connection: close\r\n",
-               SERVER);
+               PACKAGE_STRING);
        begin_burst();
 
        wprintf("\r\n\r\n<html>\n"
@@ -1288,7 +1288,7 @@ void display_headers(char *msgnum_as_string) {
        wprintf("Content-type: text/plain\r\n"
                "Server: %s\r\n"
                "Connection: close\r\n",
-               SERVER);
+               PACKAGE_STRING);
        begin_burst();
 
        serv_printf("MSG2 %ld|3", msgnum);
@@ -2760,7 +2760,7 @@ void post_mime_to_server(void) {
 
        /** RFC2045 requires this, and some clients look for it... */
        serv_puts("MIME-Version: 1.0");
-       serv_puts("X-Mailer: " SERVER);
+       serv_puts("X-Mailer: " PACKAGE_STRING);
 
        /** If there are attachments, we have to do multipart/mixed */
        if (WC->first_attachment != NULL) {
index f34c4920953dea4306805edb3940b729b885b959..fd8fad0ea265294e2294d86a9d722b81283d38e3 100644 (file)
@@ -128,7 +128,7 @@ void display_rss(char *roomname, char *request_method)
        wprintf("Last-Modified: %s\r\n", date);
 /*     if (*msgn) wprintf("ETag: %s\r\n\r\n", msgn); */
        wprintf("Content-Type: application/rss+xml\r\n");
-       wprintf("$erver: %s\r\n", SERVER);
+       wprintf("$erver: %s\r\n", PACKAGE_STRING);
        wprintf("Connection: close\r\n");
        wprintf("\r\n");
        if (!strcasecmp(request_method, "HEAD"))
@@ -157,7 +157,7 @@ void display_rss(char *roomname, char *request_method)
        if (now) {
                wprintf("   <pubDate>%s</pubDate>\n", date);
        }
-       wprintf("   <generator>%s</generator>\n", SERVER);
+       wprintf("   <generator>%s</generator>\n", PACKAGE_STRING);
        wprintf("   <docs>http://blogs.law.harvard.edu/tech/rss</docs>\n");
        wprintf("   <ttl>30</ttl>\n");
 
index bcab5df637a6f2ca909d3bac4f8c35892df3cbd8..090e2fe9a37bfe840f450b83b134765dedcffc47 100644 (file)
@@ -201,7 +201,7 @@ void server_info_section(void) {
                _("You are connected to %s, running %s with %s, and located in %s.  Your system administrator is %s."),
                serv_info.serv_humannode,
                serv_info.serv_software,
-               SERVER,
+               PACKAGE_STRING,
                serv_info.serv_bbs_city,
                serv_info.serv_sysadm);
        escputs(message);
index e3cef8ff782e95c43ab1e57efe2b791c73bbe2f8..11c764c326113b0cf48f3b876cdabd3314c79677 100644 (file)
@@ -466,7 +466,7 @@ void output_headers(        int do_httpheaders,     /**< 1 = output HTTP headers
                wprintf("Content-type: text/html; charset=utf-8\r\n"
                        "Server: %s / %s\n"
                        "Connection: close\r\n",
-                       SERVER, serv_info.serv_software
+                       PACKAGE_STRING, serv_info.serv_software
                );
        }
 
@@ -571,7 +571,7 @@ void http_transmit_thing(char *thing, size_t length, char *content_type,
                "Server: %s\r\n"
                "Connection: close\r\n",
                content_type,
-               SERVER);
+               PACKAGE_STRING);
 
 #ifdef HAVE_ZLIB
        /** If we can send the data out compressed, please do so. */
@@ -998,7 +998,7 @@ void begin_ajax_response(void) {
                 "Cache-Control: no-cache\r\n"
                "Expires: -1\r\n"
                ,
-                SERVER);
+                PACKAGE_STRING);
         begin_burst();
 }
 
index 505f49760f03daccc438b094371e7ca8325b6c73..eebfbcb077a7a15f16a50a265165f3f16f4503fd 100644 (file)
@@ -68,32 +68,32 @@ extern locale_t wc_locales[];
 #endif
 
 
-#ifdef WEBCIT_WITH_CALENDAR_SERVICE
 /* Work around PACKAGE/VERSION defs that are (not supposed to be?) in ical.h */
 #ifdef PACKAGE
 # define CTDL_PACKAGE PACKAGE
 # undef PACKAGE
 #endif
+
+#ifdef PACKAGE_STRING
+# define CTDL_PACKAGE_STRING PACKAGE_STRING
+//# undef PACKAGE_STRING
+#endif
+
 #ifdef VERSION
 # define CTDL_VERSION VERSION
 # undef VERSION
 #endif
+
 #include <ical.h>
-#ifdef CTDL_PACKAGE
-# ifdef PACKAGE
-#  undef PACKAGE
-# endif
-# define PACKAGE CTDL_PACKAGE
-# undef CTDL_PACKAGE
-#endif
-#ifdef CTDL_VERSION
-# ifdef VERSION
-#  undef VERSION
-# endif
-# define VERSION CTDL_VERSION
-# undef CTDL_VERSION
-#endif
-#endif
+
+#undef PACKAGE
+#undef VERSION
+#undef PACKAGE_NAME
+#undef PACKAGE_STRING
+#undef PACKAGE_TARNAME
+#undef PACKAGE_VERSION
+#undef PACKAGE_BUGREPORT
+#include "sysdep.h"
 
 
 
@@ -115,7 +115,6 @@ extern locale_t wc_locales[];
 #define SLEEPING               180             /* TCP connection timeout */
 #define WEBCIT_TIMEOUT         900             /* WebCit session timeout */
 #define PORT_NUM               2000            /* port number to listen on */
-#define SERVER                 "WebCit v7.22"  /* who's in da house */
 #define DEVELOPER_ID           0
 #define CLIENT_ID              4
 #define CLIENT_VERSION         722             /* This version of WebCit */
index 38a1f0d1ee2d205fbf40534fbb91838300900859..55439dc6907ec594849b225d1ea7b62127ea494a 100644 (file)
@@ -739,7 +739,7 @@ int main(int argc, char **argv)
        }
 
        /** Tell 'em who's in da house */
-       lprintf(1, SERVER "\n");
+       lprintf(1, PACKAGE_STRING "\n");
        lprintf(1, "Copyright (C) 1996-2007 by the Citadel development team.\n"
                "This software is distributed under the terms of the "
                "GNU General Public License.\n\n"