Message-ID: <3959BB59.1A6624DF@softhome.net> Date: Wed, 28 Jun 2000 10:46:17 +0200 From: Laurynas Biveinis X-Mailer: Mozilla 4.73 [en] (Win98; U) X-Accept-Language: lt,en MIME-Version: 1.0 To: Eli Zaretskii CC: djgpp-workers AT delorie DOT com Subject: Re: libc/stubs business References: <39586C3C DOT 6F58707A AT softhome DOT net> <200006271630 DOT TAA26325 AT mailgw1 DOT netvision DOT net DOT il> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Reply-To: djgpp-workers AT delorie DOT com Eli Zaretskii wrote: > I think that's because fsext is called from _open, _read, etc. which > are called from ANSI functions, and so fsext cannot call close, which > is non-ANSI. I think the solution is simply to call _close instead, > because that's what close does anyway. > > As for tempnam, it is called by tmpfile, which is ANSI, and so the > fact that tempnam calls access (a non-ANSI function) is a problem. Below is a patch. OK to commit? > I think it could be a good idea to get libc build procedure to run > libclink/check automatically when the library is built, and abort the > build if something fails to check out. I see it more as a part of 'make test' or 'make check', not simple make. IMHO it is better to separate building and testing process. > Would you like to add this? Will see, probably. For me DJGPP issues is a snowball rolling of the mountain nowadays - it gets bigger and bigger :-) > > And the third, how to interpret other check output? > > No clue. Doesn't the source tell? ;-) Well, I think if I knew how to interpret check output, I understood the source better ;-) Laurynas Index: djgpp/src/libc/compat/stdio/tempnam.c =================================================================== RCS file: /cvs/djgpp/djgpp/src/libc/compat/stdio/tempnam.c,v retrieving revision 1.2 diff -u -r1.2 tempnam.c --- tempnam.c 1997/10/28 19:22:12 1.2 +++ tempnam.c 2000/06/28 08:31:01 @@ -1,5 +1,7 @@ +/* Copyright (C) 2000 DJ Delorie, see COPYING.DJ for details */ /* Copyright (C) 1997 DJ Delorie, see COPYING.DJ for details */ /* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ +#include #include #include #include Index: djgpp/src/libc/fsext/fsext.c =================================================================== RCS file: /cvs/djgpp/djgpp/src/libc/fsext/fsext.c,v retrieving revision 1.2 diff -u -r1.2 fsext.c --- fsext.c 1998/06/28 23:07:56 1.2 +++ fsext.c 2000/06/28 08:31:06 @@ -1,5 +1,5 @@ +/* Copyright (C) 2000 DJ Delorie, see COPYING.DJ for details */ /* Copyright (C) 1998 DJ Delorie, see COPYING.DJ for details */ -/* Copyright (C) 1998 DJ Delorie, see COPYING.DJ for details */ /* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ #include #include @@ -11,6 +11,7 @@ #include #include #include +#include typedef struct __FSEXT_entry { __FSEXT_Function *function; @@ -139,7 +140,7 @@ __FSEXT_exit_hook=NULL; for (i = 0; i < num_fds; i++) if (fsext_list[i].function) - close(i); + _close(i); /* Free the table */ free(fsext_list);