Ignore:
Timestamp:
Feb 8, 2008 3:21:41 PM (14 years ago)
Author:
bennylp
Message:

More ticket #472: Fixed problem when building on Mingw. Now PJ_FD_SETSIZE_SETABLE is only enabled when winsock.h is present

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjlib/include/pj/config.h

    r1783 r1788  
    488488 */ 
    489489#ifndef PJ_IOQUEUE_MAX_HANDLES 
    490 #   if defined(PJ_WIN32_WINCE) && PJ_WIN32_WINCE!=0 
    491 #       define PJ_IOQUEUE_MAX_HANDLES   (64) 
    492 #   else 
    493 #       define PJ_IOQUEUE_MAX_HANDLES   (256) 
    494 #   endif 
     490#   define PJ_IOQUEUE_MAX_HANDLES       (64) 
    495491#endif 
    496492 
     
    533529/** 
    534530 * Determine if FD_SETSIZE is changeable/set-able. If so, then we will 
    535  * set it to PJ_IOQUEUE_MAX_HANDLES. 
    536  */ 
    537 /* This is awful, as we should actually check for __GLIBC__ rather than 
    538  * __GNUC__. But alas! Libc headers are not included yet at this stage. 
    539  */ 
    540 #ifdef __GNUC__ 
    541 #   define PJ_FD_SETSIZE_SETABLE        0 
    542 #else 
    543 #   define PJ_FD_SETSIZE_SETABLE        1 
     531 * set it to PJ_IOQUEUE_MAX_HANDLES. Currently we detect this by checking 
     532 * for Winsock. 
     533 */ 
     534#ifndef PJ_FD_SETSIZE_SETABLE 
     535#   if defined(PJ_HAS_WINSOCK_H) && PJ_HAS_WINSOCK_H!=0 
     536#       define PJ_FD_SETSIZE_SETABLE    1 
     537#   else 
     538#       define PJ_FD_SETSIZE_SETABLE    0 
     539#   endif 
    544540#endif 
    545541 
    546542/** 
    547543 * Overrides FD_SETSIZE so it is consistent throughout the library. 
    548  * We only do this if we detected that FD_SETSIZE is changeable. 
    549  * 
    550  * Default: #PJ_IOQUEUE_MAX_HANDLES 
     544 * We only do this if we detected that FD_SETSIZE is changeable. If 
     545 * FD_SETSIZE is not set-able, then PJ_IOQUEUE_MAX_HANDLES must be 
     546 * set to value lower than FD_SETSIZE. 
    551547 */ 
    552548#if PJ_FD_SETSIZE_SETABLE 
Note: See TracChangeset for help on using the changeset viewer.