Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sources DOT redhat DOT com Delivered-To: mailing list cygwin AT sources DOT redhat DOT com Message-ID: <3BE848B7.6030603@cportcorp.com> Date: Tue, 06 Nov 2001 15:31:51 -0500 From: Peter Buckley User-Agent: Mozilla/5.0 (Windows; U; WinNT4.0; en-US; rv:0.9.2) Gecko/20010726 Netscape6/6.1 X-Accept-Language: en-us MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: Re: fileutils, sh-utils fail to compile due to _tzname, _LIBC undefined References: <3BE70FEB DOT 1020106 AT cportcorp DOT com> <20011105173945 DOT A23269 AT redhat DOT com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Thanks to Chris and Josh, I have gotten a little further- at least in providing info that will hopefully help someone help me along even further. I got "date +%z" to work, it correctly tells me -0500. But "date +%Z" outputs nothing, because it "there is no determinable timezone". I got "info date" to work, but I didn't find out how to set the timezone (%Z). It seems that "date --set=xxx" doesn't affect the timezone. AFAICT, I am going to have to write a c file that will call tzset() to set the timezone correctly- best case I do this once, and the timezone stays forever set, worst case I have to include it to compile fileutils and sh-utils (and anything else that relies on time, strftime etc). But I am concerned that fileutils and sh-utils actually do compile OOTB for everyone else, and there is some lurking problem with my system that this hack of calling tzset() will only workaround in this case. I would appreciate any ideas of what the root problem is, or even a definitive "fileutils and sh-utils will compile OOTB" or "they won't compile OOTB". TIA, Peter Christopher Faylor wrote: > On Mon, Nov 05, 2001 at 05:17:15PM -0500, Peter Buckley wrote: > >>I can't get "date %z" or "date %Z" to work on the command line in a bash >>shell, it just says "date: invalid date `%Z'". >> > > That's because you should be using: > > date +"%z" > ^ > > cgf > > My original message ------------- I am trying to compile fileutils and sh-utils, and I am getting an error- gcc -g -O2 -o dir ls.o ls-dir.o ../lib/libfetish.a -lintl ../lib/libfetish.a(strftime.o): In function `strftime_copytm': /cygdrive/d/f-comp/fileutils-4.1-1/build/lib/../../lib/strftime.c:1270: undefined reference to `_tzname' I read a bunch of messages in the archives, and one about "You must declare tzname as __attribute__((dllimport)) or __declspec(dllimport), or else it won't link" but I don't know how or where to do this (I haven't made any changes to the source yet, and wanted to verify that it would compile OOTB first). I can't get "date %z" or "date %Z" to work on the command line in a bash shell, it just says "date: invalid date `%Z'". I can't seem to set the date with a timezone- the man page doesn't provide the format, and "info date" tells me "info: dir: No such file or directory" (I haven't used info before). My attempts to do "date --set=Mon Nov 5 17:10:49 2001 EST" managed to change the date to yesterday, 11pm. My NT clock says that my timezone is GMT -0500 Eastern Time. There is an #ifdef _LIBC at the beginning of strftime.c that ends up defining _tzname, but I don't think _LIBC is defined, and I can't find where it would be defined. I tried removing the #ifdef and forcing _tzname to get defined, but that gave many more errors. I hope there is something big that I am missing, like an important include file that defines _LIBC and I just didn't pick it up in the configure. -- -- Your mouse has moved. Windows NT must be restarted for the change to take effect. Reboot now? [OK] -- -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/