This is the mail archive of the cygwin@sourceware.cygnus.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: _tzname not exported from latest snapshots?


"Charles S. Wilson" <cwilson@ece.gatech.edu> writes:
> 
> Doing an "nm libcygwin.a" shows the following:
> 
> ...
> ds00422.o:
> 00000000 b .bss
> 00000000 d .data
> 00000000 ? .idata$4
> 00000000 ? .idata$5
> 00000000 ? .idata$6
> 00000000 ? .idata$7
> 00000000 t .text
> 00000000 ? ___imp__tzname
>          U __head_temp_a
> 00000000 ? __imp___tzname

That's correct. The import library only contains the imported symbol,
and no thunk to avoid runtime crashes in favor of compile time 
error. You must declare tzname as __attribute__((dllimport)) or
__declspec(dllimport), or else it won't link; without this safety
feature, your program will crash when reading or writing to tzname.

Here's the list of other variables:

  h_errno DATA
  __cygwin_environ DATA
  _ctype_ DATA
  _sys_errlist DATA
  _sys_nerr DATA
  __mb_cur_max DATA
  _timezone DATA
  _daylight DATA
  _tzname DATA

To find the offender, grep for 'extern char *_tzname[2]' or something
like that. To find the object file:
  
  $ nm --print-file-name *.o |grep _tzname

Regards,
Mumit


--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]