httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ralf S. Engelschall" <...@engelschall.com>
Subject Re: [PATCH] MODULE_MAGIC_COOKIE field for module structure
Date Mon, 09 Nov 1998 11:12:29 GMT

In article <19981108201039.B9169@deejai.mch.sni.de> you wrote:
> On Fri, Nov 06, 1998 at 12:58:01PM +0100, Ralf S. Engelschall wrote:
>> --- ap_mmn.h	1998/10/03 18:46:01	1.9
>> +++ ap_mmn.h	1998/11/06 11:45:53
>> @@ -181,7 +181,10 @@
>>   *                        (for implementing better error reporting).
>>   * 19980906 (1.3.2-dev) - added ap_md5_binary()
>>   * 19980917 (1.3.2-dev) - bs2000: changed os_set_authfile() to os_set_account()
>> + * 19981005 (1.3.4-dev) - Added MODULE_MAGIC_COOKIE to identify module structures
>>   */

> You missed Roy's recent WebDAV MMN bump.

I've posted the patch before Roy comitted the WebDAV stuff, I think.

>> +#define MODULE_MAGIC_COOKIE 0x4150414348453133 /* "APACHE13" */

> Can I have some lower case letters here? Or even better: a String?
> (That would allow the name to be readable even on EBCDIC platforms).
> FWIW, it doesn't have to be a zero-delimited string if the length of
> eight matters. Just a thought. OTOH, comparing a long is easier.

That's why I've done it this way: I wanted to easily compare it.  But it's not
very important. We can use the string "apache13", of course.

> BTW, what do you expect the size of a long to be? 

A minimum of 8 bytes as ANSI C guarantees. Isn't it this way?

> On most of my
> machines, it's still a 4-byte qualtity, only long long (if
> supported) is 8 bytes. That would seriously degrade the
> "understandability" of your patch...
> Even with an appended "UL"
> #define MODULE_MAGIC_COOKIE 0x4150414348453133UL /* "APACHE13" */
> I still get
> /tmp/x.c      4: [warning]:   Integer too big
> (and truncation to 4 bytes).

Ops, that's interesting. Hmmm... ok as I said: I can change the stuff to a
string "apache13". But OTOH why is it this way, i.e. why does it fail? It
should fit into an unsigned long... Hmmm... confusing.

> Other than that, I'm +1 on the concept.

Fine. I'll change the id to a string "apache13" and post a "take 2" of the
patch.
                                       Ralf S. Engelschall
                                       rse@engelschall.com
                                       www.engelschall.com

Mime
View raw message