public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* 1.3.2 bug on NT 4: localtime() & timestring() set errno on success
@ 2001-07-24 11:43 Larisa A Stephan
  2001-07-24 13:31 ` Kurt Roeckx
  0 siblings, 1 reply; 3+ messages in thread
From: Larisa A Stephan @ 2001-07-24 11:43 UTC (permalink / raw)
  To: cygwin

[-- Attachment #1: Type: text/plain, Size: 1283 bytes --]

I notice that localtime() and timestring() tend to set errno to 0x2 even
though they succeed (return a non-NULL pointer).  I THINK this is a bug,
but maybe someone can correct me.  I checked the archives and found one
mention of this issue, but no one followed up to tell the guy he was nuts,
so maybe it is really a bug.

As long as you are expecting that this could happen, it's not fatal.
However, this appears to be a new phenomenon because an executable that we
had compiled a couple of years back (now unknown DLL version) didn't do
this.

Attached are the following:
   An example source file
   The output of running this code
   My cygcheck output (per the bug reporting instructions)

Thanks, guys.  Feel free to let me know if this not a bug, and if so, let
me know where I can read up on the expected behavior of these functions.

-- Larisa Stephan
Raytheon Co.
Larisa_A_Stephan@raytheon.com
(See attached file: time_bug_report.c)(See attached file:
time_bug_report.out)(See attached file: cygcheck.out)
time_bug_report.c
time_bug_report.out
cygcheck.out
--
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/


[-- Attachment #2: cygcheck.out --]
[-- Type: text/x-Algol68, Size: 13756 bytes --]


Cygnus Win95/NT Configuration Diagnostics
Current System Time: Tue Jul 24 11:27:25 2001

WinNT Ver 4.0 build 1381 Service Pack 3

Path:	/cygdrive/c/WINNT/system32
	/cygdrive/c/WINNT
	/cygdrive/c/program files/NTResKit
	/cygdrive/c/program files/NTResKit/Perl
	/cygdrive/c/Cayenne/Teamwork/bin
	/cygdrive/c/Cayenne/TwkDocTools/doc/bin
	/usr/bin
	/cygdrive/c/Tornado_03/host/x86-win32/bin
	"C
	/PROGRA~1/COMMON~1/RandSync/TRANSL~1/LtNts4/"
	/cygdrive/c/Program Files/Symantec/pcAnywhere/
	/cygdrive/c/APP/CCMAIL60/CCMAIL
	/cygdrive/c/DOS
	/cygdrive/c/CAYENNE/TWKADATOOLS/BIN/PC-WIN95

SysDir: C:\WINNT\System32
WinDir: C:\WINNT

HOME = `/cygdrive/c/Larisa's Files'

!EXITCODE = `00000002'
!G: = `G:\Program\Common\Source_Code\ccm_wa\image\image-larisa\image'
ATAHOME = `c:\Cayenne\TwkDocTools'
COMPUTERNAME = `ZA_LASTEPHAN'
COMSPEC = `C:\WINNT\system32\cmd.exe'
GHS_LMHOST = `ES-ENG-ATFLIR3'
HOMEDRIVE = `C:'
HOMEPATH = `\users'
INCLUDE = `s:\SQL10\INCLUDE'
LIB = `s:\SQL10\LIB'
LM_LICENSE_FILE = `7192@concord,7192@abyss,7192@packers;7126@es-eng-atflir1'
LOGONSERVER = `\\EN-R01-BDC4'
NTRESKIT = `C:\program files\NTResKit'
NUMBER_OF_PROCESSORS = `1'
OS = `Windows_NT'
OS2LIBPATH = `C:\WINNT\system32\os2\dll;'
PATHEXT = `.COM;.EXE;.BAT;.CMD'
PROCESSOR_ARCHITECTURE = `x86'
PROCESSOR_IDENTIFIER = `x86 Family 6 Model 3 Stepping 4, GenuineIntel'
PROCESSOR_LEVEL = `6'
PROCESSOR_REVISION = `0304'
PROMPT = `$P$G'
SHORT_OS = `NT4'
SYBASE = `s:\SQL10'
SYSTEMDRIVE = `C:'
SYSTEMROOT = `C:\WINNT'
TEMP = `/cygdrive/c/TEMP'
TMP = `/cygdrive/c/TEMP'
TWK_CONFIG = `\\es-eng-atflir2\twkdb1\config_file.txt'
USERDOMAIN = `HUGHES-MAD01'
USERNAME = `00c0221'
USERPROFILE = `C:\WINNT\Profiles\00c0221'
VSLICKCONFIG = `C:\USERS\%USERNAME%\'
VSROOT = `C:\USERS\%USERNAME%\'
WINDIR = `C:\WINNT'
WIND_BASE = `c:\Tornado_03'
WIND_HOST_TYPE = `x86-win32'
TERM = `cygwin'
TZ = `PST8PDT7,M4.1.0/2,M10.5.0/2'

HKEY_CURRENT_USER\Software\Cygnus Solutions
HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin
HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin\mounts v2
  (default) = `/cygdrive'
  cygdrive flags = 0x00000020
HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin\Program Options
HKEY_CURRENT_USER\Software\Cygnus Solutions\CYGWIN.DLL setup
HKEY_CURRENT_USER\Software\Cygnus Solutions\CYGWIN.DLL setup\b15.0
HKEY_CURRENT_USER\Software\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts
HKEY_CURRENT_USER\Software\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\00
  (default) = `\\.\tape1:'
  unix = `/dev/st1'
  fbinary = 0x00000000
  fsilent = 0x00000001
HKEY_CURRENT_USER\Software\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\01
  (default) = `\\.\tape0:'
  unix = `/dev/st0'
  fbinary = 0x00000000
  fsilent = 0x00000001
HKEY_CURRENT_USER\Software\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\02
  (default) = `\\.\b:'
  unix = `/dev/fd1'
  fbinary = 0x00000000
  fsilent = 0x00000001
HKEY_CURRENT_USER\Software\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\03
  (default) = `\\.\a:'
  unix = `/dev/fd0'
  fbinary = 0x00000000
  fsilent = 0x00000001
HKEY_CURRENT_USER\Software\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\04
  (default) = `C:'
  unix = `/'
  fbinary = 0x00000000
  fsilent = 0x00000000
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\mounts v2
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\mounts v2\/
  (default) = `C:/cygwin'
  flags = 0x00000008
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\mounts v2\/usr/bin
  (default) = `C:/cygwin/bin'
  flags = 0x00000008
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\mounts v2\/usr/lib
  (default) = `C:/cygwin/lib'
  flags = 0x00000008
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\Program Options
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\00
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\01
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\02
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\03
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\04
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\05
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\06
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\07
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\08
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\09
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\0A
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\0B
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\0C
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\0D
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\0E
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\0F
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\10
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\11
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\12
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\13
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\14
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\15
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\16
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\17
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\18
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\19
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\1A
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\1B
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\1C
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\1D

a:  fd           N/A    N/A                    
c:  hd  NTFS    4090Mb  56% CP CS UN PA FC     
d:  fd  FAT       95Mb   2% CP    UN           ZIP-100
g:  net NTFS   49999Mb  94% CP CS UN PA FC     
h:  cd  CDFS     607Mb 100%    CS              MAMBO
p:  net NWCompat 36500Mb 100%                    DATA
s:  net NWCompat 13000Mb  42%                    APPS
y:  net NWCompat  3000Mb  34%                    SYS

C:\cygwin\bin  /usr/bin  system  textmode
C:\cygwin\lib  /usr/lib  system  textmode
C:\cygwin  /        system  textmode
c:    /cygdrive/c  user    textmode,noumount
g:    /cygdrive/g  user    textmode,noumount
h:    /cygdrive/h  user    textmode,noumount
p:    /cygdrive/p  user    textmode,noumount
s:    /cygdrive/s  user    textmode,noumount
y:    /cygdrive/y  user    textmode,noumount

Found: C:\cygwin\bin\bash.exe
Found: c:\program files\NTResKit\cat.exe
Found: C:\cygwin\bin\cat.exe
Warning: c:\program files\NTResKit\cat.exe hides C:\cygwin\bin\cat.exe
Found: C:\cygwin\bin\cpp.exe
Found: c:\Tornado_03\host\x86-win32\bin\cpp.exe
Warning: C:\cygwin\bin\cpp.exe hides c:\Tornado_03\host\x86-win32\bin\cpp.exe
Found: C:\cygwin\bin\find.exe
Found: c:\DOS\find.exe
Warning: C:\cygwin\bin\find.exe hides c:\DOS\find.exe
Found: C:\cygwin\bin\gcc.exe
Found: C:\cygwin\bin\gdb.exe
Found: C:\cygwin\bin\ld.exe
Found: c:\program files\NTResKit\ls.exe
Found: C:\cygwin\bin\ls.exe
Warning: c:\program files\NTResKit\ls.exe hides C:\cygwin\bin\ls.exe
Found: C:\cygwin\bin\make.exe
Found: c:\Tornado_03\host\x86-win32\bin\make.exe
Warning: C:\cygwin\bin\make.exe hides c:\Tornado_03\host\x86-win32\bin\make.exe
Found: C:\cygwin\bin\sh.exe

  678k 2001/05/21 .\cygwin1.dll - os=4.0 img=1.0 sys=4.0
                  "cygwin1.dll" v0.0 ts=2001/5/20 20:28
    Cygwin DLL version info:
        dll major: 1003
        dll minor: 2
        dll epoch: 19
        dll bad signal mask: 19005
        dll old termios: 5
        dll malloc env: 28
        api major: 0
        api minor: 39
        shared data: 3
        dll identifier: cygwin1
        mount registry: 2
        cygnus registry name: Cygnus Solutions
        cygwin registry name: Cygwin
        program options name: Program Options
        cygwin mount registry name: mounts v2
        cygdrive flags: cygdrive flags
        cygdrive prefix: cygdrive prefix
        cygdrive default prefix: 
        build date: Sun May 20 23:28:17 EDT 2001
        shared id: cygwin1S3

  678k 2001/05/21 .\cygwin1.dll - os=4.0 img=1.0 sys=4.0
                  "cygwin1.dll" v0.0 ts=2001/5/20 20:28
    Cygwin DLL version info:
        dll major: 1003
        dll minor: 2
        dll epoch: 19
        dll bad signal mask: 19005
        dll old termios: 5
        dll malloc env: 28
        api major: 0
        api minor: 39
        shared data: 3
        dll identifier: cygwin1
        mount registry: 2
        cygnus registry name: Cygnus Solutions
        cygwin registry name: Cygwin
        program options name: Program Options
        cygwin mount registry name: mounts v2
        cygdrive flags: cygdrive flags
        cygdrive prefix: cygdrive prefix
        cygdrive default prefix: 
        build date: Sun May 20 23:28:17 EDT 2001
        shared id: cygwin1S3

   56k 2000/12/03 C:\cygwin\bin\cygbz21.0.dll - os=4.0 img=1.0 sys=4.0
                  "cygbz21.0.dll" v0.0 ts=2000/11/20 15:53
   45k 2001/04/25 C:\cygwin\bin\cygform5.dll - os=4.0 img=1.0 sys=4.0
                  "cygform5.dll" v0.0 ts=2001/4/24 22:28
   18k 2000/10/23 C:\cygwin\bin\cyggdbm.dll - os=4.0 img=1.0 sys=4.0
                  "cyggdbm.dll" v0.0 ts=2000/10/22 19:26
   17k 2001/01/07 C:\cygwin\bin\cyghistory4.dll - os=4.0 img=1.0 sys=4.0
                  "cyghistory4.dll" v0.0 ts=2001/1/6 20:34
   14k 2000/10/23 C:\cygwin\bin\cygintl.dll - os=4.0 img=1.0 sys=4.0
                  "cygintl.dll" v0.0 ts=2000/10/23 12:02
   81k 2000/12/05 C:\cygwin\bin\cygitcl30.dll - os=4.0 img=1.0 sys=4.0
                  "cygitcl30.dll" v0.0 ts=2000/11/25 17:43
   35k 2000/12/05 C:\cygwin\bin\cygitk30.dll - os=4.0 img=1.0 sys=4.0
                  "cygitk30.dll" v0.0 ts=2000/11/25 17:43
   45k 2000/10/22 C:\cygwin\bin\cygjbig1.dll - os=4.0 img=1.0 sys=4.0
                  "cygjbig1.dll" v0.0 ts=2000/10/22 16:06
  119k 2000/10/23 C:\cygwin\bin\cygjpeg6b.dll - os=4.0 img=1.0 sys=4.0
                  "cygjpeg6b.dll" v0.0 ts=2000/10/22 17:58
   26k 2001/04/25 C:\cygwin\bin\cygmenu5.dll - os=4.0 img=1.0 sys=4.0
                  "cygmenu5.dll" v0.0 ts=2001/4/24 22:27
  156k 2001/04/25 C:\cygwin\bin\cygncurses++5.dll - os=4.0 img=1.0 sys=4.0
                  "cygncurses++5.dll" v0.0 ts=2001/4/24 22:29
  226k 2001/04/25 C:\cygwin\bin\cygncurses5.dll - os=4.0 img=1.0 sys=4.0
                  "cygncurses5.dll" v0.0 ts=2001/4/24 22:17
   15k 2001/04/25 C:\cygwin\bin\cygpanel5.dll - os=4.0 img=1.0 sys=4.0
                  "cygpanel5.dll" v0.0 ts=2001/4/24 22:27
  163k 2001/05/06 C:\cygwin\bin\cygpng2.dll - os=4.0 img=1.0 sys=4.0
                  "cygpng2.dll" v0.0 ts=2001/5/5 21:05
  108k 2001/01/07 C:\cygwin\bin\cygreadline4.dll - os=4.0 img=1.0 sys=4.0
                  "cygreadline4.dll" v0.0 ts=2001/1/6 20:34
  390k 2000/12/05 C:\cygwin\bin\cygtcl80.dll - os=4.0 img=1.0 sys=4.0
                  "cygtcl80.dll" v0.0 ts=2000/11/25 17:39
    5k 2000/12/05 C:\cygwin\bin\cygtclpip80.dll - os=4.0 img=1.0 sys=4.0
   10k 2000/12/05 C:\cygwin\bin\cygtclreg80.dll - os=4.0 img=1.0 sys=4.0
                  "cygtclreg80.dll" v0.0 ts=2000/11/25 17:39
  243k 2000/10/23 C:\cygwin\bin\cygtiff3.dll - os=4.0 img=1.0 sys=4.0
                  "cygtiff3.dll" v0.0 ts=2000/10/22 18:14
  623k 2000/12/05 C:\cygwin\bin\cygtk80.dll - os=4.0 img=1.0 sys=4.0
                  "cygtk80.dll" v0.0 ts=2000/11/25 17:43
   41k 2001/05/28 C:\cygwin\bin\cygXpm-noX4.dll - os=4.0 img=1.0 sys=4.0
                  "cygXpm-noX4.dll" v0.0 ts=2001/5/28 10:57
   45k 2000/11/20 C:\cygwin\bin\cygXpm-X4.dll - os=4.0 img=1.0 sys=4.0
                  "cygXpm-X4.dll" v0.0 ts=2000/11/19 18:45
   49k 2001/02/03 C:\cygwin\bin\cygz.dll - os=4.0 img=1.0 sys=4.0
                  "cygz.dll" v0.0 ts=2001/2/3 12:35
  678k 2001/05/21 C:\cygwin\bin\cygwin1.dll - os=4.0 img=1.0 sys=4.0
                  "cygwin1.dll" v0.0 ts=2001/5/20 20:28
    Cygwin DLL version info:
        dll major: 1003
        dll minor: 2
        dll epoch: 19
        dll bad signal mask: 19005
        dll old termios: 5
        dll malloc env: 28
        api major: 0
        api minor: 39
        shared data: 3
        dll identifier: cygwin1
        mount registry: 2
        cygnus registry name: Cygnus Solutions
        cygwin registry name: Cygwin
        program options name: Program Options
        cygwin mount registry name: mounts v2
        cygdrive flags: cygdrive flags
        cygdrive prefix: cygdrive prefix
        cygdrive default prefix: 
        build date: Sun May 20 23:28:17 EDT 2001
        shared id: cygwin1S3

 3188k 1996/05/23 c:\Tornado_03\host\x86-win32\bin\cygwin.dll - os=4.0 img=1.0 sys=4.0
                  "cygwin.dll" v0.0 ts=1996/4/13 19:10
Use -h to see help about each section

[-- Attachment #3: time_bug_report.c --]
[-- Type: text/x-c, Size: 1156 bytes --]

/*
 * File to document bug with localtime() setting errno despite succeeding
 * in Cygwin 1.3.2.
 * Compile on Windows NT 4 with shell command:
 *      gcc -Wall -ansi time_bug_report.c -o time_bug_report.exe
 */

#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <errno.h>

int main (int argc, char *argv[])
{
    time_t          now;
    struct tm      *tmp = (struct tm *)NULL;
    char           *timestring = (char *)NULL;

    printf("Before I call anything, errno = 0x%x\n", errno);
    printf("(I'll reset errno to 0 before each time library call.)\n");
    errno = 0;
    now = time(NULL);
    printf("time() returned 0x%x and set errno to 0x%x\n",
           (unsigned)now, errno);

    errno = 0;
    timestring = ctime(&now);
    printf("timestring() returned 0x%x and set errno to 0x%x\n",
           (unsigned)timestring, errno);
    if (timestring != (char *)NULL)
    {
        printf("Hello, it's %s", timestring);
    }

    errno = 0;
    tmp = localtime(&now);
    printf("localtime() returned 0x%x and set errno to 0x%x\n",
           (unsigned)tmp, errno);

    exit(errno);
}

[-- Attachment #4: time_bug_report.out --]
[-- Type: text/plain, Size: 289 bytes --]

Before I call anything, errno = 0x0
(I'll reset errno to 0 before each time library call.)
time() returned 0x3b5dc0f4 and set errno to 0x0
timestring() returned 0x61090100 and set errno to 0x2
Hello, it's Tue Jul 24 11:39:48 2001
localtime() returned 0x610b1cd0 and set errno to 0x2

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: 1.3.2 bug on NT 4: localtime() & timestring() set errno on success
  2001-07-24 11:43 1.3.2 bug on NT 4: localtime() & timestring() set errno on success Larisa A Stephan
@ 2001-07-24 13:31 ` Kurt Roeckx
  2001-07-24 14:27   ` Don Sharp
  0 siblings, 1 reply; 3+ messages in thread
From: Kurt Roeckx @ 2001-07-24 13:31 UTC (permalink / raw)
  To: Larisa A Stephan; +Cc: cygwin

On Tue, Jul 24, 2001 at 11:41:26AM -0700, Larisa A Stephan wrote:
> I notice that localtime() and timestring() tend to set errno to 0x2 even
> though they succeed (return a non-NULL pointer).  I THINK this is a bug,
> but maybe someone can correct me.  I checked the archives and found one
> mention of this issue, but no one followed up to tell the guy he was nuts,
> so maybe it is really a bug.

They themself are no system calls, but probably do call system
calls.  Any of the system calls it might have called could have
change errno.

My guess is that it's trying to open some file, but didn't find
it.


Kurt


--
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/

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: 1.3.2 bug on NT 4: localtime() & timestring() set errno on success
  2001-07-24 13:31 ` Kurt Roeckx
