httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rodent of Unusual Size <Ken.C...@Golux.Com>
Subject Re: SERVER_VERSION with OS
Date Mon, 20 Apr 1998 19:55:34 GMT
Jim Jagielski wrote:
> 
> Yeah... Ken's idea was a good one. If we set the max-length of SERVER_VERSION
> to some value, then we can allocate it at compile time and then strncat
> the "comments" and "additions" run-time.

Why limit the length?

How about the attached?  We might want to change the name of buildmark.c
before long; it's starting to grow beyond its original intention..

This is a partial solution - the necessary primitive.  Actually making
the changes to call it in the right places is another patch.

#ken	P-)}

Ken Coar                    <http://Web.Golux.Com/coar/>
Apache Group member         <http://www.apache.org/>
"Apache Server for Dummies" <http://Web.Golux.Com/coar/ASFD/>

Index: buildmark.c
===================================================================
RCS file: /export/home/cvs/apache-1.3/src/buildmark.c,v
retrieving revision 1.6
diff -u -r1.6 buildmark.c
--- buildmark.c 1998/04/11 12:00:16     1.6
+++ buildmark.c 1998/04/20 19:47:32
@@ -63,7 +63,16 @@
 #else
 static const char server_built[] = "unknown";
 #endif
-static const char server_version[] = SERVER_VERSION;
+static char *server_version = SERVER_VERSION;
+static pool *idpool = NULL;
+
+API_EXPORT(void) ap_add_version_component(const char *s)
+{
+    if (idpool == NULL) {
+        idpool = ap_make_sub_pool(NULL);
+    }
+    server_version = ap_pstrcat(idpool, server_version, " ", s, NULL);
+}
 
 API_EXPORT(const char *) ap_get_server_built()
 {

Mime
View raw message