1da2e3ebdSchinset prototyped 2da2e3ebdSchin 3*3e14f97fSRoger A. Faulkner_cc_export_dynamic = note{ probe CC.EXPORT.DYNAMIC supported }end run{ 4*3e14f97fSRoger A. Faulkner case `{ probe -l C make cc | grep '^CC.EXPORT.DYNAMIC = .'; } 2>/dev/null` in 5*3e14f97fSRoger A. Faulkner '') exit 1 ;; 6*3e14f97fSRoger A. Faulkner esac 7*3e14f97fSRoger A. Faulkner}end 8*3e14f97fSRoger A. Faulkner 9da2e3ebdSchintst tzset_environ note{ tzset() bypasses user getenv() }end execute{ 10*3e14f97fSRoger A. Faulkner #if _UWIN || !_cc_export_dynamic 11*3e14f97fSRoger A. Faulkner int main() 12*3e14f97fSRoger A. Faulkner { 13*3e14f97fSRoger A. Faulkner return 0; 14*3e14f97fSRoger A. Faulkner } 15*3e14f97fSRoger A. Faulkner #else 16da2e3ebdSchin #include <time.h> 17da2e3ebdSchin extern char** environ; 18da2e3ebdSchin extern char* tzname[2]; 19da2e3ebdSchin #if _STD_ 20da2e3ebdSchin extern char* getenv(char* s) 21da2e3ebdSchin #else 22da2e3ebdSchin extern char* getenv(s) 23da2e3ebdSchin char* s; 24da2e3ebdSchin #endif 25da2e3ebdSchin { 26da2e3ebdSchin return "foo0bar"; 27da2e3ebdSchin } 28da2e3ebdSchin int main() 29da2e3ebdSchin { 30da2e3ebdSchin tzset(); 31da2e3ebdSchin return tzname[0] && !strcmp(tzname[0], "foo") && 32da2e3ebdSchin tzname[1] && !strcmp(tzname[1], "bar"); 33da2e3ebdSchin } 34*3e14f97fSRoger A. Faulkner #endif 35da2e3ebdSchin}end 36da2e3ebdSchin 37da2e3ebdSchinif ( _tzset_environ ) { 38da2e3ebdSchin #define tmlocaltime(p) _tm_localtime(p) 39da2e3ebdSchin 40da2e3ebdSchin extern struct tm* _tm_localtime(const time_t*); 41da2e3ebdSchin} 42da2e3ebdSchinelse { 43da2e3ebdSchin #define tmlocaltime(p) localtime(p) 44da2e3ebdSchin} 45da2e3ebdSchinendif 46