Xin LI
603c9c1dc5
Cleanup for getgrouplist(3):
...
- Use /*- instead of /* for copyright section
- Include unistd.h for prototype of it
- Sort and separate includes as described in style(9)
- ANSIfy the function defination
- Use const for the traversing iterator
2005-05-03 16:20:03 +00:00
Hajimu UMEMOTO
1ccfa322aa
fix signed/unsigned comparison warnings.
...
Obtained from: NetBSD
2005-05-03 16:13:31 +00:00
Xin LI
2f22da5d97
Include paths.h for prototype of getbootfile(3).
2005-05-03 15:28:07 +00:00
Hajimu UMEMOTO
943db5a2ab
the 3rd argument of getsockname() should be socklen_t*.
...
Submitted by: stefanf
2005-05-02 04:43:32 +00:00
Hajimu UMEMOTO
f468e837a1
oops, we don't need previous change.
2005-05-01 12:37:12 +00:00
Hajimu UMEMOTO
6bd1d1a192
make it compilable without YP definition.
2005-05-01 12:08:57 +00:00
Hajimu UMEMOTO
8592d23a9f
don't see RES_USE_INET6 when called from getipnodeby*().
2005-05-01 07:39:45 +00:00
Hajimu UMEMOTO
e84892eb74
oops, gethostbyaddr(3) must return h_addr as an IPv4-mapped
...
IPv6 address when RES_USE_INET6 was set, according to RFC 2133
section 6.2.
2005-04-30 20:07:01 +00:00
Hajimu UMEMOTO
6964622dd0
handling RES_USE_INET6 better.
2005-04-30 19:28:31 +00:00
Hajimu UMEMOTO
e4f846efec
_ht_gethostbyaddr didn't handle RES_USE_INET6 correctly.
2005-04-30 18:46:27 +00:00
Hajimu UMEMOTO
e692b6186a
_gethostbynisname() didn't support RES_USE_INET6.
2005-04-30 18:37:35 +00:00
Hajimu UMEMOTO
40ca152d15
_ht_gethostbyname didn't handle RES_USE_INET6 correctly.
2005-04-30 17:01:18 +00:00
Hajimu UMEMOTO
2c08ac2b38
- do validation check and IPv4-mapped IPv6 address handling before
...
any query.
- don't query against IPv6 link-local address.
- use IN6_IS_ADDR_V4{MAPPED,COMPAT} macros.
- use memcpy() instead of bcopy().
Inspired by: NetBSD
2005-04-29 19:55:23 +00:00
Hajimu UMEMOTO
86726f325b
NETDB_INTERNAL is not fit, here. return NO_RECOVERY for h_errno.
2005-04-29 17:36:54 +00:00
Hajimu UMEMOTO
49e0283df8
our get{addr,name}info() is considered thread-safe.
2005-04-29 14:37:51 +00:00
Hajimu UMEMOTO
0d389e7212
we cannot use inet_ntoa(3), here. so, use inet_ntop(3), instead.
2005-04-29 12:01:36 +00:00
Hajimu UMEMOTO
850bc9af6b
sync _map_v4v6_host*() with bind9's. it treats align better bit.
...
Obtained from: BIND9
2005-04-28 18:52:40 +00:00
Hajimu UMEMOTO
b8ab0f4506
we don't need mutex lock to call _gethostbynis*(), anymore.
2005-04-28 18:21:11 +00:00
Hajimu UMEMOTO
aa2f4ec72a
make gethostby*() thread-safe.
2005-04-28 18:03:43 +00:00
Hajimu UMEMOTO
7b671d902b
_gethostbynis{addr,name}() can handle an IPv6, now.
2005-04-28 17:44:44 +00:00
Hajimu UMEMOTO
a2a775011c
make getnetby*() thread-safe.
2005-04-28 15:32:55 +00:00
Hajimu UMEMOTO
bcb131aa3c
hide implementation specific internal functions from netdb.h.
...
it is needed to make get{host,net}by*() thread-safe.
2005-04-27 19:12:57 +00:00
Peter Wemm
3bbf3512ad
Provide stub functions for i386_set_ldt() and i386_get_ldt() even when
...
compiling as an amd64 support binary. They will return EINVAL on an amd64
kernel, but this simplifies other #ifdefs that were getting a bit nasty.
2005-04-26 20:51:15 +00:00
Peter Wemm
8fa4081fe3
No longer use _amd64_set_gsbase(). Use i386_set_gsbase() even when
...
building for amd64.
2005-04-26 20:46:11 +00:00
Hajimu UMEMOTO
b190ee6140
our get{proto,serv}by*() use a thread-specific data space.
2005-04-26 18:04:09 +00:00
Hajimu UMEMOTO
72572cc6ea
add IPv6 awareness for NIS query of gethostby*().
...
Inspired by: NetBSD
2005-04-26 14:55:47 +00:00
Hajimu UMEMOTO
a72b0131c9
ensure parsing numeric address before any host query.
...
Inspired by: NetBSD
2005-04-25 17:36:28 +00:00
Hajimu UMEMOTO
4801b1f131
remove unused variable.
2005-04-25 14:52:13 +00:00
Xin LI
b49627d7a7
Remove unused file.
...
Confirmed by: tjr [1]
[1] PERFORCE CHANGESET 57044:
http://perforce.freebsd.org/changeView.cgi?CH=57044
2005-04-25 02:29:03 +00:00
Hajimu UMEMOTO
71d0cbb671
if last line didn't have trailing space, network address was also
...
treated as an alias.
2005-04-24 18:22:39 +00:00
Alan Cox
97cd6892ba
Optimize the instruction alignment.
2005-04-23 18:45:36 +00:00
Alan Cox
c0862430d5
Eliminate an unpredictable branch from bcmp().
...
Reviewed by: bde
2005-04-21 23:07:20 +00:00
Alexander Kabaev
f2da7e0e49
Do not try to store 64 bits into 32 bit errno variable. With the changed libc
...
data layout, this was corrupting _PathLocale variable leading to programs
dumping core in non-default locales.
2005-04-21 12:47:08 +00:00
Hajimu UMEMOTO
92b6f7be5a
- add getproto{byname,bynumber,ent}_r for internal use within libc.
...
- make getproto{byname,bynumber,ent} thread-safe.
2005-04-19 14:41:13 +00:00
Hajimu UMEMOTO
d7d66e8c85
- nuke deprecated and unused getnodeby(3).
...
- remove unused variable.
Obtained from: KAME
2005-04-19 12:28:17 +00:00
Hajimu UMEMOTO
a87b3988c9
rename the NIS related fields to have yp_ prefix.
...
Suggested by: delphij
2005-04-18 18:34:58 +00:00
Xin LI
ffe49790ef
Do not check whether a pointer is NULL, since free(3) already takes care of
...
this case.
Reviewed by: ume
2005-04-18 03:45:23 +00:00
David Schultz
fe769cdd95
Add a sysctl that returns the full path of a process' text file.
...
This information is needed by things like `gdb -p' and Sun's javac,
and previously it could only be obtained via procfs
2005-04-18 02:10:37 +00:00
Xin LI
6d44c5c74b
Fix build for !YP case.
...
BTW. Shall we change these fields to have yp_ prefix? That will make the
code easier to read.
2005-04-17 15:10:30 +00:00
Hajimu UMEMOTO
109e5709c0
libc-internal interfaces should have two underscores in front
...
of their names.
Pointed out by: das
2005-04-17 14:42:52 +00:00
Xin LI
5c83bb4912
Wrong working directory, sorry. The previous patch was what I have
...
seen in NetBSD's tree, and this one is what I have submitted for review.
Pointy hat to: me
2005-04-17 04:00:55 +00:00
Xin LI
f5d25e4900
Remove a check about whether sa->sa_len is equal to salen from
...
getnameinfo(3). POSIX standard does not require a sa_len field
in sockaddr struct, hence such requirement will cause problem
for portability.
PR: standards/80008
Requested by: Xin Liu <lx@knight.6test.edu.cn>
Reviewed by: freebsd-standards (das)
MFC After: 2 weeks
2005-04-17 03:56:07 +00:00
David Schultz
1be5319a76
Be bug-for-bug compatible with the C standard with respect to
...
printf("%#.0o", 0). Cite an amusing passage from a defect report.
2005-04-16 22:36:51 +00:00
Hajimu UMEMOTO
62e8b17d72
Now, our getservbyname(3) is thread-safe. So, we don't need
...
to protect it with mutex lock.
2005-04-15 18:15:12 +00:00
Hajimu UMEMOTO
96f79dca76
- add getserv{byname,byport,ent}_r for internal use within libc.
...
- make getserv{byname,byport,ent} thread-safe.
Reviewed by: gnn
2005-04-15 18:09:39 +00:00
Hajimu UMEMOTO
159d2a98c5
hostalias() is not thread-safe. So, introduce _res_hostalias()
...
and use it.
Obtained from: BIND9
2005-04-15 14:42:29 +00:00
Hajimu UMEMOTO
f35528f852
remove needless res_init() call.
...
Inspired by: NetBSD
2005-04-14 11:44:43 +00:00
Peter Wemm
4453c6dc67
Attempt i386_set_gsbase() before using the user_ldt code. Unimplemented
...
sysarch() calls return EINVAL, not SIGSYS.. so we can trivially adapt.
2005-04-14 00:02:37 +00:00
Peter Wemm
53193c146a
Add stubs for the %fs/%gs base management calls.
2005-04-14 00:01:35 +00:00
Alan Cox
7e266fcd1f
Add a machine-specific, optimized implementation of strcat.
...
PR: 73111
Submitted by: Ville-Pertti Keinonen <will@iki.fi> (taken from NetBSD)
MFC after: 3 weeks
2005-04-10 18:58:49 +00:00