@ 2001-07-24 14:27   ` Don Sharp
  0 siblings, 0 replies; 3+ messages in thread
From: Don Sharp @ 2001-07-24 14:27 UTC (permalink / raw)
  To: cygwin

Kurt Roeckx wrote:
> 
> On Tue, Jul 24, 2001 at 11:41:26AM -0700, Larisa A Stephan wrote:
> > I notice that localtime() and timestring() tend to set errno to 0x2 even
> > though they succeed (return a non-NULL pointer).  I THINK this is a bug,
> > but maybe someone can correct me.  I checked the archives and found one
> > mention of this issue, but no one followed up to tell the guy he was nuts,
> > so maybe it is really a bug.
> 
> They themself are no system calls, but probably do call system
> calls.  Any of the system calls it might have called could have
> change errno.

In days of yore, it was unsafe to examine errno's value unless an error
had been indicated. As Kurt says above, any system call can alter errno.

Cheers

Don Sharp

> 
> My guess is that it's trying to open some file, but didn't find
> it.
> 
> Kurt
> 
> --
> 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/

--
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/

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2001-07-24 14:27 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-07-24 11:43 1.3.2 bug on NT 4: localtime() & timestring() set errno on success Larisa A Stephan
2001-07-24 13:31 ` Kurt Roeckx
2001-07-24 14:27   ` Don Sharp

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).