Sender: rich AT phekda DOT freeserve DOT co DOT uk Message-ID: <3DAC5172.B12F67BF@phekda.freeserve.co.uk> Date: Tue, 15 Oct 2002 18:33:38 +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: Don't pollute the namespace so much [PATCH] References: <200210151639 DOT g9FGd2o32480 AT envy DOT delorie DOT com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Reply-To: djgpp-workers AT delorie DOT com Hello. DJ Delorie wrote: > getgrid and getgrnam are posix. What was the conflict there? Perhaps > a full list of libclink's notes would be appropriate... I've put a copy of libclink's output at the end of this mail. The *grent functions use getgrgid. The *grent functions are not ANSI and not POSIX. getgrent uses getgrgid. getgrgid and getgrnam are in the same source file. Users of getgrent will get getgrgid and getgrnam imported into the namespace. bash-2.04$ find . -name '*.c' | xargs grep getgrnam ./posix/grp/getgrgid.c:getgrnam(const char *name) bash-2.04$ find . -name '*.c' | xargs grep getgrgid ./posix/grp/getgrent.c: return getgrgid(getgid()); ./posix/grp/getgrgid.c:getgrgid(gid_t gid) (Incidentally, *grent now seem to be part of POSIX - they're present in draft 7 of the new POSIX standard. But one thing at a time... ;) ) Actually, I suppose that *grent don't actually need entries in . They're all in one file and nothing else uses them. But if you use getgrent, is it OK to also import setgrent, etc. into the namespace? Bye, Rich =] -- Richard Dawe [ http://www.phekda.freeserve.co.uk/richdawe/ ] 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 strnicmp.o: (O) != stub (strnicmp) T strnicmp U __dj_ctype_tolower strncase.o: (P) -> (O) T strncasecmp U strnicmp fcvt.o: (P) -> (O) T fcvt U fcvtbuf fcvtbuf.o: (O) != stub (fcvtbuf) T fcvtbuf U __ecvround U ecvtbuf U localeconv U memcpy U sprintf U strchr U strlen ecvt.o: (P) -> (O) T ecvt U ecvtbuf ecvtbuf.o: (O) != stub (__ecvround) T __ecvround T ecvtbuf U atoi U localeconv U memcpy U sprintf 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 strlen U strncpy U strrchr 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