/[cvs]/eggdrop1.8/src/eggdrop.h
ViewVC logotype

Diff of /eggdrop1.8/src/eggdrop.h

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.4 by pseudo, Thu Aug 5 18:20:34 2010 UTC revision 1.5 by pseudo, Thu Oct 14 09:49:47 2010 UTC
# Line 195  Line 195 
195  /* Yikes...who would have thought finding a usable random() would be so much  /* Yikes...who would have thought finding a usable random() would be so much
196   * trouble?   * trouble?
197   * Note: random(), rand(), and lrand48() are *not* thread safe.   * Note: random(), rand(), and lrand48() are *not* thread safe.
198     *
199     * QNX doesn't include random() and srandom() in libc.so, only in libc.a
200     * So we can only use these functions in static builds on QNX.
201   */   */
202    #if defined QNX_HACKS && defined MAKING_MODS
203    #  undef HAVE_RANDOM
204    #  undef HAVE_SRANDOM
205    #endif
206    
207  #ifdef HAVE_RANDOM  #ifdef HAVE_RANDOM
208    /* On systems with random(), RANDOM_MAX may or may not be defined.    /* On systems with random(), RANDOM_MAX may or may not be defined.
209     *     *
# Line 244  Line 252 
252  /* Use high-order bits for getting the random integer. With a modern  /* Use high-order bits for getting the random integer. With a modern
253   * random() implmentation, modulo would probably be sufficient, but on   * random() implmentation, modulo would probably be sufficient, but on
254   * systems lacking random(), it may just be a macro for an older rand()   * systems lacking random(), it may just be a macro for an older rand()
255   * fucntion.   * function.
256   */   */
257  #define randint(n) (unsigned long) (random() / (RANDOM_MAX + 1.0) * n)  #define randint(n) (unsigned long) (random() / (RANDOM_MAX + 1.0) * n)
258    

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.5

webmaster@eggheads.org
ViewVC Help
Powered by ViewVC 1.1.23