> From: "dean gaudet" <[EMAIL PROTECTED]>
> Sent: Monday, September 10, 2001 8:26 PM


>> On Fri, 24 Aug 2001, Guenter Knauf wrote:
>>
>> > Hi, I've compiled mod_unique_id for Win32 and for Netware, and on both
>> > platforms it seems to work the same as with Unix, I can see a unique
>> > id with SSI and cgi scripts; so can someone please explain why we have
>> > the #error about not supporting multitask OS?

> Sounds like a worthy goal.  Gunter, based on Dean's comments below, are
> you
> willing to post a patch?  Since all have asked for these modules
> (vhost_alias
> as well), I'm going ahead and committing both to the Win32 build.  Since
> this
> is very likely a near-final 1.3 release, it would be nice to see those
> both
> build.
yes; will look into this.

For NetWare I found this definition in ./netware/os.h:
#define getpid GetThreadID
and in the NetWare header nwthread.h GetThreadID() is defined as:
int   GetThreadID( void );

for Win32 platform getpid() is defined in process.h:
_CRTIMP int __cdecl _getpid(void);
#define getpid   _getpid

I didnt find more information about these functions yet nor of other functions which I 
could use to concatenate with.
Do you think that they are insufficient for use with mod_unique_id?
On NetWare I assume that the ThreadID is always unique on the same machine, on Win32 I 
dont know.

The patch to get mod_unique_id compiled is only the #error ifdef:
- #ifdef MULTITHREAD
+ #if defined(MULTITHREAD) && !(defined(NETWARE) || defined(WIN32))

Guenter.

>> where the code uses a pid (getpid()) you need to use a concatenation of
>> pid and thread id.
>>
>> otherwise you violate some of the uniqueness guarantees.
>>
>> i just didn't bother trying to figure out how to get a thread id in any
>> sort of portable way and left that to folks who actually wanted the
>> module
>> on those platforms.
>>
>> (this is actually mentioned in the comments near the top of the file
>> describing how it works and the assumptions made.)

> As I've read.  IIRC there are some other subtle issues with the size of
> the
> unique key.  Be careful that we keep everyone in sync.

> Seems that we now have 64 bit cpu's with potentially 64 bit pids.  This
> adds
> to the equation, it looks like we need to cut over to those extra four
> bytes
> across all platforms.

> Bill



Reply via email to