Commit Graph

1041 Commits

Author SHA1 Message Date
lukem 45a7a69275 Overhaul the use of nsdispatch(3) by public APIs so that the back-end
methods use va_list in a manner that is directly related to the public API.
This makes it much easier to write dynamic nsswitch backends for getpwent(3).
Per my proposal on tech-userlevel.

Implement getpwgid_r() and getpwnam_r() APIs per the POSIX 1003.1, 2004 Ed.
These aren't fully reentrant or threadsafe yet, because the compat stuff
currently uses non-reentrant data sources (getnetgrent(3), getpwent(3)),
and there is probably some locking to be improved in the backends.
This will be fixed in the near future.
We also need to add _SC_GETPW_R_SIZE_MAX to sysconf(3).

Fix the compat `+' prototype override so getpwnam(3) and getpwuid(3) DTRT.

Improve the description of pw_class and pw_gecos.
2004-10-05 04:45:54 +00:00
lukem c54f283e46 Overhaul the use of nsdispatch(3) by public APIs so that the back-end
methods use va_list in a manner that is directly related to the public API.
This makes it much easier to write dynamic nsswitch backends for getgrent(3).
Per my proposal on tech-userlevel.

Implement getgrgid_r() and getgrnam_r() APIs per the POSIX 1003.1, 2004 Ed.
These aren't fully reentrant or threadsafe yet, because the compat stuff
currently uses non-reentrant data sources (getnetgrent(3), getgrent(3)),
and there is probably some locking to be improved in the backends.
This will be fixed in the near future.
We also need to add _SC_GETGR_R_SIZE_MAX to sysconf(3).
2004-10-04 04:11:33 +00:00
lukem 25d91a60fb * Re-number NS_FORCEALL from 1<<7 to 1<<8, moving it out of the "public"
bitrange for nsdispatch(3) return values.
* Tweak documentation comments in nsswitch.h
* Ensure the result from the back-end method is masked with
  NS_STATUSMASK before nsdispatch(3) returns it.
2004-10-04 04:02:27 +00:00
kent 4a79196841 correct the return value type of _lwp_self() 2004-10-02 07:59:11 +00:00
lukem e775b9e35a Implement NS_FORCEALL, which may be set in defaults[0].flags by a caller of
nsdispatch(3) to indicate that all available database methods for a source
will be invoked.  This is useful for functions such as endgrent(3).
2004-09-29 02:47:32 +00:00
lha 22aae06570 update heimdal version to Heimdal 0.6.3 2004-09-14 20:30:57 +00:00
lha 2c875217bb Merge in changes between 0.6.2 and 0.6.3 2004-09-14 08:08:19 +00:00
thorpej de1dfb1250 DCE 1.1 RPC compatible UUID routines for libc, adapted from FreeBSD.
Encode/decode to big/little endian binary blob routines adapted from
kernel.

PR 23470.
2004-09-13 21:44:54 +00:00
christos 458810afd4 Typo... 2004-08-19 23:10:40 +00:00
christos 44a8d4af42 Rescue for _PATH_STDPATH 2004-08-19 23:07:01 +00:00
jmc a2d438e65c Fix proto for gethostent to match reality (takes void args) 2004-08-17 04:24:16 +00:00
ginsbach 30ef75e3f4 Restore gethostent() as a supported interface. Yes, it maybe obsolete
but it is specified by IEEE Std 1003.1, 2004 Edition (POSIX) and
the X/Open standards (Issue 6 and XNS 5.2).

* revert change removing gethostent() from gethostbyname(3) man page
* delete kruft from gethnamaddr.c leaving only gethostent() as a
  wrapper around _gethtent().
* revert recent changes to <netdb.h>
  + restore gethostent() prototype
  + restore freehostent() prototype; handle similar to non-shipped
    getipnodby*() prototypes
  + use correct XOPEN_SOURCE version (520 not 500) for freeaddrinfo()
    prototype; interface specified by XNS5.2 not XNS5

Reviewd by <christos> and <drochner>.
2004-08-17 02:29:56 +00:00
ginsbach ebcc92c100 * add const qualifier making getrpcbyname() and getrpcbyname_r()
prototypes match those used in latest Sun RPC code (TI-RPC 2.3)
* modify function getrpcbyname() definition as appropriate
2004-08-16 02:47:54 +00:00
drochner e6dd3245b7 Delete prototypes for gethostent() and freehostent();
there functions don't exist in libc.
2004-08-11 16:13:00 +00:00
thorpej 7c161da819 - Rename pw_copy() to pw_copyx(), make it return a success/failure code,
and add "errbuf" and "errbufsz" parameters so that errors can be handled
  gracefully, rather than simply exiting the process.
- Add a pw_copy() wrapper around pw_copyx() to preserve old behavior for
  apps that use it.
- Bump shlib version to 7.4.
2004-08-03 23:29:04 +00:00
tshiozak f7d656a488 revert the last all changes related to iconv(3). 2004-08-02 13:38:21 +00:00
tshiozak ab8d4be7c6 make sure that the iconv(3) follows the POSIX specification;
change the 2nd argument from "const char ** restrict" to "char ** restrict".
2004-08-01 16:40:58 +00:00
thorpej 43d6d8d887 Add support for dynamically loading nsswitch modules on ELF platforms.
Adapted from FreeBSD.  Maintains full backward API / ABI compatbility
with built-in-only nsdispatch().

While here, also make nsdispatch() itself thread-safe.
2004-07-24 18:42:51 +00:00
seb 2f8bbc118e Add wordexp(3). The wordexp function performs shell-style word expansions.
This implementation is wrapper around the undocumented wordexp sh(1)
built-in command.

From FreeBSD.
Provided in PR lib/26123.
Approved by kleink@.
2004-07-13 15:42:03 +00:00
kleink 2284f27adc Move round() to the C99 section. 2004-07-12 23:44:52 +00:00
kleink cceefa7be9 Move the strcasestr() prototype to the local extensions section.
Also __P() it; this should be consistent within a single header.
2004-07-12 23:35:14 +00:00
junyoung bc836a3102 lib/24252: Add C99 functions round(3) and roundf(3).
libm minor unchanged; ride a recent bump.

From FreeBSD.
2004-07-10 13:49:09 +00:00
junyoung 74d67c3551 Add strcasestr(3), case insensitive version of strstr(3).
Bump libc minor.

From FreeBSD.
2004-07-03 08:27:25 +00:00
kleink 7e47c9f64e Resolve some namespace protection confusion between XPG4.2 and 5/1003.1b,
making _XOPEN_SOURCE_EXTENDED work again.  Fixes PR lib/26077.
2004-07-01 23:46:07 +00:00
kleink 11f7fb5f29 Tidy up the namespace: lint -> __lint__. 2004-07-01 22:31:28 +00:00
drochner 147d852dbc being here, add the (l)lround(f) functions to libm
(almost the same like lrint)
2004-07-01 16:09:21 +00:00
drochner b6fcfe5309 shut up lint's "long long" warnings 2004-06-30 17:51:09 +00:00
drochner 737ab05bf9 Add (l)lrint(f).
Being here, move some C99 function declarations into the appropriate
section (as discussed with kleink).
2004-06-30 15:11:05 +00:00
jmc b2f782612f Completely rework how tools/compat is done. Purge all uses/references to
_NETBSD_SOURCE as this makes cross building from older/newer versions of
NetBSD harder, not easier (and also makes the resulting tools 'different')

Wrap all required code with the inclusion of nbtool_config.h, attempt to
only use POSIX code in all places (or when reasonable test w. configure and
provide definitions: ala u_int, etc).

Reviewed by lukem. Tested on FreeBSD 4.9, Redhat Linux ES3, NetBSD 1.6.2 x86
NetBSD current (x86 and amd64) and Solaris 9.

Fixes PR's: PR#17762 PR#25944
2004-06-20 22:20:14 +00:00
christos e89baaa3bf Provide an ifdef so that we can define an old style _res if we need to. 2004-06-09 18:04:05 +00:00
mrg 5fb3053fed add $NetBSD$ 2004-06-06 06:58:50 +00:00
he 726e232131 Removr parameter names from __h_errno_set() function declaration.
Without this the vax port fails to compile the okheaders regression
test, because the "err" parameter name shadows a global variable.
2004-06-04 09:54:03 +00:00
kleink a95e31fea6 Move declaration of closefrom(3) to local extensions. 2004-06-01 16:10:29 +00:00
itojun 56c1b44159 implement closefrom(3). 2004-05-31 05:06:51 +00:00
christos 388c103e83 PR/25003: John Kohl: File is missing a copyright. 2004-05-28 14:38:53 +00:00
christos 58fadb2d69 Add unix/98 pty function prototypes. 2004-05-27 02:58:14 +00:00
christos 5fec60124f PR/25707: Love: remove _LIBC from res_state as suggested, so that res_ninit
calls in userland don't trash memory.
2004-05-26 01:08:50 +00:00
christos afa83b513a notyet is in the users namespace as pointed out by klaus. 2004-05-25 14:49:38 +00:00
christos fdaf51dfc9 we don't implement getipnode*(), so don't define their flags for now. It
confuses some software (ntpd).
2004-05-25 13:55:48 +00:00
lha 76164d845a Now that we have res_nsearch, use it. Thanks christos for adding it. 2004-05-25 11:15:43 +00:00
yamt 7ca373cce9 remove a duplicated prototype of getprotoent_r. 2004-05-24 12:34:28 +00:00
kleink c3d77c559b Implement sigemptyset() and sigfillset() not as macros but as inline
functions, just like the rest of the sigsetops.  From J.T.Conklin
in PR lib/25627; originally prompted to work around problems with
an application but also fixing one important bug: per POSIX, these
functions may be additionally implemented as macros, iff they evaluate
their macros only once.  This was not the case.
2004-05-23 23:03:24 +00:00
christos cad3251cd9 Provide access to the 5 symbols the bind8 resolver libc did. 2004-05-22 23:46:16 +00:00
christos c5167ccf84 provide unconditional access to _res via __res_state(). This will abort
for multi-threaded programs.
2004-05-22 15:42:17 +00:00
christos a39aed56f5 install new files. 2004-05-21 02:27:35 +00:00
christos b74cd7536f resolve conflicts. 2004-05-21 02:25:10 +00:00
christos d922106ab4 import new and changed files from bind9 2004-05-21 02:17:49 +00:00
christos 3bffc96400 Import selected changes from bind9. Follow the copyright structure there. 2004-05-21 02:14:39 +00:00
christos ad7bdf9185 add 2 new functions from bind9 2004-05-21 01:53:17 +00:00
kleink 867f8a88f2 Make it possible to use <stdbool.h> in C++ applications.
Fixes PR lib/25597 from Takuya SHIOZAKI.
2004-05-20 17:49:32 +00:00