Something is invalid with these macros. Takes localtime_r for example... Both the GNU and standard cannot be compiled...
Is it just me? #include <time.h> #define localtime_r_1(_Time, _Tm) ({ struct tm *___tmp_tm = \ localtime((_Time)); \ if (___tmp_tm) \ *(_Tm) = *___tmp_tm; \ else *(_Tm) = 0; \ ___tmp_tm; }) #define localtime_r_2(_Time, _Tm) (localtime ((_Time)) ? *(_Tm) = *localtime ((_Time),(_Tm)) : 0) int main(void) { time_t t1; struct tm tm1; localtime_r_1(&t1, &tm1); localtime_r_2(&t1, &tm1); } $ x86_64-w64-mingw32-gcc -pedantic /tmp/time.c /tmp/time.c: In function ‘main’: /tmp/time.c:15: error: incompatible types when assigning to type ‘struct tm’ from type ‘int’ /tmp/time.c:15: warning: ISO C forbids braced-groups within expressions /tmp/time.c:16: error: too many arguments to function ‘localtime’ /tmp/time.c:16: error: type mismatch in conditional expression ------------------------------------------------------------------------------ This SF.Net email is sponsored by the Verizon Developer Community Take advantage of Verizon's best-in-class app development support A streamlined, 14 day to market process makes app distribution fast and easy Join now and get one step closer to millions of Verizon customers http://p.sf.net/sfu/verizon-dev2dev _______________________________________________ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public