Message-ID: <39586C3C.6F58707A@softhome.net> Date: Tue, 27 Jun 2000 10:56:28 +0200 From: Laurynas Biveinis X-Mailer: Mozilla 4.73 [en] (Win98; U) X-Accept-Language: lt,en MIME-Version: 1.0 To: DJGPP Workers Subject: libc/stubs business Content-Type: text/plain; charset=iso-8859-4 Content-Transfer-Encoding: 7bit Reply-To: djgpp-workers AT delorie DOT com With help of tests/libclink/check.cc and Co, I've tracked down two case of missing #include : ANSI functions malloc() and fwrite() use sbrk() and isatty() which are really not ANSI. The patch fixes that. OK to commit? Also, check output showed me: Impure stub fsext.o(close) -> stub0002.o Impure stub tempnam.o(access) -> stub0000.o [...] I'm not sure if they need fixing too, because neither fsext() nor tempnam() is ANSI/POSIX. And the third, how to interpret other check output? I understand what do 'T' and 'U' mean, but not much else. opendir.o: (P) != stub (__set_need_fake_dot_dotdot) T __set_need_fake_dot_dotdot T _lfn_find_close T opendir U __access U __doserr_to_errno U __dpmi_int U __findfirst U __opendir_flags U _fixpath U _preserve_fncase U _use_lfn U errno U free U malloc uclock.o: (O) != stub (uclock) T uclock U __bss_count U __dpmi_yield U _go32_info_block U errno ctime.o: (A),(O) ctime.o: (O) != stub (__tzset) T __tzset T _posixrules_data T asctime T ctime T gmtime T localtime T mktime T tzname T tzsetwall U __bss_count U __close U __dj_ctype_flags U __environ_changed U __open U __read U __stricmp U getenv U sprintf U strcat U strcpy U strncpy U strrchr Missing POSIX functions: confstr wordexp wordfree Laurynas Index: djgpp/src/libc/ansi/stdio/fwrite.c =================================================================== RCS file: /cvs/djgpp/djgpp/src/libc/ansi/stdio/fwrite.c,v retrieving revision 1.4 diff -u -r1.4 fwrite.c --- fwrite.c 1999/06/03 17:27:33 1.4 +++ fwrite.c 2000/06/27 08:44:51 @@ -1,6 +1,8 @@ +/* Copyright (C) 2000 DJ Delorie, see COPYING.DJ for details */ /* Copyright (C) 1999 DJ Delorie, see COPYING.DJ for details */ /* Copyright (C) 1996 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/ansi/stdlib/malloc.c =================================================================== RCS file: /cvs/djgpp/djgpp/src/libc/ansi/stdlib/malloc.c,v retrieving revision 1.6 diff -u -r1.6 malloc.c --- malloc.c 1999/08/20 22:46:58 1.6 +++ malloc.c 2000/06/27 08:44:51 @@ -1,7 +1,9 @@ +/* Copyright (C) 2000 DJ Delorie, see COPYING.DJ for details */ /* Copyright (C) 1999 DJ Delorie, see COPYING.DJ for details */ /* Copyright (C) 1998 DJ Delorie, see COPYING.DJ for details */ /* Copyright (C) 1997 DJ Delorie, see COPYING.DJ for details */ +#include #include #include #include