This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug time/23789] New: mktime does not set errno on failure


https://sourceware.org/bugzilla/show_bug.cgi?id=23789

            Bug ID: 23789
           Summary: mktime does not set errno on failure
           Product: glibc
           Version: 2.28
            Status: NEW
          Severity: normal
          Priority: P2
         Component: time
          Assignee: unassigned at sourceware dot org
          Reporter: eggert at cs dot ucla.edu
  Target Milestone: ---

Created attachment 11343
  --> https://sourceware.org/bugzilla/attachment.cgi?id=11343&action=edit
test program that fails on 32-bit glibc

A while ago, POSIX added a requirement to 'mktime' that it must set errno on
failure. Probably this was around 2001. However, glibc mktime never got updated
to set errno and this should be fixed. I'll attach a program to illustrate the
bug. Compile and run it with 'gcc -m32 mktime-test.c'. It should exit with
status 0, but exits with status 2 because mktime does not set errno when it
fails.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

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