ftp.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2002/10/16/06:58:19

Date: Wed, 16 Oct 2002 12:08:40 +0100
From: "Richard Dawe" <rich AT phekda DOT freeserve DOT co DOT uk>
Sender: rich AT phekda DOT freeserve DOT co DOT uk
To: djgpp-workers AT delorie DOT com
X-Mailer: Emacs 21.3.50 (via feedmail 8.3.emacs20_6 I) and Blat ver 1.8.6
Subject: Don't pollute the namespace so much, version 2 [PATCH]
Message-Id: <E181lTW-0000fs-00@phekda.freeserve.co.uk>
Reply-To: djgpp-workers AT delorie DOT com

Hello.

Below is a revised patch, to avoid polluting the namespace so much.
POSIX and other functions are no longer stubbed. The output from
tests/libclink is also included below.

OK to commit?

Thanks, bye, Rich =]

getgrent.o: (P),(O)
getgrent.o: (P) != stub (endgrent)
  T endgrent
  T fgetgrent
  T getgrent
  T setgrent
  U getgid
  U getgrgid

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 __solve_symlinks
  U _fixpath
  U _preserve_fncase
  U _use_lfn
  U errno
  U free
  U malloc
  U strlen

Missing ANSI functions:
_Exit acosf acoshf acoshl acosl asinf asinhf asinhl asinl atan2f atan2l 
atanf atanhf atanhl atanl atoll btowc cabs cabsf cabsl cacos cacosf cacosh 
cacoshf cacoshl cacosl carg cargf cargl casin casinf casinh casinhf casinhl 
casinl catan catanf catanh catanhf catanhl catanl cbrtf cbrtl ccos ccosf 
ccosh ccoshf ccoshl ccosl ceilf ceill cexp cexpf cexpl cimag cimagf cimagl 
clog clogf clogl conj conjf conjl copysign copysignf copysignl cosf coshf 
coshl cosl cpow cpowf cpowl cproj cprojf cprojl creal crealf creall csin 
csinf csinh csinhf csinhl csinl csqrt csqrtf csqrtl ctan ctanf ctanh ctanhf 
ctanhl ctanl erf erff erfl erfc erfcf erfcl exp2f exp2l expf expl expm1f 
expm1l fabsf fabsl fdim fdimf fdiml feclearexcept fegetenv fegetexceptflag 
fegetround feholdexcept feraiseexcept fesetenv fesetexceptflag fesetround 
fetestexcept feupdateenv fgetwc fgetws floorf floorl fma fmaf fmal fmax 
fmaxf fmaxl fmin fminf fminl fmodf fmodl fpclassify fputwc fputws frexpf 
frexpl fwide fwprintf fwscanf getwc getwchar hypotf hypotl ilogb ilogbf 
ilogbl imaxabs imaxdiv isblank isfinite isgreater isgreaterequal isinf 
isless islessequal islessgreater isnan isnormal isunordered iswalnum 
iswalpha iswblank iswcntrl iswctype iswdigit iswgraph iswlower iswprint 
iswpunct iswspace iswupper iswxdigit ldexpf ldexpl lgamma lgammaf lgammal 
llrint llrintf llrintl llround llroundf llroundl log10f log10l log1pf log1pl 
log2f log2l logb logbf logbl logf logl lrint lrintf lrintl lround lroundf 
lroundl mbrlen mbrtowc mbsinit mbsrtowcs modff nan nanf nanl nearbyint 
nearbyintf nearbyintl nextafter nextafterf nextafterl nexttoward nexttowardf 
nexttowardl powf powl putwc putwchar remainder remainderf remainderl remquo 
remquof remquol rint rintf rintl round roundf roundl scalbln scalblnf 
scalblnl scalbn scalbnf scalbnl signbit sinf sinhf sinhl sinl sqrtf sqrtl 
strtof strtoimax strtold strtoumax swprinf swscanf tanf tanhf tanhl tanl 
tgamma tgammaf tgammal towctrans towlower towupper trunc truncf truncl 
ungetwc vfwprintf vfwscanf vswprintf vswscanf vwprintf vwscanf wcrtomb 
wcscat wcschr wcscmp wcscoll wcscpy wcscspn wcsftime wcslen wcsncat wcsncmp 
wcsncpy wcspbrk wcsrchr wcsrtombs wcsspn wcsstr wcstod wcstof wcstoimax 
wcstok wcstol wcstold wcstoll wcstoul wcstoull wcstoumax wcsxfrm wctob 
wctrans wctype wmemchr wmemcmp wmemcpy wmemmove wmemset wprintf wscanf 

