Changeset 1600


Ignore:
Timestamp:
2000-10-11T16:50:43+13:00 (24 years ago)
Author:
jrm21
Message:

Sorry - got it right this time. We needed to #define _XOPEN_SOURCE
before we included <iostream>, as both include <features.h>, so the
second time (for unistd.h), _USE_XOPEN doesn't get set and crypt() doesn't
get declared.

Basically, I put the include crypt stuff before the include OBJECTSPACE stuff.
I hope this doesn't break something else (eg Windows compile...)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl/src/getpw/getpw.cpp

    r1599 r1600  
    2424 **********************************************************************/
    2525
    26 #if defined(GSDL_USE_OBJECTSPACE)
    27 #  include <ospace\std\iostream>
    28 #elif defined(GSDL_USE_IOS_H)
    29 #  include <iostream.h>
    30 #else
    31 #  include <iostream>
    32 #endif
    33 
    3426// include crypt
    3527#if defined(__WIN32__)
     
    3931#include <crypt.h>
    4032#else
    41 #define _XOPEN_SOURCE
    42 /* don't think this is a standard macro, but seems to be needed.... */
    43 #define __USE_XOPEN
     33#define _XOPEN_SOURCE 1
    4434#include <unistd.h>
    4535#endif
     36#endif
     37
     38#if defined(GSDL_USE_OBJECTSPACE)
     39#  include <ospace\std\iostream>
     40#elif defined(GSDL_USE_IOS_H)
     41#  include <iostream.h>
     42#else
     43#  include <iostream>
    4644#endif
    4745
Note: See TracChangeset for help on using the changeset viewer.