.
===============================================================================
emxfix05.doc emx 0.9a FIX 05 06-Jun-1995
===============================================================================
Copyright (c) 1994-1995 by Eberhard Mattes
Introduction
------------
emxfix05.zip is a fix package for emx 0.9a. It contains all fixes and
new features of emxfix01.zip through emxfix04.zip, and new fixes.
See the updated version of \emx\doc\readme.doc for the new address of
the emx mailing list and for new directory names on ftp-os2.cdrom.com.
If you are a programmer who uses emx for creating applications,
install emxfix05.zip. If you just use applications which use emx,
install the emxrt.zip corresponding to emxfix05.zip (see the ZIP
comment). You don't have to install both.
License
-------
emx is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
emx is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with emx; see the file COPYING. If not, write to
the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
See \emx\doc\COPYING.EMX and \emx\doc\COPYING for details.
In consequence, emxfix05.zip can be distributed only if distributed
with emxsrcr.zip.
Caveat
------
Do not install this fix package unless you have installed emx 0.9a.
It does not work with any other release of emx. Do not install
emxfix05.zip if you have already installed a later fix package.
Problems solved by this fix package
-----------------------------------
[emxfix05.zip]
o All ioctl()s are mapped to FIONREAD for socket handles. emx.dll
of emxfix05.zip (revision index 35) makes ioctl() work correctly
for sockets
o \emx\lib\cdll.def does not export _emx_init and _emx_syscall,
which both must be exported when building a DLL with the -Zsys
option (that is, a DLL which does not use emx.dll). When
building a DLL which uses emx.dll, these symbols must not be
exported
o The default new operator for C++ assumes that malloc(0) does not
return NULL, which causes problems when replacing malloc()
o `getc' and `putc' are not function-like macros if __MT__ is
defined (-Zmt)
[emxfix04.zip]
o `pow (x, 0.0)' should return 1.0 for all x
o emx\test\int10.c cannot be compiled with -O
o gcc.a and gcc.lib lack __ucmpdi2 which is required by GNAT
o emx.dll loads the Presentation Manager for displaying the emxstack
message when running a program with too small a stack size from
the OS/2 recovery command line
o lseek(), tell(), fseek(), and ftell() do not work correctly after
reading the final Ctrl-Z of a text-mode file. (Note that lseek()
and fseek() with an original of SEEK_END don't work correctly with
text-mode files that end with Ctrl-Z, even after applying emxfix04
-- that restriction will probably never be removed)
o swab() with zero N argument crashes
o The file position indicator of a stream is wrong after undoing the
effects of ungetc()
o __findfirst() and __findnext() are not thread-safe
o opendir() is not thread-safe
o Using sockets in a multithread process can make open(), dup(),
socket(), _impsockhandle(), etc. hang
o select() does not correctly set bits for ready socket handles in
the objects pointed to by WRITEFDS and EXCEPTFDS
o omflibs.cmd and texi2dvi.cmd do not work correctly after year 1999
[emxfix03.zip]
o emxfix02.zip lacks \emx\src\os2\makefile
o scanf() does not correctly handle a matching failure caused by an
ordinary character after an assignment
o spawn*() does not correctly quote arguments containing blanks when
linked with sys.lib (-Zsys option)
o emxrev.cmd does not find DLLs with lower-case names
o `emxrev -p' recurses into subdirectories of the directories listed
in the LIBPATH statement
o Preloaded executables such as emacs.exe (created with the -c
option of emxbind) behave strangely in some environments (for
instance, when loaded from a IBM LAN server). emxbind of emxfix03
creates `real' preloaded executables, for which emx.dll no longer
uses guard pages and an exception handler for loading `preloaded'
heap pages. Preloaded executables created with emxbind of
emxfix03 require emx.dll of emxfix03 (revision index 33).
Otherwise, the following error message will be displayed:
DosSetMem failed, error code = 0x00000005
To create old-style preloaded executables, use the new -C option
of emxbind
o emxbind crashes under certain circumstances
o emx.exe does not correctly quote arguments for 4DOS.COM
o The TCP/IP initialization code of emx.dll (tcp_init) can be
entered by multiple threads at the same time, resulting in a
timing window
o emxlibcm.dll, emxlibcs.dll, and cdll.def don't export __brk(),
brk(), and _uldiv()
o select() does not report broken pipes as ready for reading
o The return value of _chdir2() is wrong if its argument is a drive
name
o pipe() may incorrectly return two identical handles when sockets
are open. _imphandle() may relocate the handle to an open,
unregistered handle
o GDB hangs when stepping over `call __emx_syscall' of crt0.o due to
a bug in emx.dll
o The SIGCHLD handler of \emx\test\fork.c does not call wait(),
causing SIGCHLD to be pending forever
o termcap.dat contains some small errors
[emxfix02.zip]
o The `touch' program ignores every other file name given on the
command line
o emx.dll imports from PMWIN.DLL and therefore cannot be used if
OS/2 was booted from diskettes. emx.dll of emxfix02 resolves the
imports at runtime
o select() may hang if a non-socket handle is immediately ready when
waiting for both socket handles and non-socket handles
[emxfix01.zip]
o The copyright statement in emxrt.doc and emxrt.inf is the old one
of emx 0.8h; emxfix01 uses the correct one (GPL)
o omflibs.cmd does not use the time stamp of the .a file for the
.lib file -- this causes problems when updating the .a files with
newer .a files which were created before omflibs.cmd was run
o hpfs.cmd and fat.cmd don't keep the time stamp of the patched
files
o GDB sometimes hangs due to a bug in emx.dll
o emxlibc*.dll don't export _files and _lookahead, which are
referenced by the socket library
o getservbyname() and getservbyport() do not work. emxfix01 solves
that problem; however, these functions overwrite the result of
gethostbyname() and gethostbyaddr() due to a bug in the Internet
Access kit of OS/2 Warp 3 and in CSD UN64092 of TCP/IP for OS/2
2.0. You should not use the structure pointed to by the pointer
returned by gethostbyname() and gethostbyaddr() after calling
getservbyname() or getservbyport()
o sub.cmd in \emx\src\lib does not recurse into the `omflib'
directory
o BYTE_ORDER is required by <netinet/ip.h> but is nowhere defined
o IP_TOS etc. are defined in <netinet/in.h> -- however, getsockopt()
and setsockopt() are not supported at the IP level by IBM TPC/IP
for OS/2
o <arpa/ftp.h> and <arpa/telnet.h> are missing
Features added by this fix package
----------------------------------
[emxfix05.zip]
o Test program (sockioct) added, for testing ioctl() on sockets
[emxfix04.zip]
o emx\test\int10.c displays more VESA information details
o Try to work around a bug or feature of DEC Pathworks which makes
applications fail when trying to open a text-mode file
o <sys/uio.h>, readv(), and writev() have been added
o Import records for tcp32dll.dll's end*ent(), get*ent(), and
set*ent() functions have been added to socket.a. Note that a
program which references any of these functions requires
tcp32dll.dll for running
o ungetc() can push back up to 255 (or the size of the stream
buffer, whatever is smaller) characters to a buffered stream. If
the stream is not associated with a disk file, this is further
restricted by the number of characters available in the stream
buffer (buffer size minus number of unread characters). For
unbuffered streams, ungetc() can push back 1 character
o __findfirst() and __findnext() work around a bug in HPFS386
o Import records for new and/or undocumented OS/2 functions have
been added to os2.a
o \emx\lib\cdll.def now contains special markers for automatically
building (with the `sed' tool) module definition files for custom
C run-time DLLs. See the new `dll7' target of \emx\test\makefile
o Additional test programs have been added. poorteln now uses the
new easysock module.
[emxfix03.zip]
o Socket handles are now inherited across fork(). Note that socket
handles are inherited even if FD_CLOEXEC is set; that's not yet
implemented for other types of handles
o The new _impsockhandle() function registers a socket handle (of
IBM TCP/IP) with the emx run-time system. _impsockhandle() takes
two arguments (the socket handle and a reserved value which must
be zero) and returns a file handle or, on error, -1. This can be
used to pass down sockets to child processes. Note: Do not close
the socket in the parent process until the child process has
called _impsockhandle() for that socket!
[emxfix02.zip]
o emx.dll now exports its exception handler (_emx_exception)
[emxfix01.zip]
o getpass() reads always from the keyboard, even if handle 0 is not
associated with the keyboard device. Though this is the correct
behavior, it is inconvenient for programs controlled by other
programs, for instance, when run in shell mode of GNU Emacs.
_getpass1() is an alternate version of getpass() which reads from
handle 0 unless that handle is associated with the keyboard. If
handle 0 is associated with the keyboard, _getpass1() reads
directly from the keyboard device, like getpass()
o The `touch' tool has a new `-r' option for using the time and date
of a reference file
Installing this fix package
---------------------------
1. Stop all processes which use emxlibc.dll, emxlibcm.dll, or
emxlibcs.dll. Use
emxload -qw
to stop preloaded programs under OS/2.
2. Unpack emxfix05.zip or emxrt.zip, respectively, in the root
directory of the drive where you have installed emx:
cd \
unzip -o emxfix05
Do not use the -f and -u options of unzip -- the time stamp of
header files has not been updated.
3. After unpacking emxfix05.zip, type the following commands to
rebuild the OMF-style libraries (you don't need this step under
DOS):
cd \emx\lib
del emx2.lib gcc.lib os2.lib socket.lib
del mt\c.lib mt\c_import.lib mt\emx.lib
del st\c.lib st\c_import.lib st\emx.lib
omflibs
(You don't have to delete the .lib files -- except for socket.lib
-- if you already have installed one of emxfix01.zip through
emxfix04.zip.)
To take advantage of the fixes, relink your programs.
You should keep the file \emx\doc\emxfix05.doc as it shows what fixes
you have installed.
--------------------------- END OF EMXFIX05.DOC ------------------------------