Mailing-List: contact cygwin-help@sourceware.cygnus.com; run by ezmlm
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie.com@sourceware.cygnus.com>
List-Subscribe: <mailto:cygwin-subscribe@sourceware.cygnus.com>
List-Archive: <http://sourceware.cygnus.com/ml/cygwin/>
List-Post: <mailto:cygwin@sourceware.cygnus.com>
List-Help: <mailto:cygwin-help@sourceware.cygnus.com>, <http://sourceware.cygnus.com/ml/#faqs>
Sender: cygwin-owner@sourceware.cygnus.com
Delivered-To: mailing list cygwin@sourceware.cygnus.com
Message-Id: <199912050336.VAA01409@mercury.xraylith.wisc.edu>
To: "Charles S. Wilson" <cwilson@ece.gatech.edu>
cc: cygwin@sourceware.cygnus.com, khan@mercury.xraylith.wisc.edu
Subject: Re: _tzname not exported from latest snapshots? 
In-Reply-To: Your message of "Sat, 04 Dec 1999 22:13:57 EST."
             <3849D875.C02208DD@ece.gatech.edu> 
Date: Sat, 04 Dec 1999 21:36:00 -0600
From: Mumit Khan <khan@nanotech.wisc.edu>

"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