Missing POSIX functions:
_longjmp _setjmp _tolower _toupper accept asctime_r bind catclose catgets 
catopen closelog connect ctime_r dbm_clearerr dbm_close dbm_delete dbm_error 
dbm_fetch dbm_firstkey dbm_nextkey dbm_open dbm_store dlclose dlerror dlopen 
dlsym endhostent endnetent endprotoent endservent endutxent fchdir fchmod 
flockfile fmtmsg freeaddrinfo fseeko ftello ftok ftrylockfile funlockfile 
getaddrinfo getc_unlocked getchar_unlocked getcontext getgrgid_r getgrnam_r 
gethostbyaddr gethostbyname gethostent gethostid getlogin_r getnameinfo 
getnetbyaddr getnetbyname getnetent getpeername getpgid getpriority 
getprotobyname getprotobynumber getprotoent getpwnam_r getpwuid_r 
getservbyname getservbyport getservent getsid getsockname getsockopt 
getsubopt getutxent getutxid getutxline gmtime_r grantpt h_errno hcreate 
hdestroy hsearch iconv iconv_close iconv_open if_freenameindex 
if_indextoname if_nameindex if_nametoindex inet_addr inet_ntoa inet_ntop 
inet_pton j0 j1 jn killpg lfind listen localtime_r lsearch makecontext mmap 
msgctl msgget msgrcv msgsnd msync munmap nftw nl_langinfo openlog poll pread 
pselect putc_unlocked putchar_unlocked pututxline pwrite rand_r readdir_r 
readv recv recvfrom recvmsg scalb sched_yield semctl semget semop send 
sendmsg sendto setcontext setegid seteuid sethostent setlogmask setnetent 
setpgrp setpriority setprotoent setregid setreuid setservent setsockopt 
setutxent shmat shmctl shmdt shmget shutdown sigaltstack sighold sigignore 
siginterrupt sigpause sigrelse sigset sigwait sockatmark socket socketpair 
strerror_r strfmon strptime strtok_r swapcontext syslog tcgetsid tdelete 
tfind tsearch ttyname_r twalk ualarm ulimit unlockpt waitid wcswcs wcswidth 
wcwidth wordexp wordfree writev y0 y1 yn 

Index: include/libc/stubs.h
===================================================================
RCS file: /cvs/djgpp/djgpp/include/libc/stubs.h,v
retrieving revision 1.12
diff -p -c -3 -r1.12 stubs.h
*** include/libc/stubs.h	13 Apr 2002 07:42:19 -0000	1.12
--- include/libc/stubs.h	16 Oct 2002 10:54:01 -0000
***************
*** 1,3 ****
--- 1,4 ----
+ /* Copyright (C) 2002 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 */
  #ifndef __dj_include_libc_stubs_h__
