Sender: rich AT phekda DOT freeserve DOT co DOT uk Message-ID: <3D049881.9ED69040@phekda.freeserve.co.uk> Date: Mon, 10 Jun 2002 13:16:01 +0100 From: Richard Dawe X-Mailer: Mozilla 4.77 [en] (X11; U; Linux 2.2.19 i586) X-Accept-Language: de,fr MIME-Version: 1.0 To: djgpp-workers AT delorie DOT com Subject: Re: Patches for build with gcc 3.1 - FSEXT chunk References: <6137-Fri31May2002101114+0300-eliz AT is DOT elta DOT co DOT il> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Reply-To: djgpp-workers AT delorie DOT com Hello. Eli Zaretskii wrote: > > > Date: Wed, 29 May 2002 20:56:01 +0100 > > From: "Richard Dawe" > > > > There's scope for making the wrapper functions common, e.g. by making > > them library functions, e.g. __FSEXT_call_open_handlers2() which has > > a variable number of parameters rather than taking a va_list? > > How about defining an inline function in some header file private to > the library? Yes, I have done that - please see another mail containing the patch. [snip] > The rest of the changes seem okay by inspection, but please make sure > that whatever changes you make in FSEXT-related parts don't break > existing uses of FSEXT, like dbgcom.c, GNU `ls', Ispell, etc. I tested the patch with the following: * ls from Fileutils 4.1, run as 'ls --color=tty'; * the demo httpgetn.c from libsocket, modified to use read() and write() instead of recv() and send() respectively; * the test program for /dev/zero and /dev/full support - tests/libc/fsext/tzero.c; * gdb 5.1.1 built with a dbgcom.c that was compiled with DEBUG_DBGCOM_FILES defined, running tests/libc/posix/unistd/append.c. I believe this covers the following FSEXT hooks, in order (with the first program that tests the hook in brackets): _write (ls) write (libsocket) _read (libsocket) fstat (tzero) lstat (tzero) _open (tzero) _creat (tzero) _close (tzero) select (tzero) link (tzero, ignores arguments) remove (tzero, ignores arguments) lseek (tzero, ignores arguments) _creat_new (append, running under gdb) These have not been covered: __internal_readlink fchown llseek symlink The /dev/zero and /dev/full devices should should fchown and llseek, so I will look at their handling, when I add support. Here is the output from the specially-built gdb: ---Start gdb output--- bash-2.04$ /temp/gdb511s/gnu/gdb-5.1-1/gdb/gdb.exe append.exe GNU gdb 5.1.1 Copyright 2002 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "i386-pc-msdosdjgpp"..._open(c:\users\rich/gdb.ini) => -1 _open(append.exe) => 7 _open(append.exe) => 8 _open(C:/DJGPP/ZONEINFO/EUROPE/LONDON) => 9 _close(9) _open(c:/develop/djgpp.rw/tests/libc/posix/unistd/_gdb_history) => -1 (gdb) r Starting program: c:/develop/djgpp.rw/tests/libc/posix/unistd/append.exe _open(c:/develop/djgpp.rw/tests/libc/posix/unistd/append.exe) => 9 _close(9) Program exited normally. (gdb) quit _close(7) _close(8) ---End gdb output--- Thanks, bye, Rich =] -- Richard Dawe [ http://www.phekda.freeserve.co.uk/richdawe/ ]