=========================================================== Fixes in versions 11.0 C-level =========================================================== *************** ** C Library ** *************** Fixed problem in memory allocator that could cause NULL to be returned without going to the system to get more memory. =========================================================== Fixed bug in __brktime in gmtime.c. Jun 2, 2101 was returned as Jun 1, 2101. Affected ctime, localtime, gmtime. =========================================================== Fixed bug in delay() for DOS/16, DOS/32, Win 3.1 and Win386. Previous version did not work at all for a number of reasons. New version is accurate to within +/- 1/100 second. =========================================================== Fixed bug in printf formatting. %#.6g would not display trailing zeros for a number like 1.0e6. Output was 1.e+006 when it should have been 1.00000e+006. Fix was made to _ldcvt(). =========================================================== Fixed eof(), filelength(), fsync(), _os_handle(), _get_osfhandle(), and setmode() in Netware library by removing a failing file handle check. =========================================================== Fixed bug in mktime() that affected 16-bit libraries. Years >= 2079 resulted in truncation due to 16-bit rather than 32-bit precision. Changed 365 to 365L to force 32-bit calculation. =========================================================== Fixed bug in run-time exit code. Made sure that _WindowExitRtn is called early on in exit() rather than in _exit() (since run-time system is shut-down by the time _exit gets called). This bug impacted "Save as" in default windowing support. =========================================================== Fixed bugs in _wputenv, _wsetenv, _wgetenv that caused a crash in clearenv at program exit. =========================================================== Fixed opendir() for DBCS environments (where backslash, slash, asterisk and question mark might appear as the second character of a double-byte character in a path specification). We now use _mbsinc() and _mbsnextc() to scan a path string. =========================================================== Added _mktemp() to other platforms including 16/32-bit DOS, 16-bit Windows, 32-bit extended Windows and 16/32-bit OS/2. Previously, only Win32 was supported. =========================================================== Fixed a problem with multi-threaded applications where a thread was very short-lived. A multi-threaded application would crash when a thread was very short-lived. The problem seemed to appear with more frequency on the newer generation of fast processors. The crash occurred in _CBeginThread which is the C run-time implementation of _beginthread. A workaround was to delay the thread from exiting using some sort of gating technique like Sleep or a signal from the creating process that permitted the thread to exit. A more detailed description of the problem follows. When a thread is created, a thread handle is returned to the process doing the CreateThread. Our run-time library wants to pass this thread handle to the newly "executing" thread so that when the thread exits, the thread can free the handle itself. The "main" process passes the thread handle to the thread by storing it at a location provided by the thread. This location is "created" by the thread so the main process waits for an event that signals that the location is created. But here's what happens. The thread signals the event and keeps on executing. In fact, it executes right through to the termination code and exits before the main process is dispatched again. Eventually the main process is resumed (since the event that it waited on has occured) and then it stores the handle into memory. This memory however no longer exists because the thread has already come and gone. An access violation occurs. The problem was fixed by adding code to complete the handshaking process (the problem had been already half solved). The thread now waits for the creating process to provide the handle. =========================================================== spawn... functions with P_NOWAIT under Win32 no longer allocate an extra process handle. =========================================================== Simplefied Win32 version of _pipe. Pipes are inheritable if you use the SECURITY_ATTRIBUTES struct. Added support for O_NOINHERIT mode attribute. =========================================================== Fixed the multi-byte character functions so that they work correctly for all double-byte character sets (not just Japanese). The revised functions are: _mbctolower _mbctoupper _ismbcalnum _ismbcalpha _ismbccntrl _ismbcdigit _ismbcgraph _ismbclegal _ismbclower _ismbcprint _ismbcpunct _ismbcspace _ismbcsymbol _ismbcupper _ismbcxdigit _mbslwr, _fmbslwr _mbsupr, _fmbsupr =========================================================== Fixed Win32 version of _dos_findfirst/_dos_findnext so that _A_SUBDIR, _A_HIDDEN, and _A_SYSTEM work correctly. =========================================================== Fixed Netware version of library so that code-gen support routines like __i8d are not exported. This removes the problem caused when 2 or more NLMs ended up exporting the code-gen support routines. =========================================================== Removed assert from low-level thread data pointer acquisition routine (since assert requires a thread data pointer in multi-threaded applications so it was no good to use assert to complain that a thread data pointer could not be acquired). Normally, this problem would not be seen. =========================================================== Added some error checking to Win32 cprintf and putch (conio) routines. =========================================================== _controlfp called _controlfp rather than _control87 resulting in a recursive, infinite loop. Changed _controlfp to call _control87. =========================================================== Fixed a number of I/O routines to make them thread safe. Included are the Netware version of fopen, _fsopen, all versions of tmpnam, all versions of fclose. =========================================================== Fixed tzset() for Windows NT/2000 in areas where there is no daylight savings time. As a result, gmtime() should now be correct for all areas of the world. =========================================================== Fixed the Win32 version of _dos_xxx functions so that they return the OS error code like their DOS and OS/2 counterparts. Fixed _getdcwd(), _wgetdcwd() so that they set a proper errno value. Set errno if drive doesn't exist. Fixed putenv(), _wputenv(), setenv(), _wsetenv() so that they set a proper errno value. Fixed _wdos_findfirst(), _wdos_findnext(), _wdos_findclose so that they set a proper errno value. Under Win32, they now return a proper OS error code. Fixed Win32 version of open(), _wopen(), sopen(), _wsopen(), _sopen(), __wsopen() so that it first checks to see if it can store the file handle returned by Win32 before attempting to open the file. This fix corrects the "orphaned file" problem caused by opening, then closing a file when the file handle can't be stored. Fixed the OS/2 spawn routines so that a proper errno value is set when running out of memory. Fixed tmpfile() multi-threading problems including infinite loops when the "TEMP" environment variable (TMP, TEMP, TMPDIR, etc.) points to a non-existent path. Added _strerror() for MS compatibility. Also added wide char version _wcserror(). Added _doserror() to return Win32 system error message for a _doserrno value. Improved mapping of Win32 error codes to errno values. =========================================================== ***************** ** C++ Library ** ***************** Fixed buffer overrun when specifying a precision (SetPrecision) greater than LDBL_DIG. This used to cause an application to crash Windows 95. =========================================================== Added conditional semaphore unlock to the destructor of a "lock" object. =========================================================== ******************** ** C Header Files ** ******************** Fixed getc macro in stdio.h. The '\0x' changed to '\x' in two places. Old version resulted in a loss of an attempted optimization. The correction will result in better performance for getc(). =========================================================== Added Microsoft's FLT_NORMALIZE constant. Added Microsoft's _DBL_RADIX constant. Added Microsoft's _DBL_ROUNDS constant. Added Microsoft's _LDBL_RADIX constant. Added Microsoft's _LDBL_ROUNDS constant. Added Microsoft's DBL_RADIX constant. Added Microsoft's DBL_ROUNDS constant. Added Microsoft's LDBL_RADIX constant. Added Microsoft's LDBL_ROUNDS constant. Changed FLT_MIN_EXP from (-127) to (-125). Changed DBL_MIN_EXP from (-1023) to (-1021). Changed LDBL_MIN_EXP from (-1023) to (-1021). Changed FLT_MIN_10_EXP from (-38) to (-37). Changed FLT_MAX_EXP from 127 to 128. Changed DBL_MAX_EXP from 1023 to 1024. Changed LDBL_MAX_EXP from 1023 to 1024. Added accurate representations for DBL_MAX, DBL_EPSILON and DBL_MIN named _DBL_MAX, _DBL_EPSILON and _DBL_MIN. =========================================================== Improved code generated from isxxx() functions. Changed description of messages associated with some errno values. Added definition of NULL to float.h. Added prototypes for _strerror(), _wcserror(), _doserror(), _wdoserror() to string.h.