*************** extern "C" {
*** 40,46 ****
--- 41,49 ----
  #define crlf2nl __crlf2nl
  #define dosmemget __dosmemget
  #define dosmemput __dosmemput
+ #define ecvtbuf __ecvtbuf
  #define fchown __fchown
+ #define fcvtbuf __fcvtbuf
  #define filelength __filelength
  #define findfirst __findfirst
  #define findnext __findnext
*************** extern "C" {
*** 65,72 ****
--- 68,77 ----
  #define spawnvpe __spawnvpe
  #define statfs __statfs
  #define stricmp __stricmp
+ #define strnicmp __strnicmp
  #define sync __sync
  #define tell __tell
+ #define tzsetwall __tzsetwall
  #define uclock __uclock
  
  #endif /* !_POSIX_SOURCE */
Index: src/libc/compat/string/strnicmp.c
===================================================================
RCS file: /cvs/djgpp/djgpp/src/libc/compat/string/strnicmp.c,v
retrieving revision 1.3
diff -p -c -3 -r1.3 strnicmp.c
*** src/libc/compat/string/strnicmp.c	3 Jun 1999 17:27:34 -0000	1.3
--- src/libc/compat/string/strnicmp.c	16 Oct 2002 10:54:05 -0000
***************
*** 1,5 ****
--- 1,7 ----
+ /* Copyright (C) 2002 DJ Delorie, see COPYING.DJ for details */
  /* Copyright (C) 1999 DJ Delorie, see COPYING.DJ for details */
  /* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */
+ #include <libc/stubs.h>
  #include <string.h>
  #include <ctype.h>
  
Index: src/libc/compat/string/strncase.S
===================================================================
RCS file: /cvs/djgpp/djgpp/src/libc/compat/string/strncase.S,v
retrieving revision 1.1
diff -p -c -3 -r1.1 strncase.S
*** src/libc/compat/string/strncase.S	2 Apr 1995 01:51:02 -0000	1.1
--- src/libc/compat/string/strncase.S	16 Oct 2002 10:54:10 -0000
***************
*** 1,4 ****
  /* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */
  	.global	_strncasecmp
  _strncasecmp:
! 	jmp	_strnicmp
--- 1,5 ----
+ /* Copyright (C) 2002 DJ Delorie, see COPYING.DJ for details */
  /* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */
  	.global	_strncasecmp
  _strncasecmp:
! 	jmp	___strnicmp
Index: src/libc/compat/stdlib/ecvt.c
===================================================================
RCS file: /cvs/djgpp/djgpp/src/libc/compat/stdlib/ecvt.c,v
retrieving revision 1.1
diff -p -c -3 -r1.1 ecvt.c
*** src/libc/compat/stdlib/ecvt.c	25 Jul 1998 18:58:44 -0000	1.1
--- src/libc/compat/stdlib/ecvt.c	16 Oct 2002 10:54:16 -0000
***************
*** 1,4 ****
--- 1,6 ----
+ /* Copyright (C) 2002 DJ Delorie, see COPYING.DJ for details */
  /* Copyright (C) 1998 DJ Delorie, see COPYING.DJ for details */
+ #include <libc/stubs.h>
  #include <stdlib.h>
  #include <float.h>
  
Index: src/libc/compat/stdlib/ecvtbuf.c
===================================================================
RCS file: /cvs/djgpp/djgpp/src/libc/compat/stdlib/ecvtbuf.c,v
retrieving revision 1.1
diff -p -c -3 -r1.1 ecvtbuf.c
*** src/libc/compat/stdlib/ecvtbuf.c	25 Jul 1998 18:58:44 -0000	1.1
--- src/libc/compat/stdlib/ecvtbuf.c	16 Oct 2002 10:54:21 -0000
***************
*** 1,4 ****
--- 1,6 ----
+ /* Copyright (C) 2002 DJ Delorie, see COPYING.DJ for details */
  /* Copyright (C) 1998 DJ Delorie, see COPYING.DJ for details */
+ #include <libc/stubs.h>
  #include <stdlib.h>
  #include <stdio.h>
  #include <string.h>
Index: src/libc/compat/stdlib/fcvt.c
===================================================================
RCS file: /cvs/djgpp/djgpp/src/libc/compat/stdlib/fcvt.c,v
retrieving revision 1.1
diff -p -c -3 -r1.1 fcvt.c
*** src/libc/compat/stdlib/fcvt.c	25 Jul 1998 18:58:44 -0000	1.1
--- src/libc/compat/stdlib/fcvt.c	16 Oct 2002 10:54:25 -0000
***************
*** 1,4 ****
--- 1,6 ----
+ /* Copyright (C) 2002 DJ Delorie, see COPYING.DJ for details */
  /* Copyright (C) 1998 DJ Delorie, see COPYING.DJ for details */
+ #include <libc/stubs.h>
  #include <stdlib.h>
  #include <float.h>
  
Index: src/libc/compat/stdlib/fcvtbuf.c
===================================================================
RCS file: /cvs/djgpp/djgpp/src/libc/compat/stdlib/fcvtbuf.c,v
retrieving revision 1.2
diff -p -c -3 -r1.2 fcvtbuf.c
*** src/libc/compat/stdlib/fcvtbuf.c	9 Jan 2002 22:00:10 -0000	1.2
--- src/libc/compat/stdlib/fcvtbuf.c	16 Oct 2002 10:54:30 -0000
***************
*** 1,4 ****
--- 1,6 ----
+ /* Copyright (C) 2002 DJ Delorie, see COPYING.DJ for details */
  /* Copyright (C) 1998 DJ Delorie, see COPYING.DJ for details */
+ #include <libc/stubs.h>
  #include <stdlib.h>
  #include <stdio.h>
  #include <string.h>

- Raw text -


  webmaster     delorie software   privacy  
  Copyright 2019   by DJ Delorie     Updated Jul 2019