Mail Archives: djgpp-workers/2000/06/28/04:42:41
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 <libc/stubs.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
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 <stdio.h>
#include <stdlib.h>
@@ -11,6 +11,7 @@
#include <libc/dosio.h>
#include <unistd.h>
#include <fcntl.h>
+#include <io.h>
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);
- Raw text -