mirror of git://sourceware.org/git/glibc.git
Fri May 24 02:31:36 1996 Ulrich Drepper <drepper@cygnus.com>
* sysdeps/unix/sysv/linux/speed.c: Add new speed value 460800. Thu May 23 23:09:33 1996 Ulrich Drepper <drepper@cygnus.com> * FAQ: Add answer for 100% source code compatibility to Linux libc by David Mosberger-Tang. Update from bind-4.3.4-T3B. * inet/arpa/inet.h: Add prototypes for inet_pton, inet_ntop, inet_nsap_addr, and inet_nsap_ntoa. * resolv/gethnamaddr.c: Correct compatibility problems (sprintf), remove fourth argument to inet_pton and correct handling of host_addr passing. * resolv/inet_ntop.c: Correct compatibility problems (sprintf). * resolv/inet_pton.c: Remove fourth argument. * resolv/resolv.h: Remove prototypes for inet_nsap_addr and inet_nsap_ntoa. Now on <arpa/inet.h>. * stdlib/gmp-impl.h: Add prototypes for internal functions. Thu May 23 22:49:15 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu> * Rules (subdir_install): Remove dep on sor-$(subdir). (static-only-routines): Removed variable and associated rules. * sysdeps/unix/sysv/linux/alpha/Makefile (headers): Add sysdeps/alpha/bsd-_setjmp.S, sysdeps/alpha/ffs.S, sysdeps/unix/sysv/linux/alpha/sigsuspend.S, sysdeps/unix/sysv/linux/alpha/start.S,
This commit is contained in:
parent
510ca033d6
commit
613a76ff52
34
ChangeLog
34
ChangeLog
|
@ -1,3 +1,30 @@
|
||||||
|
Fri May 24 02:31:36 1996 Ulrich Drepper <drepper@cygnus.com>
|
||||||
|
|
||||||
|
* sysdeps/unix/sysv/linux/speed.c: Add new speed value 460800.
|
||||||
|
|
||||||
|
Thu May 23 23:09:33 1996 Ulrich Drepper <drepper@cygnus.com>
|
||||||
|
|
||||||
|
* FAQ: Add answer for 100% source code compatibility to Linux
|
||||||
|
libc by David Mosberger-Tang.
|
||||||
|
|
||||||
|
Update from bind-4.3.4-T3B.
|
||||||
|
* inet/arpa/inet.h: Add prototypes for inet_pton, inet_ntop,
|
||||||
|
inet_nsap_addr, and inet_nsap_ntoa.
|
||||||
|
* resolv/gethnamaddr.c: Correct compatibility problems (sprintf),
|
||||||
|
remove fourth argument to inet_pton and correct handling of
|
||||||
|
host_addr passing.
|
||||||
|
* resolv/inet_ntop.c: Correct compatibility problems (sprintf).
|
||||||
|
* resolv/inet_pton.c: Remove fourth argument.
|
||||||
|
* resolv/resolv.h: Remove prototypes for inet_nsap_addr and
|
||||||
|
inet_nsap_ntoa. Now on <arpa/inet.h>.
|
||||||
|
|
||||||
|
* stdlib/gmp-impl.h: Add prototypes for internal functions.
|
||||||
|
|
||||||
|
Thu May 23 22:49:15 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
|
||||||
|
|
||||||
|
* Rules (subdir_install): Remove dep on sor-$(subdir).
|
||||||
|
(static-only-routines): Removed variable and associated rules.
|
||||||
|
|
||||||
Wed May 22 00:40:50 1996 David Mosberger-Tang <davidm@azstarnet.com>
|
Wed May 22 00:40:50 1996 David Mosberger-Tang <davidm@azstarnet.com>
|
||||||
|
|
||||||
* sysdeps/unix/sysv/linux/alpha/speed.c (speeds): Add entry for
|
* sysdeps/unix/sysv/linux/alpha/speed.c (speeds): Add entry for
|
||||||
|
@ -5,7 +32,7 @@ Wed May 22 00:40:50 1996 David Mosberger-Tang <davidm@azstarnet.com>
|
||||||
|
|
||||||
* sysdeps/unix/sysv/linux/alpha/statbuf.h: New file.
|
* sysdeps/unix/sysv/linux/alpha/statbuf.h: New file.
|
||||||
|
|
||||||
* sysdeps/unix/sysv/linux/Makefile (headers): Add
|
* sysdeps/unix/sysv/linux/alpha/Makefile (headers): Add
|
||||||
alpha/ptrace.h.
|
alpha/ptrace.h.
|
||||||
* sysdeps/unix/sysv/linux/alpha/alpha/ptrace.h: New file.
|
* sysdeps/unix/sysv/linux/alpha/alpha/ptrace.h: New file.
|
||||||
|
|
||||||
|
@ -32,15 +59,16 @@ Wed May 22 00:40:50 1996 David Mosberger-Tang <davidm@azstarnet.com>
|
||||||
to simplify declaration of leaf functions.
|
to simplify declaration of leaf functions.
|
||||||
|
|
||||||
* sysdeps/alpha/_mcount.S, sysdeps/alpha/bb_init_func.S,
|
* sysdeps/alpha/_mcount.S, sysdeps/alpha/bb_init_func.S,
|
||||||
sysdeps/alpha/bsd-setjmp.S, sysdeps/alpha/ffs.S,
|
sysdeps/alpha/bsd-_setjmp.S, sysdeps/alpha/ffs.S,
|
||||||
sysdeps/alpha/htonl.S, sysdeps/alpha/htons.S, sysdeps/alpha/memchr.S,
|
sysdeps/alpha/htonl.S, sysdeps/alpha/htons.S, sysdeps/alpha/memchr.S,
|
||||||
sysdeps/alpha/setjmp.S, sysdeps/alpha/strlen.S,
|
sysdeps/alpha/setjmp.S, sysdeps/alpha/strlen.S,
|
||||||
sysdeps/alpha/udiv_qrnnd.S, sysdeps/unix/sysv/linux/alpha/brk.S,
|
sysdeps/alpha/udiv_qrnnd.S, sysdeps/unix/sysv/linux/alpha/brk.S,
|
||||||
sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S,
|
sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S,
|
||||||
sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S,
|
sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S,
|
||||||
sysdeps/unix/sysv/linux/alpha/pipe.S,
|
sysdeps/unix/sysv/linux/alpha/pipe.S,
|
||||||
sysdeps/unix/sysv/linux/sigsuspend.S,
|
sysdeps/unix/sysv/linux/alpha/sigsuspend.S,
|
||||||
sysdeps/unix/sysv/linux/alpha/syscall.S,
|
sysdeps/unix/sysv/linux/alpha/syscall.S,
|
||||||
|
sysdeps/unix/sysv/linux/alpha/start.S,
|
||||||
sysdeps/unix/sysv/linux/alpha/sysdep.S: Remove include of regdef.h.
|
sysdeps/unix/sysv/linux/alpha/sysdep.S: Remove include of regdef.h.
|
||||||
sysdep.h includes it now. Replace ENTRY by LEAF with appropriate
|
sysdep.h includes it now. Replace ENTRY by LEAF with appropriate
|
||||||
framesize declaration. Replace "lda pv,sym/jsr pv" by "jsr sym".
|
framesize declaration. Replace "lda pv,sym/jsr pv" by "jsr sym".
|
||||||
|
|
78
FAQ
78
FAQ
|
@ -19,6 +19,28 @@ this document let me know.
|
||||||
~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
|
~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
|
||||||
[Q1] ``What systems the GNU C Library runs on?''
|
[Q1] ``What systems the GNU C Library runs on?''
|
||||||
|
|
||||||
|
[Q2] ``What compiler do I need to translate GNU libc?''
|
||||||
|
|
||||||
|
[Q3] ``When starting make I get only errors messages.
|
||||||
|
What's wrong?''
|
||||||
|
|
||||||
|
[Q4] ``After I changed configure.in I get `Autoconf version X.Y.
|
||||||
|
or higher is required for this script'. What can I do?''
|
||||||
|
|
||||||
|
[Q5] ``Do I need a special linker or archiver?''
|
||||||
|
|
||||||
|
[Q6] ``Do I need some more things to compile GNU C Library?''
|
||||||
|
|
||||||
|
[Q7] ``When I run `nm libc.so|grep " U "' on the produced library
|
||||||
|
I still find unresolved symbols? Can this be ok?''
|
||||||
|
|
||||||
|
[Q8] ``I expect GNU libc to be 100% source code compatible with
|
||||||
|
the old Linux based GNU libc. Why isn't it like this?''
|
||||||
|
|
||||||
|
|
||||||
|
~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
|
||||||
|
[Q1] ``What systems the GNU C Library runs on?''
|
||||||
|
|
||||||
[A1] {UD} This is difficult to answer. The file `README' lists the
|
[A1] {UD} This is difficult to answer. The file `README' lists the
|
||||||
architectures GNU libc is known to run *at some time*. This does not
|
architectures GNU libc is known to run *at some time*. This does not
|
||||||
mean that it still can be compiled and run on them in the moment.
|
mean that it still can be compiled and run on them in the moment.
|
||||||
|
@ -128,11 +150,67 @@ errors while linking.
|
||||||
|
|
||||||
|
|
||||||
~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
|
~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
|
||||||
|
[Q8] ``I expect GNU libc to be 100% source code compatible with
|
||||||
|
the old Linux based GNU libc. Why isn't it like this?''
|
||||||
|
|
||||||
|
[A8] {DMT} Not every extension in Linux libc's history was well
|
||||||
|
thought. In fact it had a lot of problems with standard compliance
|
||||||
|
and cleanliness. With the introduction of a new version number these
|
||||||
|
errors now can be corrected. The following list shows a list of the
|
||||||
|
know source code incompatibilities.
|
||||||
|
|
||||||
|
* _GNU_SOURCE: glibc does not automatically define _GNU_SOURCE. Thus,
|
||||||
|
if a program depends on GNU extensions, it is necessary
|
||||||
|
to compile it with C compiler option -D_GNU_SOURCE. This difference
|
||||||
|
normally mainfests itself in the form of missing prototypes and/or
|
||||||
|
data type definitions. Thus, if you get such errors, the first thing you
|
||||||
|
should do is grep the header files in /usr/include and /usr/include/sys
|
||||||
|
to check whether the functions are really missing or whether it is
|
||||||
|
just necessary to add a define of _GNU_SOURCE. Similar comments apply
|
||||||
|
to _BSD_SOURCE, _POSIX_SOURCE, _SVID_SOURCE etc (see
|
||||||
|
/usr/include/features.h).
|
||||||
|
|
||||||
|
* reboot(): GNU libc sanitizes the interface of reboot() to be more
|
||||||
|
compatible with the interface used on other OSes. In particular,
|
||||||
|
reboot() as implemented in glibc takes just one argument. This argument
|
||||||
|
corresponds to the third argument of the Linux reboot system call.
|
||||||
|
That is, a call of the form reboot(a, b, c) needs to be changed into
|
||||||
|
reboot(c).
|
||||||
|
|
||||||
|
* errno: If a program uses variable "errno", then it _must_ include header
|
||||||
|
file <errno.h>. The old libc often (erroneously) declared this variable
|
||||||
|
implicitly as a side-effect of including other libc header files. glibc
|
||||||
|
is careful to avoid such namespace pollution, which, in turn, means that
|
||||||
|
you really need to include the header files that you depend on. This
|
||||||
|
difference normally manifests itself in the form of the compiler
|
||||||
|
complaining about the references of the undeclared symbol "errno".
|
||||||
|
|
||||||
|
* Linux-specific syscalls: All Linux system calls now have appropriate
|
||||||
|
library wrappers and corresponding declarations in various header files.
|
||||||
|
This is because the syscall() macro that was traditionally used to
|
||||||
|
work around missing syscall wrappers are inherently non-portable and
|
||||||
|
error-prone. The following tables lists all the new syscall stubs,
|
||||||
|
the header-file declaring their interface and the system call name.
|
||||||
|
|
||||||
|
syscall name: wrapper name: declaring header file:
|
||||||
|
------------- ------------- ----------------------
|
||||||
|
bdflush bdflush <unistd.h>
|
||||||
|
create_module create_module <sys/module.h>
|
||||||
|
delete_module delete_module <sys/module.h>
|
||||||
|
get_kernel_syms get_kernel_syms <sys/module.h>
|
||||||
|
init_module init_module <sys/module.h>
|
||||||
|
syslog ksyslog_ctl <unistd.h>
|
||||||
|
|
||||||
|
To get the Linux-specific declarations in <unistd.h>, you'll need
|
||||||
|
to define C pre-processor macro _LINUX_SOURCE during compilation.
|
||||||
|
|
||||||
|
|
||||||
|
~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
|
||||||
|
|
||||||
|
|
||||||
Answers were given by:
|
Answers were given by:
|
||||||
{UD} Ulrich Drepper, <drepper@cygnus.com>
|
{UD} Ulrich Drepper, <drepper@cygnus.com>
|
||||||
|
{DMT} David Mosberger-Tang, <davidm@AZStarNet.com>
|
||||||
|
|
||||||
|
|
||||||
Local Variables:
|
Local Variables:
|
||||||
|
|
28
Rules
28
Rules
|
@ -126,33 +126,7 @@ subdir_echo-distinfo:
|
||||||
# our portions of the library because the parent make will install it later
|
# our portions of the library because the parent make will install it later
|
||||||
# (likewise the stubs file).
|
# (likewise the stubs file).
|
||||||
.PHONY: subdir_install
|
.PHONY: subdir_install
|
||||||
subdir_install: install-no-libc.a lib-noranlib stubs \
|
subdir_install: install-no-libc.a lib-noranlib stubs
|
||||||
$(common-objpfx)sor-$(subdir)
|
|
||||||
|
|
||||||
ifdef objpfx
|
|
||||||
sor-objpfx = $(objpfx:../%=%)
|
|
||||||
else
|
|
||||||
sor-objpfx = $(subdir)
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifndef libc.so-version
|
|
||||||
# Undefine this because it can't work when we libc.so is unversioned.
|
|
||||||
static-only-routines =
|
|
||||||
endif
|
|
||||||
|
|
||||||
# This communicates to the parent during install the set of routines that
|
|
||||||
# need to be put into the special libc.so archive.
|
|
||||||
$(common-objpfx)sor-$(subdir): Makefile
|
|
||||||
echo $(static-only-routines:%=$(sor-objpfx)%.o) > $@T
|
|
||||||
mv -f $@T $@
|
|
||||||
|
|
||||||
ifdef static-only-routines
|
|
||||||
# These routines are to be omitted from the shared library object,
|
|
||||||
# so we replace the PIC objects for them with the empty object file.
|
|
||||||
$(static-only-routines:%=$(objpfx)%.so): %.so: $(objpfx)empty.o
|
|
||||||
rm -f $@
|
|
||||||
ln $< $@
|
|
||||||
endif
|
|
||||||
|
|
||||||
.PHONY: subdir_TAGS subdir_dist
|
.PHONY: subdir_TAGS subdir_dist
|
||||||
subdir_TAGS: TAGS
|
subdir_TAGS: TAGS
|
||||||
|
|
|
@ -49,6 +49,10 @@ struct in_addr inet_makeaddr __P((u_int32_t , u_int32_t));
|
||||||
u_int32_t inet_netof __P((struct in_addr));
|
u_int32_t inet_netof __P((struct in_addr));
|
||||||
u_int32_t inet_network __P((const char *));
|
u_int32_t inet_network __P((const char *));
|
||||||
char *inet_ntoa __P((struct in_addr));
|
char *inet_ntoa __P((struct in_addr));
|
||||||
|
int inet_pton __P((int af, const char *src, void *dst));
|
||||||
|
const char *inet_ntop __P((int af, const void *src, char *dst, size_t s));
|
||||||
|
u_int inet_nsap_addr __P((const char *, u_char *, int maxlen));
|
||||||
|
char *inet_nsap_ntoa __P((int, const u_char *, char *ascii));
|
||||||
__END_DECLS
|
__END_DECLS
|
||||||
|
|
||||||
#endif /* !_INET_H_ */
|
#endif /* !_INET_H_ */
|
||||||
|
|
|
@ -88,6 +88,12 @@ static char rcsid[] = "$Id$";
|
||||||
# include <../conf/options.h>
|
# include <../conf/options.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef SPRINTF_CHAR
|
||||||
|
# define SPRINTF(x) strlen(sprintf/**/x)
|
||||||
|
#else
|
||||||
|
# define SPRINTF(x) sprintf x
|
||||||
|
#endif
|
||||||
|
|
||||||
#define MAXALIASES 35
|
#define MAXALIASES 35
|
||||||
#define MAXADDRS 35
|
#define MAXADDRS 35
|
||||||
#define MAXADDRBUFSIZE 8192
|
#define MAXADDRBUFSIZE 8192
|
||||||
|
@ -475,8 +481,7 @@ gethostbyname2(name, af)
|
||||||
* Fake up a hostent as if we'd actually
|
* Fake up a hostent as if we'd actually
|
||||||
* done a lookup.
|
* done a lookup.
|
||||||
*/
|
*/
|
||||||
if (inet_pton(af, name, host_addr,
|
if (inet_pton(af, name, host_addr) <= 0) {
|
||||||
sizeof host_addr) <= 0) {
|
|
||||||
h_errno = HOST_NOT_FOUND;
|
h_errno = HOST_NOT_FOUND;
|
||||||
return (NULL);
|
return (NULL);
|
||||||
}
|
}
|
||||||
|
@ -487,7 +492,7 @@ gethostbyname2(name, af)
|
||||||
host.h_name = hostbuf;
|
host.h_name = hostbuf;
|
||||||
host.h_aliases = host_aliases;
|
host.h_aliases = host_aliases;
|
||||||
host_aliases[0] = NULL;
|
host_aliases[0] = NULL;
|
||||||
h_addr_ptrs[0] = (char *)&host_addr;
|
h_addr_ptrs[0] = (char *)host_addr;
|
||||||
h_addr_ptrs[1] = NULL;
|
h_addr_ptrs[1] = NULL;
|
||||||
host.h_addr_list = h_addr_ptrs;
|
host.h_addr_list = h_addr_ptrs;
|
||||||
if (_res.options & RES_USE_INET6)
|
if (_res.options & RES_USE_INET6)
|
||||||
|
@ -617,9 +622,9 @@ gethostbyaddr(addr, len, af)
|
||||||
case AF_INET6:
|
case AF_INET6:
|
||||||
qp = qbuf;
|
qp = qbuf;
|
||||||
for (n = IN6ADDRSZ - 1; n >= 0; n--) {
|
for (n = IN6ADDRSZ - 1; n >= 0; n--) {
|
||||||
qp += sprintf(qp, "%x.%x.",
|
qp += SPRINTF((qp, "%x.%x.",
|
||||||
uaddr[n] & 0xf,
|
uaddr[n] & 0xf,
|
||||||
(uaddr[n] >> 4) & 0xf);
|
(uaddr[n] >> 4) & 0xf));
|
||||||
}
|
}
|
||||||
strcpy(qp, "ip6.int");
|
strcpy(qp, "ip6.int");
|
||||||
break;
|
break;
|
||||||
|
@ -770,12 +775,12 @@ _gethtent()
|
||||||
goto again;
|
goto again;
|
||||||
*cp++ = '\0';
|
*cp++ = '\0';
|
||||||
if ((_res.options & RES_USE_INET6) &&
|
if ((_res.options & RES_USE_INET6) &&
|
||||||
inet_pton(AF_INET6, p, host_addr, sizeof host_addr) > 0) {
|
inet_pton(AF_INET6, p, host_addr) > 0) {
|
||||||
af = AF_INET6;
|
af = AF_INET6;
|
||||||
len = IN6ADDRSZ;
|
len = IN6ADDRSZ;
|
||||||
} else if (inet_pton(AF_INET, p, host_addr, sizeof host_addr) > 0) {
|
} else if (inet_pton(AF_INET, p, host_addr) > 0) {
|
||||||
if (_res.options & RES_USE_INET6) {
|
if (_res.options & RES_USE_INET6) {
|
||||||
map_v4v6_address((char*)&host_addr, (char*)&host_addr);
|
map_v4v6_address((char*)host_addr, (char*)host_addr);
|
||||||
af = AF_INET6;
|
af = AF_INET6;
|
||||||
len = IN6ADDRSZ;
|
len = IN6ADDRSZ;
|
||||||
} else {
|
} else {
|
||||||
|
@ -785,7 +790,7 @@ _gethtent()
|
||||||
} else {
|
} else {
|
||||||
goto again;
|
goto again;
|
||||||
}
|
}
|
||||||
h_addr_ptrs[0] = (char *)&host_addr;
|
h_addr_ptrs[0] = (char *)host_addr;
|
||||||
h_addr_ptrs[1] = NULL;
|
h_addr_ptrs[1] = NULL;
|
||||||
host.h_addr_list = h_addr_ptrs;
|
host.h_addr_list = h_addr_ptrs;
|
||||||
host.h_length = len;
|
host.h_length = len;
|
||||||
|
@ -859,7 +864,7 @@ struct hostent *
|
||||||
_gethtbyname(name)
|
_gethtbyname(name)
|
||||||
const char *name;
|
const char *name;
|
||||||
{
|
{
|
||||||
extern struct hostent *_gethtbyname2 __P((const char *, int));
|
extern struct hostent *_gethtbyname2();
|
||||||
struct hostent *hp;
|
struct hostent *hp;
|
||||||
|
|
||||||
if (_res.options & RES_USE_INET6) {
|
if (_res.options & RES_USE_INET6) {
|
||||||
|
|
|
@ -29,6 +29,12 @@ static char rcsid[] = "$Id$";
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include "../conf/portability.h"
|
#include "../conf/portability.h"
|
||||||
|
|
||||||
|
#ifdef SPRINTF_CHAR
|
||||||
|
# define SPRINTF(x) strlen(sprintf/**/x)
|
||||||
|
#else
|
||||||
|
# define SPRINTF(x) sprintf x
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* WARNING: Don't even consider trying to compile this on a system where
|
* WARNING: Don't even consider trying to compile this on a system where
|
||||||
* sizeof(int) < 4. sizeof(int) > 4 is fine; all the world's not a VAX.
|
* sizeof(int) < 4. sizeof(int) > 4 is fine; all the world's not a VAX.
|
||||||
|
@ -84,7 +90,7 @@ inet_ntop4(src, dst, size)
|
||||||
static const char fmt[] = "%u.%u.%u.%u";
|
static const char fmt[] = "%u.%u.%u.%u";
|
||||||
char tmp[sizeof "255.255.255.255"];
|
char tmp[sizeof "255.255.255.255"];
|
||||||
|
|
||||||
if (sprintf(tmp, fmt, src[0], src[1], src[2], src[3]) > size) {
|
if (SPRINTF((tmp, fmt, src[0], src[1], src[2], src[3])) > size) {
|
||||||
errno = ENOSPC;
|
errno = ENOSPC;
|
||||||
return (NULL);
|
return (NULL);
|
||||||
}
|
}
|
||||||
|
@ -170,7 +176,7 @@ inet_ntop6(src, dst, size)
|
||||||
tp += strlen(tp);
|
tp += strlen(tp);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
tp += sprintf(tp, "%x", words[i]);
|
tp += SPRINTF((tp, "%x", words[i]));
|
||||||
}
|
}
|
||||||
/* Was it a trailing run of 0x00's? */
|
/* Was it a trailing run of 0x00's? */
|
||||||
if (best.base != -1 && (best.base + best.len) == (IN6ADDRSZ / INT16SZ))
|
if (best.base != -1 && (best.base + best.len) == (IN6ADDRSZ / INT16SZ))
|
||||||
|
|
|
@ -37,7 +37,7 @@ static int inet_pton4 __P((const char *src, u_char *dst));
|
||||||
static int inet_pton6 __P((const char *src, u_char *dst));
|
static int inet_pton6 __P((const char *src, u_char *dst));
|
||||||
|
|
||||||
/* int
|
/* int
|
||||||
* inet_pton(af, src, dst, size)
|
* inet_pton(af, src, dst)
|
||||||
* convert from presentation format (which usually means ASCII printable)
|
* convert from presentation format (which usually means ASCII printable)
|
||||||
* to network format (which is usually some kind of binary format).
|
* to network format (which is usually some kind of binary format).
|
||||||
* return:
|
* return:
|
||||||
|
@ -48,24 +48,15 @@ static int inet_pton6 __P((const char *src, u_char *dst));
|
||||||
* Paul Vixie, 1996.
|
* Paul Vixie, 1996.
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
inet_pton(af, src, dst, size)
|
inet_pton(af, src, dst)
|
||||||
int af;
|
int af;
|
||||||
const char *src;
|
const char *src;
|
||||||
void *dst;
|
void *dst;
|
||||||
size_t size;
|
|
||||||
{
|
{
|
||||||
switch (af) {
|
switch (af) {
|
||||||
case AF_INET:
|
case AF_INET:
|
||||||
if (size < INADDRSZ) {
|
|
||||||
errno = ENOSPC;
|
|
||||||
return (-1);
|
|
||||||
}
|
|
||||||
return (inet_pton4(src, dst));
|
return (inet_pton4(src, dst));
|
||||||
case AF_INET6:
|
case AF_INET6:
|
||||||
if (size < IN6ADDRSZ) {
|
|
||||||
errno = ENOSPC;
|
|
||||||
return (-1);
|
|
||||||
}
|
|
||||||
return (inet_pton6(src, dst));
|
return (inet_pton6(src, dst));
|
||||||
default:
|
default:
|
||||||
errno = EINVAL;
|
errno = EINVAL;
|
||||||
|
@ -207,12 +198,12 @@ inet_pton6(src, dst)
|
||||||
* Since some memmove()'s erroneously fail to handle
|
* Since some memmove()'s erroneously fail to handle
|
||||||
* overlapping regions, we'll do the shift by hand.
|
* overlapping regions, we'll do the shift by hand.
|
||||||
*/
|
*/
|
||||||
const howmany = tp - colonp;
|
const int n = tp - colonp;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
for (i = 1; i <= howmany; i++) {
|
for (i = 1; i <= n; i++) {
|
||||||
endp[- i] = colonp[howmany - i];
|
endp[- i] = colonp[n - i];
|
||||||
colonp[howmany - i] = 0;
|
colonp[n - i] = 0;
|
||||||
}
|
}
|
||||||
tp = endp;
|
tp = endp;
|
||||||
}
|
}
|
||||||
|
|
|
@ -245,9 +245,6 @@ int res_nameinquery __P((const char *, int, int,
|
||||||
const u_char *, const u_char *));
|
const u_char *, const u_char *));
|
||||||
int res_queriesmatch __P((const u_char *, const u_char *,
|
int res_queriesmatch __P((const u_char *, const u_char *,
|
||||||
const u_char *, const u_char *));
|
const u_char *, const u_char *));
|
||||||
/* XXX - these last two don't belong in the resolver */
|
|
||||||
u_int inet_nsap_addr __P((const char *, u_char *, int maxlen));
|
|
||||||
char *inet_nsap_ntoa __P((int, const u_char *, char *ascii));
|
|
||||||
__END_DECLS
|
__END_DECLS
|
||||||
|
|
||||||
#endif /* !_RESOLV_H_ */
|
#endif /* !_RESOLV_H_ */
|
||||||
|
|
|
@ -299,6 +299,26 @@ typedef unsigned int UHWtype;
|
||||||
#define impn_sqr_n_basecase __MPN(impn_sqr_n_basecase)
|
#define impn_sqr_n_basecase __MPN(impn_sqr_n_basecase)
|
||||||
#define impn_sqr_n __MPN(impn_sqr_n)
|
#define impn_sqr_n __MPN(impn_sqr_n)
|
||||||
|
|
||||||
|
#ifndef _PROTO
|
||||||
|
#if defined (__STDC__) || defined (__cplusplus)
|
||||||
|
#define _PROTO(x) x
|
||||||
|
#else
|
||||||
|
#define _PROTO(x) ()
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Prototypes for internal mpn calls. */
|
||||||
|
extern void impn_mul_n_basecase _PROTO ((mp_ptr prodp, mp_srcptr up,
|
||||||
|
mp_srcptr vp, mp_size_t size));
|
||||||
|
extern void impn_mul_n _PROTO ((mp_ptr prodp, mp_srcptr up, mp_srcptr vp,
|
||||||
|
mp_size_t size, mp_ptr tspace));
|
||||||
|
extern void impn_sqr_n_basecase _PROTO ((mp_ptr prodp, mp_srcptr up,
|
||||||
|
mp_size_t size));
|
||||||
|
extern void impn_sqr_n _PROTO ((mp_ptr prodp, mp_srcptr up, mp_size_t size,
|
||||||
|
mp_ptr tspace));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#ifndef IEEE_DOUBLE_BIG_ENDIAN
|
#ifndef IEEE_DOUBLE_BIG_ENDIAN
|
||||||
#define IEEE_DOUBLE_BIG_ENDIAN 1
|
#define IEEE_DOUBLE_BIG_ENDIAN 1
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -23,8 +23,8 @@ Cambridge, MA 02139, USA. */
|
||||||
|
|
||||||
#include <sysdep.h>
|
#include <sysdep.h>
|
||||||
|
|
||||||
ENTRY (setjmp)
|
ENTRY(setjmp)
|
||||||
lda $27, __sigsetjmp /* Load address to jump to. */
|
lda $27, __sigsetjmp /* Load address to jump to. */
|
||||||
bis $31, $31, $17 /* Pass a second argument of zero. */
|
bis $31, $31, $17 /* Pass a second argument of zero. */
|
||||||
jmp $31, ($27), __sigsetjmp /* Call __sigsetjmp. */
|
jmp $31, ($27), __sigsetjmp /* Call __sigsetjmp. */
|
||||||
.end setjmp
|
.end setjmp
|
||||||
|
|
|
@ -49,4 +49,3 @@ struct utmp {
|
||||||
__END_DECLS
|
__END_DECLS
|
||||||
|
|
||||||
#endif /* utmpbits.h */
|
#endif /* utmpbits.h */
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
ifeq ($(subdir), misc)
|
ifeq ($(subdir), misc)
|
||||||
headers += alpha/regdef.h
|
headers += alpha/ptrace.h alpha/regdef.h
|
||||||
|
|
||||||
sysdep_routines := $(sysdep_routines) \
|
sysdep_routines := $(sysdep_routines) \
|
||||||
ieee_get_fp_control ieee_set_fp_control fpu_control setfpucw \
|
ieee_get_fp_control ieee_set_fp_control fpu_control setfpucw \
|
||||||
|
|
|
@ -17,12 +17,13 @@ not, write to the Free Software Foundation, Inc., 675 Mass Ave,
|
||||||
Cambridge, MA 02139, USA. */
|
Cambridge, MA 02139, USA. */
|
||||||
|
|
||||||
/* sigsuspend is a special syscall since it needs to dereference the
|
/* sigsuspend is a special syscall since it needs to dereference the
|
||||||
sigset. */
|
sigset. */
|
||||||
|
|
||||||
#include <sysdep.h>
|
#include <sysdep.h>
|
||||||
|
|
||||||
.text
|
.text
|
||||||
ENTRY(sigsuspend)
|
|
||||||
|
LEAF(sigsuspend, 0)
|
||||||
.prologue 0
|
.prologue 0
|
||||||
|
|
||||||
ldq a0, 0(a0)
|
ldq a0, 0(a0)
|
||||||
|
@ -33,7 +34,6 @@ ENTRY(sigsuspend)
|
||||||
|
|
||||||
error: br gp, 1f
|
error: br gp, 1f
|
||||||
1: ldgp gp, 0(gp)
|
1: ldgp gp, 0(gp)
|
||||||
lda pv, syscall_error
|
jmp zero, syscall_error
|
||||||
jmp zero, (pv)
|
|
||||||
|
|
||||||
.end sigsuspend
|
.end sigsuspend
|
||||||
|
|
|
@ -18,11 +18,16 @@ Cambridge, MA 02139, USA. */
|
||||||
|
|
||||||
#include <sysdep.h>
|
#include <sysdep.h>
|
||||||
|
|
||||||
.comm errno, 4
|
.comm errno, 4
|
||||||
|
#ifdef __ELF__
|
||||||
|
.type errno, @object
|
||||||
|
#endif
|
||||||
|
|
||||||
.text
|
.text
|
||||||
ENTRY(__start)
|
LEAF(__start, 16)
|
||||||
lda sp, -16(sp)
|
lda sp, -16(sp)
|
||||||
|
.prologue 0
|
||||||
|
|
||||||
stq zero, 8(sp) /* terminate frame chain */
|
stq zero, 8(sp) /* terminate frame chain */
|
||||||
|
|
||||||
br t0, 1f
|
br t0, 1f
|
||||||
|
@ -33,8 +38,7 @@ ENTRY(__start)
|
||||||
ldgp gp, 0(ra)
|
ldgp gp, 0(ra)
|
||||||
|
|
||||||
/* clear out errno. */
|
/* clear out errno. */
|
||||||
lda t0, errno
|
stl zero, (errno)
|
||||||
stl zero, 0(t0)
|
|
||||||
|
|
||||||
ldl a0, 16(sp) /* get argc */
|
ldl a0, 16(sp) /* get argc */
|
||||||
lda a1, 24(sp) /* get argv */
|
lda a1, 24(sp) /* get argv */
|
||||||
|
@ -45,26 +49,32 @@ ENTRY(__start)
|
||||||
addq a2, 0x8, a2
|
addq a2, 0x8, a2
|
||||||
stq a2, 0(t0)
|
stq a2, 0(t0)
|
||||||
|
|
||||||
#ifndef HAVE_INITFINI
|
|
||||||
mov a0, s0
|
mov a0, s0
|
||||||
mov a1, s1
|
mov a1, s1
|
||||||
mov a2, s2
|
mov a2, s2
|
||||||
|
|
||||||
jsr ra, __libc_init
|
#ifdef HAVE_INITFINI
|
||||||
|
/* register the _fini sections to ensure destructors get run: */
|
||||||
|
lda a0, _fini
|
||||||
|
jsr ra, atexit
|
||||||
ldgp gp, 0(ra)
|
ldgp gp, 0(ra)
|
||||||
|
|
||||||
mov s0, a0
|
/* Now run the _init section of the program itself. The _init
|
||||||
mov s1, a1
|
sections of shared libraries will be run by the dynamic linker. */
|
||||||
mov s2, a2
|
jsr ra, _init
|
||||||
|
ldgp gp, 0(ra)
|
||||||
|
|
||||||
/* initialize constructors: */
|
/* initialize constructors: */
|
||||||
jsr ra, __main
|
jsr ra, __main
|
||||||
ldgp gp, 0(ra)
|
ldgp gp, 0(ra)
|
||||||
|
#else
|
||||||
|
jsr ra, __libc_init
|
||||||
|
ldgp gp, 0(ra)
|
||||||
|
#endif
|
||||||
|
|
||||||
mov s0, a0
|
mov s0, a0
|
||||||
mov s1, a1
|
mov s1, a1
|
||||||
mov s2, a2
|
mov s2, a2
|
||||||
#endif
|
|
||||||
|
|
||||||
jsr ra, main
|
jsr ra, main
|
||||||
ldgp gp, 0(ra)
|
ldgp gp, 0(ra)
|
||||||
|
@ -90,4 +100,9 @@ ENTRY(__start)
|
||||||
__data_start:
|
__data_start:
|
||||||
.long 0
|
.long 0
|
||||||
|
|
||||||
|
#ifdef __ELF__
|
||||||
|
.size __data_start, 4
|
||||||
|
.type __data_start, @object
|
||||||
|
#endif
|
||||||
|
|
||||||
weak_alias(__data_start, data_start)
|
weak_alias(__data_start, data_start)
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* `struct termios' speed frobnication functions. Linux version.
|
/* `struct termios' speed frobnication functions. Linux version.
|
||||||
Copyright (C) 1991, 1992, 1993, 1995 Free Software Foundation, Inc.
|
Copyright (C) 1991, 1992, 1993, 1995, 1996 Free Software Foundation, Inc.
|
||||||
This file is part of the GNU C Library.
|
This file is part of the GNU C Library.
|
||||||
|
|
||||||
The GNU C Library is free software; you can redistribute it and/or
|
The GNU C Library is free software; you can redistribute it and/or
|
||||||
|
@ -43,6 +43,7 @@ static const speed_t speeds[] =
|
||||||
57600,
|
57600,
|
||||||
115200,
|
115200,
|
||||||
230400,
|
230400,
|
||||||
|
460800,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -68,7 +69,7 @@ strong_alias (cfgetospeed, cfgetispeed);
|
||||||
|
|
||||||
/* Set the output baud rate stored in *TERMIOS_P to SPEED. */
|
/* Set the output baud rate stored in *TERMIOS_P to SPEED. */
|
||||||
int
|
int
|
||||||
cfsetospeed (termios_p, speed)
|
cfsetospeed (termios_p, speed)
|
||||||
struct termios *termios_p;
|
struct termios *termios_p;
|
||||||
speed_t speed;
|
speed_t speed;
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue