Clean up NetBSD libc Minix port.
This patch add the proper .if/.else/.endif to the Makefiles, add places I forgot #ifdef __minix and remove newlines.
This commit is contained in:
parent
ad4dda469f
commit
3c9575aadc
|
@ -17,7 +17,9 @@
|
||||||
# The Hesiod functions are always in libc. To choose that getpwent() and friends
|
# The Hesiod functions are always in libc. To choose that getpwent() and friends
|
||||||
# actually call the Hesiod functions, put -DHESIOD on the CPPFLAGS line below.
|
# actually call the Hesiod functions, put -DHESIOD on the CPPFLAGS line below.
|
||||||
|
|
||||||
|
.if defined(__MINIX)
|
||||||
.include "minix-config.inc"
|
.include "minix-config.inc"
|
||||||
|
.endif
|
||||||
.include "Makefile.inc"
|
.include "Makefile.inc"
|
||||||
|
|
||||||
LIB= c
|
LIB= c
|
||||||
|
@ -42,17 +44,21 @@ assym.h: ${ARCHDIR}/genassym.cf
|
||||||
mv -f assym.h.tmp assym.h
|
mv -f assym.h.tmp assym.h
|
||||||
.endif
|
.endif
|
||||||
|
|
||||||
|
.if !defined(__MINIX)
|
||||||
# The following controls how to build compatibility code for old NetBSD
|
# The following controls how to build compatibility code for old NetBSD
|
||||||
# binaries. If BUILDCOLD is yes, then we build a separate library; otherwise
|
# binaries. If BUILDCOLD is yes, then we build a separate library; otherwise
|
||||||
# we include the code in libc.
|
# we include the code in libc.
|
||||||
#BUILDCOLD?= no
|
BUILDCOLD?= no
|
||||||
#.if "${BUILDCOLD}" == "yes"
|
.if "${BUILDCOLD}" == "yes"
|
||||||
#SUBDIR=compat
|
SUBDIR=compat
|
||||||
#.include <bsd.subdir.mk>
|
.include <bsd.subdir.mk>
|
||||||
#.else
|
.else
|
||||||
#COMPATDIR=${.CURDIR}/compat
|
COMPATDIR=${.CURDIR}/compat
|
||||||
#.include "${.CURDIR}/compat/Makefile.inc"
|
.include "${.CURDIR}/compat/Makefile.inc"
|
||||||
#.endif
|
.endif
|
||||||
|
.else
|
||||||
|
BUILDCOLD= no
|
||||||
|
.endif
|
||||||
|
|
||||||
.include "${.CURDIR}/../../common/lib/libc/Makefile.inc"
|
.include "${.CURDIR}/../../common/lib/libc/Makefile.inc"
|
||||||
.include "${.CURDIR}/atomic/Makefile.inc"
|
.include "${.CURDIR}/atomic/Makefile.inc"
|
||||||
|
@ -62,11 +68,16 @@ assym.h: ${ARCHDIR}/genassym.cf
|
||||||
.include "${.CURDIR}/citrus/Makefile.inc"
|
.include "${.CURDIR}/citrus/Makefile.inc"
|
||||||
.endif
|
.endif
|
||||||
.include "${.CURDIR}/compat-43/Makefile.inc"
|
.include "${.CURDIR}/compat-43/Makefile.inc"
|
||||||
#.include "${.CURDIR}/dlfcn/Makefile.inc"
|
.ifndef(__MINIX)
|
||||||
|
.include "${.CURDIR}/dlfcn/Makefile.inc"
|
||||||
|
.endif
|
||||||
.include "${.CURDIR}/gdtoa/Makefile.inc"
|
.include "${.CURDIR}/gdtoa/Makefile.inc"
|
||||||
.include "${.CURDIR}/gen/Makefile.inc"
|
.include "${.CURDIR}/gen/Makefile.inc"
|
||||||
|
.if defined(__MINIX)
|
||||||
# gmon needs profil()
|
# gmon needs profil()
|
||||||
#.include "${.CURDIR}/gmon/Makefile.inc"
|
.else
|
||||||
|
.include "${.CURDIR}/gmon/Makefile.inc"
|
||||||
|
.endif
|
||||||
.include "${.CURDIR}/hash/Makefile.inc"
|
.include "${.CURDIR}/hash/Makefile.inc"
|
||||||
.include "${.CURDIR}/iconv/Makefile.inc"
|
.include "${.CURDIR}/iconv/Makefile.inc"
|
||||||
.include "${.CURDIR}/inet/Makefile.inc"
|
.include "${.CURDIR}/inet/Makefile.inc"
|
||||||
|
@ -86,8 +97,11 @@ assym.h: ${ARCHDIR}/genassym.cf
|
||||||
.include "${.CURDIR}/regex/Makefile.inc"
|
.include "${.CURDIR}/regex/Makefile.inc"
|
||||||
.endif
|
.endif
|
||||||
.include "${.CURDIR}/resolv/Makefile.inc"
|
.include "${.CURDIR}/resolv/Makefile.inc"
|
||||||
# RPC needs pollts and a reserved port allocator.
|
.if defined(__MINIX)
|
||||||
#.include "${.CURDIR}/rpc/Makefile.inc"
|
# RPC needs pollts() and a reserved port allocator.
|
||||||
|
.else
|
||||||
|
.include "${.CURDIR}/rpc/Makefile.inc"
|
||||||
|
.endif
|
||||||
.include "${.CURDIR}/ssp/Makefile.inc"
|
.include "${.CURDIR}/ssp/Makefile.inc"
|
||||||
.include "${.CURDIR}/stdio/Makefile.inc"
|
.include "${.CURDIR}/stdio/Makefile.inc"
|
||||||
.include "${.CURDIR}/stdlib/Makefile.inc"
|
.include "${.CURDIR}/stdlib/Makefile.inc"
|
||||||
|
@ -95,7 +109,11 @@ assym.h: ${ARCHDIR}/genassym.cf
|
||||||
.include "${.CURDIR}/termios/Makefile.inc"
|
.include "${.CURDIR}/termios/Makefile.inc"
|
||||||
.include "${.CURDIR}/thread-stub/Makefile.inc"
|
.include "${.CURDIR}/thread-stub/Makefile.inc"
|
||||||
.include "${.CURDIR}/time/Makefile.inc"
|
.include "${.CURDIR}/time/Makefile.inc"
|
||||||
|
.if defined(__MINIX)
|
||||||
.include "${.CURDIR}/sys-minix/Makefile.inc"
|
.include "${.CURDIR}/sys-minix/Makefile.inc"
|
||||||
|
.else
|
||||||
|
.include "${.CURDIR}/sys/Makefile.inc"
|
||||||
|
.endif
|
||||||
.include "${.CURDIR}/uuid/Makefile.inc"
|
.include "${.CURDIR}/uuid/Makefile.inc"
|
||||||
.if (${MKYP} != "no")
|
.if (${MKYP} != "no")
|
||||||
.include "${.CURDIR}/yp/Makefile.inc"
|
.include "${.CURDIR}/yp/Makefile.inc"
|
||||||
|
|
|
@ -19,17 +19,22 @@
|
||||||
|
|
||||||
USE_FORT?= yes
|
USE_FORT?= yes
|
||||||
|
|
||||||
|
.if defined(__MINIX)
|
||||||
USE_SHLIBDIR= no
|
USE_SHLIBDIR= no
|
||||||
|
.else
|
||||||
|
USE_SHLIBDIR= yes
|
||||||
|
.endif
|
||||||
|
|
||||||
CITRUS?= yes
|
CITRUS?= yes
|
||||||
|
|
||||||
USE_LIBTRE= no
|
|
||||||
NETBSDSRCDIR= ${MINIXSRCDIR}
|
|
||||||
|
|
||||||
.include <bsd.own.mk>
|
.include <bsd.own.mk>
|
||||||
|
|
||||||
WARNS=4
|
WARNS=4
|
||||||
CPPFLAGS+= -D_LIBC -DLIBC_SCCS -DSYSLIBC_SCCS #-D_REENTRANT
|
.if defined(__MINIX)
|
||||||
|
CPPFLAGS+= -D_LIBC -DLIBC_SCSS -DSYSLIBC_SCSS
|
||||||
|
.else
|
||||||
|
CPPFLAGS+= -D_LIBC -DLIBC_SCCS -DSYSLIBC_SCCS -D_REENTRANT
|
||||||
|
.endif
|
||||||
|
|
||||||
.if (${USE_HESIOD} != "no")
|
.if (${USE_HESIOD} != "no")
|
||||||
CPPFLAGS+= -DHESIOD
|
CPPFLAGS+= -DHESIOD
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
# $NetBSD: Makefile.inc,v 1.20 2006/06/17 18:04:23 uwe Exp $
|
# $NetBSD: Makefile.inc,v 1.20 2006/06/17 18:04:23 uwe Exp $
|
||||||
|
|
||||||
#SRCS+= __sigaction14_sigtramp.c __sigtramp2.S
|
.if !defined(__MINIX)
|
||||||
|
SRCS+= __sigaction14_sigtramp.c __sigtramp2.S
|
||||||
|
.endif
|
||||||
|
|
|
@ -7,13 +7,18 @@ SRCS+= alloca.S byte_swap_2.S byte_swap_4.S fabs.S \
|
||||||
|
|
||||||
SRCS+= setjmp.S _setjmp.S sigsetjmp.S
|
SRCS+= setjmp.S _setjmp.S sigsetjmp.S
|
||||||
|
|
||||||
# Already defined in sys-minix /* __minix */
|
.if defined(__MINIX)
|
||||||
#SRCS+= resumecontext.S swapcontext.S
|
# Already defined in sys-minix
|
||||||
|
.else
|
||||||
|
SRCS+= resumecontext.S swapcontext.S
|
||||||
|
.endif
|
||||||
|
|
||||||
# objects built from C sources
|
# objects built from C sources
|
||||||
#SRCS+= bswap64.c _lwp.c makecontext.c
|
.if defined(__MINIX)
|
||||||
# __minix
|
|
||||||
SRCS+= bswap64.c
|
SRCS+= bswap64.c
|
||||||
|
.else
|
||||||
|
SRCS+= bswap64.c _lwp.c makecontext.c
|
||||||
|
.endif
|
||||||
|
|
||||||
# Common ieee754 constants and functions
|
# Common ieee754 constants and functions
|
||||||
SRCS+= infinityf_ieee754.c infinity_ieee754.c
|
SRCS+= infinityf_ieee754.c infinity_ieee754.c
|
||||||
|
|
|
@ -4,15 +4,20 @@
|
||||||
# compat-43 sources
|
# compat-43 sources
|
||||||
.PATH: ${ARCHDIR}/compat-43 ${.CURDIR}/compat-43
|
.PATH: ${ARCHDIR}/compat-43 ${.CURDIR}/compat-43
|
||||||
|
|
||||||
# unsupported by Minix
|
.if defined(__MINIX)
|
||||||
|
# Unsupported by Minix
|
||||||
# gethostid.c sethostid.c setpgrp.c setrgid.c setruid.c sigcompat.c
|
# gethostid.c sethostid.c setpgrp.c setrgid.c setruid.c sigcompat.c
|
||||||
|
|
||||||
SRCS+= creat.c getdtablesize.c \
|
SRCS+= creat.c getdtablesize.c killpg.c
|
||||||
killpg.c \
|
|
||||||
|
|
||||||
|
.else
|
||||||
|
SRCS+= creat.c getdtablesize.c gethostid.c \
|
||||||
|
killpg.c sethostid.c setpgrp.c \
|
||||||
|
setrgid.c setruid.c sigcompat.c
|
||||||
.if !defined(AUDIT)
|
.if !defined(AUDIT)
|
||||||
SRCS+= getwd.c
|
SRCS+= getwd.c
|
||||||
.endif
|
.endif
|
||||||
|
.endif
|
||||||
|
|
||||||
# XXX this is to get <compat/sys/signal.h>
|
# XXX this is to get <compat/sys/signal.h>
|
||||||
CPPFLAGS.sigcompat.c+= -I${NETBSDSRCDIR}/sys
|
CPPFLAGS.sigcompat.c+= -I${NETBSDSRCDIR}/sys
|
||||||
|
|
|
@ -2,8 +2,12 @@
|
||||||
# from: @(#)Makefile.inc 8.6 (Berkeley) 5/4/95
|
# from: @(#)Makefile.inc 8.6 (Berkeley) 5/4/95
|
||||||
|
|
||||||
# gen sources
|
# gen sources
|
||||||
.PATH: ${.CURDIR}/gen/minix ${ARCHDIR}/gen ${.CURDIR}/gen
|
.if defined(__MINIX)
|
||||||
|
.PATH: ${.CURDIR}/gen/minix
|
||||||
|
.endif
|
||||||
|
.PATH: ${ARCHDIR}/gen ${.CURDIR}/gen
|
||||||
|
|
||||||
|
.if defined(__MINIX)
|
||||||
# Unsupported by Minix.
|
# Unsupported by Minix.
|
||||||
# closefrom.c confstr.c extattr.c getdevmajor.c getmntinfo.c \
|
# closefrom.c confstr.c extattr.c getdevmajor.c getmntinfo.c \
|
||||||
# pthread_atfork.c setdomainname.c sethostname.c setproctitle.c \
|
# pthread_atfork.c setdomainname.c sethostname.c setproctitle.c \
|
||||||
|
@ -47,6 +51,36 @@ SRCS+= _errno.c alarm.c alphasort.c arc4random.c assert.c basename.c clock.c \
|
||||||
toupper_.c ualarm.c ulimit.c uname.c unvis.c usleep.c utime.c utmp.c \
|
toupper_.c ualarm.c ulimit.c uname.c unvis.c usleep.c utime.c utmp.c \
|
||||||
utmpx.c valloc.c vis.c warn.c warnx.c \
|
utmpx.c valloc.c vis.c warn.c warnx.c \
|
||||||
vwarn.c vwarnx.c verr.c verrx.c wait.c waitpid.c wordexp.c
|
vwarn.c vwarnx.c verr.c verrx.c wait.c waitpid.c wordexp.c
|
||||||
|
.else
|
||||||
|
SRCS+= _errno.c alarm.c alphasort.c arc4random.c assert.c basename.c clock.c \
|
||||||
|
closedir.c closefrom.c confstr.c ctermid.c ctype_.c daemon.c \
|
||||||
|
dehumanize_number.c devname.c dirname.c disklabel.c err.c errx.c \
|
||||||
|
errlist.c errno.c execl.c execle.c execlp.c execv.c execvp.c \
|
||||||
|
extattr.c fmtcheck.c fmtmsg.c fnmatch.c fstab.c ftok.c \
|
||||||
|
fts.c ftw.c getbsize.c getcap.c getcwd.c \
|
||||||
|
getdevmajor.c getdomainname.c getgrent.c \
|
||||||
|
getgrouplist.c getgroupmembership.c gethostname.c \
|
||||||
|
getloadavg.c getlogin.c getmntinfo.c \
|
||||||
|
getnetgrent.c getpagesize.c \
|
||||||
|
getpass.c getprogname.c getpwent.c getttyent.c \
|
||||||
|
getusershell.c glob.c humanize_number.c initdir.c initgroups.c \
|
||||||
|
isascii.c isatty.c isctype.c lockf.c nftw.c \
|
||||||
|
nice.c nlist.c nlist_aout.c \
|
||||||
|
nlist_coff.c nlist_ecoff.c nlist_elf32.c nlist_elf64.c opendir.c \
|
||||||
|
pause.c popen.c psignal.c pthread_atfork.c ptree.c pwcache.c \
|
||||||
|
pw_scan.c raise.c randomid.c rb.c readdir.c rewinddir.c \
|
||||||
|
scandir.c seekdir.c setdomainname.c \
|
||||||
|
sethostname.c setjmperr.c setmode.c setproctitle.c setprogname.c \
|
||||||
|
shquote.c shquotev.c sighold.c sigignore.c siginterrupt.c \
|
||||||
|
siglist.c signal.c signame.c sigrelse.c \
|
||||||
|
sigset.c sigsetops.c sleep.c \
|
||||||
|
stringlist.c sysconf.c sysctl.c sysctlbyname.c sysctlgetmibinfo.c \
|
||||||
|
sysctlnametomib.c syslog.c telldir.c time.c \
|
||||||
|
times.c toascii.c tolower_.c ttyname.c ttyslot.c \
|
||||||
|
toupper_.c ualarm.c ulimit.c uname.c unvis.c usleep.c utime.c utmp.c \
|
||||||
|
utmpx.c valloc.c vis.c wait.c wait3.c waitpid.c warn.c warnx.c \
|
||||||
|
vwarn.c vwarnx.c verr.c verrx.c wordexp.c
|
||||||
|
.endif
|
||||||
|
|
||||||
# indirect reference stubs, to be removed soon.
|
# indirect reference stubs, to be removed soon.
|
||||||
SRCS+= _err.c _errx.c \
|
SRCS+= _err.c _errx.c \
|
||||||
|
@ -178,7 +212,12 @@ CPPFLAGS.isctype.c+= -I${LIBCDIR}/locale
|
||||||
CPPFLAGS.tolower_.c+= -I${LIBCDIR}/locale
|
CPPFLAGS.tolower_.c+= -I${LIBCDIR}/locale
|
||||||
CPPFLAGS.toupper_.c+= -I${LIBCDIR}/locale
|
CPPFLAGS.toupper_.c+= -I${LIBCDIR}/locale
|
||||||
|
|
||||||
errlist.c: errlist-minix.awk ${NETBSDSRCDIR}/nbsd_include/sys/errno.h
|
.if defined(__MINIX)
|
||||||
|
errlist.c: errlist-minix.awk ${MINIXSRCDIR}/nbsd_include/sys/errno.h
|
||||||
${TOOL_AWK} -f ${.ALLSRC} > ${.TARGET}
|
${TOOL_AWK} -f ${.ALLSRC} > ${.TARGET}
|
||||||
|
.else
|
||||||
|
errlist.c: errlist.awk ${NETBSDSRCDIR}/sys/sys/errno.h
|
||||||
|
${TOOL_AWK} -f ${.ALLSRC} > ${.TARGET}
|
||||||
|
.endif
|
||||||
|
|
||||||
CLEANFILES+= errlist.c
|
CLEANFILES+= errlist.c
|
||||||
|
|
|
@ -13,7 +13,9 @@ __RCSID("$NetBSD: _verr.c,v 1.10 2005/09/13 01:44:09 christos Exp $");
|
||||||
#if defined(__indr_reference)
|
#if defined(__indr_reference)
|
||||||
__indr_reference(_verr, verr)
|
__indr_reference(_verr, verr)
|
||||||
#else
|
#else
|
||||||
#include <sys/ansi.h>
|
#ifdef __minix
|
||||||
|
#include <stdarg.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
__dead void _verr(int, const char *, _BSD_VA_LIST_);
|
__dead void _verr(int, const char *, _BSD_VA_LIST_);
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,9 @@ __RCSID("$NetBSD: _verrx.c,v 1.10 2005/09/13 01:44:09 christos Exp $");
|
||||||
#if defined(__indr_reference)
|
#if defined(__indr_reference)
|
||||||
__indr_reference(_verrx, verrx)
|
__indr_reference(_verrx, verrx)
|
||||||
#else
|
#else
|
||||||
#include <sys/ansi.h>
|
#ifdef __minix
|
||||||
|
#include <stdarg.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
__dead void _verrx(int, const char *, _BSD_VA_LIST_);
|
__dead void _verrx(int, const char *, _BSD_VA_LIST_);
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,9 @@ __RCSID("$NetBSD: _vwarn.c,v 1.10 2005/09/13 01:44:09 christos Exp $");
|
||||||
#if defined(__indr_reference)
|
#if defined(__indr_reference)
|
||||||
__indr_reference(_vwarn, vwarn)
|
__indr_reference(_vwarn, vwarn)
|
||||||
#else
|
#else
|
||||||
|
#ifdef __minix
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
void _vwarn(const char *, _BSD_VA_LIST_);
|
void _vwarn(const char *, _BSD_VA_LIST_);
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,9 @@ __RCSID("$NetBSD: _vwarnx.c,v 1.10 2005/09/13 01:44:09 christos Exp $");
|
||||||
#if defined(__indr_reference)
|
#if defined(__indr_reference)
|
||||||
__indr_reference(_vwarnx, vwarnx)
|
__indr_reference(_vwarnx, vwarnx)
|
||||||
#else
|
#else
|
||||||
|
#ifdef __minix
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
void _vwarnx(const char *, _BSD_VA_LIST_);
|
void _vwarnx(const char *, _BSD_VA_LIST_);
|
||||||
|
|
||||||
|
|
|
@ -13,6 +13,7 @@ __RCSID("$NetBSD: _warn.c,v 1.10 2005/09/13 01:44:09 christos Exp $");
|
||||||
#if defined(__indr_reference)
|
#if defined(__indr_reference)
|
||||||
__indr_reference(_warn, warn)
|
__indr_reference(_warn, warn)
|
||||||
#else
|
#else
|
||||||
|
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
|
|
||||||
void _vwarn(const char *, _BSD_VA_LIST_);
|
void _vwarn(const char *, _BSD_VA_LIST_);
|
||||||
|
@ -23,7 +24,11 @@ warn(const char *fmt, ...)
|
||||||
va_list ap;
|
va_list ap;
|
||||||
|
|
||||||
va_start(ap, fmt);
|
va_start(ap, fmt);
|
||||||
|
#ifdef __minix
|
||||||
_vwarn(fmt, ap);
|
_vwarn(fmt, ap);
|
||||||
|
#else
|
||||||
|
_vwarn(eval, fmt, ap);
|
||||||
|
#endif
|
||||||
va_end(ap);
|
va_end(ap);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -24,7 +24,11 @@ warnx(const char *fmt, ...)
|
||||||
va_list ap;
|
va_list ap;
|
||||||
|
|
||||||
va_start(ap, fmt);
|
va_start(ap, fmt);
|
||||||
|
#ifdef __minix
|
||||||
_vwarnx(fmt, ap);
|
_vwarnx(fmt, ap);
|
||||||
|
#else
|
||||||
|
_vwarnx(eval, fmt, ap);
|
||||||
|
#endif
|
||||||
va_end(ap);
|
va_end(ap);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -814,6 +814,7 @@ _dns_getgrgid(void *nsrv, void *nscb, va_list ap)
|
||||||
#else
|
#else
|
||||||
gid_t gid = va_arg(ap, gid_t);
|
gid_t gid = va_arg(ap, gid_t);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
int rv, rerror;
|
int rv, rerror;
|
||||||
|
|
||||||
_DIAGASSERT(retval != NULL);
|
_DIAGASSERT(retval != NULL);
|
||||||
|
@ -1168,6 +1169,7 @@ _nis_getgrgid(void *nsrv, void *nscb, va_list ap)
|
||||||
#else
|
#else
|
||||||
gid_t gid = va_arg(ap, gid_t);
|
gid_t gid = va_arg(ap, gid_t);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
int rv, rerror;
|
int rv, rerror;
|
||||||
|
|
||||||
_DIAGASSERT(retval != NULL);
|
_DIAGASSERT(retval != NULL);
|
||||||
|
@ -1430,7 +1432,11 @@ __grscan_compat(int *retval, struct group *grp, char *buffer, size_t buflen,
|
||||||
crv = nsdispatch(NULL, compatgiddtab,
|
crv = nsdispatch(NULL, compatgiddtab,
|
||||||
NSDB_GROUP_COMPAT, "getgrgid_r",
|
NSDB_GROUP_COMPAT, "getgrgid_r",
|
||||||
__nsdefaultnis,
|
__nsdefaultnis,
|
||||||
|
#ifdef __minix
|
||||||
&cretval, (int)gid,
|
&cretval, (int)gid,
|
||||||
|
#else
|
||||||
|
&cretval, gid,
|
||||||
|
#endif
|
||||||
&cgrp, filebuf, sizeof(filebuf), &cgrpres);
|
&cgrp, filebuf, sizeof(filebuf), &cgrpres);
|
||||||
}
|
}
|
||||||
if (crv != NS_SUCCESS) { /* not found */
|
if (crv != NS_SUCCESS) { /* not found */
|
||||||
|
@ -1632,7 +1638,11 @@ static int
|
||||||
_compat_getgrgid(void *nsrv, void *nscb, va_list ap)
|
_compat_getgrgid(void *nsrv, void *nscb, va_list ap)
|
||||||
{
|
{
|
||||||
struct group **retval = va_arg(ap, struct group **);
|
struct group **retval = va_arg(ap, struct group **);
|
||||||
gid_t gid = va_arg(ap, int);
|
#ifdef __minix
|
||||||
|
gid_t gid = (gid_t)va_arg(ap, int);
|
||||||
|
#else
|
||||||
|
gid_t gid = va_arg(ap, gid_t);
|
||||||
|
#endif
|
||||||
|
|
||||||
int rv, rerror;
|
int rv, rerror;
|
||||||
|
|
||||||
|
@ -1759,6 +1769,7 @@ getgrent(void)
|
||||||
NS_COMPAT_CB(_compat_getgrent, NULL)
|
NS_COMPAT_CB(_compat_getgrent, NULL)
|
||||||
NS_NULL_CB
|
NS_NULL_CB
|
||||||
};
|
};
|
||||||
|
|
||||||
mutex_lock(&__grmutex);
|
mutex_lock(&__grmutex);
|
||||||
rv = nsdispatch(NULL, dtab, NSDB_GROUP, "getgrent", __nsdefaultcompat,
|
rv = nsdispatch(NULL, dtab, NSDB_GROUP, "getgrent", __nsdefaultcompat,
|
||||||
&retval);
|
&retval);
|
||||||
|
@ -1810,7 +1821,11 @@ getgrgid(gid_t gid)
|
||||||
|
|
||||||
mutex_lock(&__grmutex);
|
mutex_lock(&__grmutex);
|
||||||
rv = nsdispatch(NULL, dtab, NSDB_GROUP, "getgrgid", __nsdefaultcompat,
|
rv = nsdispatch(NULL, dtab, NSDB_GROUP, "getgrgid", __nsdefaultcompat,
|
||||||
|
#ifdef __minix
|
||||||
&retval, (int)gid);
|
&retval, (int)gid);
|
||||||
|
#else
|
||||||
|
&retval, gid);
|
||||||
|
#endif
|
||||||
mutex_unlock(&__grmutex);
|
mutex_unlock(&__grmutex);
|
||||||
return (rv == NS_SUCCESS) ? retval : NULL;
|
return (rv == NS_SUCCESS) ? retval : NULL;
|
||||||
}
|
}
|
||||||
|
@ -1837,7 +1852,11 @@ getgrgid_r(gid_t gid, struct group *grp, char *buffer, size_t buflen,
|
||||||
retval = 0;
|
retval = 0;
|
||||||
mutex_lock(&__grmutex);
|
mutex_lock(&__grmutex);
|
||||||
rv = nsdispatch(NULL, dtab, NSDB_GROUP, "getgrgid_r", __nsdefaultcompat,
|
rv = nsdispatch(NULL, dtab, NSDB_GROUP, "getgrgid_r", __nsdefaultcompat,
|
||||||
|
#ifdef __minix
|
||||||
&retval, (int)gid, grp, buffer, buflen, result);
|
&retval, (int)gid, grp, buffer, buflen, result);
|
||||||
|
#else
|
||||||
|
&retval, gid, grp, buffer, buflen, result);
|
||||||
|
#endif
|
||||||
mutex_unlock(&__grmutex);
|
mutex_unlock(&__grmutex);
|
||||||
switch (rv) {
|
switch (rv) {
|
||||||
case NS_SUCCESS:
|
case NS_SUCCESS:
|
||||||
|
|
|
@ -321,8 +321,8 @@ _compat_ggm_search(void *cookie, struct group **groupres)
|
||||||
&rerror, cp->uname, (int)cp->agroup, cp->groups, cp->maxgrp, cp->groupc);
|
&rerror, cp->uname, (int)cp->agroup, cp->groups, cp->maxgrp, cp->groupc);
|
||||||
#else
|
#else
|
||||||
&rerror, cp->uname, cp->agroup, cp->groups, cp->maxgrp, cp->groupc);
|
&rerror, cp->uname, cp->agroup, cp->groups, cp->maxgrp, cp->groupc);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (crv == NS_SUCCESS)
|
if (crv == NS_SUCCESS)
|
||||||
crv = NS_NOTFOUND; /* indicate "no more +: entries" */
|
crv = NS_NOTFOUND; /* indicate "no more +: entries" */
|
||||||
|
|
||||||
|
|
|
@ -1929,7 +1929,6 @@ _passwdcompat_pwscan(struct passwd *pw, char *buffer, size_t buflen,
|
||||||
NSDB_PASSWD_COMPAT, "getpwuid_r", __nsdefaultnis,
|
NSDB_PASSWD_COMPAT, "getpwuid_r", __nsdefaultnis,
|
||||||
&crv, uid, pw, buffer, buflen, &cpw);
|
&crv, uid, pw, buffer, buflen, &cpw);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
abort();
|
abort();
|
||||||
|
|
|
@ -39,6 +39,7 @@
|
||||||
|
|
||||||
#define _GROUP_COMPAT /* "group" defaults to compat, so always provide it */
|
#define _GROUP_COMPAT /* "group" defaults to compat, so always provide it */
|
||||||
|
|
||||||
|
|
||||||
#ifndef __minix /* should be _REENTRANT */
|
#ifndef __minix /* should be _REENTRANT */
|
||||||
/*
|
/*
|
||||||
* mutex to serialize the public group(5) functions use of the
|
* mutex to serialize the public group(5) functions use of the
|
||||||
|
@ -46,6 +47,7 @@
|
||||||
*/
|
*/
|
||||||
extern mutex_t __grmutex;
|
extern mutex_t __grmutex;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* files methods
|
* files methods
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -34,8 +34,6 @@
|
||||||
__RCSID("$NetBSD: initdir.c,v 1.1 2010/09/26 02:26:59 yamt Exp $");
|
__RCSID("$NetBSD: initdir.c,v 1.1 2010/09/26 02:26:59 yamt Exp $");
|
||||||
#endif /* LIBC_SCCS and not lint */
|
#endif /* LIBC_SCCS and not lint */
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#include "namespace.h"
|
#include "namespace.h"
|
||||||
|
|
||||||
#ifdef __minix
|
#ifdef __minix
|
||||||
|
|
|
@ -47,7 +47,6 @@ __RCSID("$NetBSD: readdir.c,v 1.25 2010/09/16 02:38:50 yamt Exp $");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "extern.h"
|
#include "extern.h"
|
||||||
|
|
||||||
#include <sys/param.h>
|
#include <sys/param.h>
|
||||||
|
|
||||||
#include <dirent.h>
|
#include <dirent.h>
|
||||||
|
|
|
@ -82,6 +82,7 @@ ttyname_r(int fd, char *buf, size_t len)
|
||||||
if (len <= DEVSZ) {
|
if (len <= DEVSZ) {
|
||||||
return ERANGE;
|
return ERANGE;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef __minix
|
#ifndef __minix
|
||||||
/* If it is a pty, deal with it quickly */
|
/* If it is a pty, deal with it quickly */
|
||||||
if (ioctl(fd, TIOCPTSNAME, &ptm) != -1) {
|
if (ioctl(fd, TIOCPTSNAME, &ptm) != -1) {
|
||||||
|
@ -91,7 +92,6 @@ ttyname_r(int fd, char *buf, size_t len)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Must be a terminal. */
|
/* Must be a terminal. */
|
||||||
if (tcgetattr(fd, &ttyb) == -1)
|
if (tcgetattr(fd, &ttyb) == -1)
|
||||||
return errno;
|
return errno;
|
||||||
|
|
|
@ -376,6 +376,7 @@ updwtmpx(const char *file, const struct utmpx *utx)
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int
|
int
|
||||||
utmpxname(const char *fname)
|
utmpxname(const char *fname)
|
||||||
{
|
{
|
||||||
|
@ -500,7 +501,6 @@ updlastlogx(const char *fname, uid_t uid, struct lastlogx *ll)
|
||||||
if (flock(db->fd(db), LOCK_EX) < 0)
|
if (flock(db->fd(db), LOCK_EX) < 0)
|
||||||
return -1;
|
return -1;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
key.data = &uid;
|
key.data = &uid;
|
||||||
key.size = sizeof(uid);
|
key.size = sizeof(uid);
|
||||||
data.data = ll;
|
data.data = ll;
|
||||||
|
|
|
@ -398,6 +398,7 @@ _mcleanup(void)
|
||||||
|
|
||||||
if (p->state == GMON_PROF_ERROR)
|
if (p->state == GMON_PROF_ERROR)
|
||||||
warnx("%s: tos overflow", __func__);
|
warnx("%s: tos overflow", __func__);
|
||||||
|
|
||||||
#ifdef __minix
|
#ifdef __minix
|
||||||
clockinfo.profhz = sysconf(_SC_CLK_TCK);
|
clockinfo.profhz = sysconf(_SC_CLK_TCK);
|
||||||
#else /* !__minix */
|
#else /* !__minix */
|
||||||
|
|
|
@ -56,7 +56,11 @@ __writelockenv(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
static __inline bool
|
static __inline bool
|
||||||
|
#ifdef __minix
|
||||||
__unlockenv(void)
|
__unlockenv(void)
|
||||||
|
#else /* Bug-to-bug compatibility? */
|
||||||
|
__unlocklockenv(void)
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
* Copyright (c) 1997-2004 The NetBSD Foundation, Inc.
|
* Copyright (c) 1997-2004 The NetBSD Foundation, Inc.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, ith or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions
|
* modification, are permitted provided that the following conditions
|
||||||
* are met:
|
* are met:
|
||||||
* 1. Redistributions of source code must retain the above copyright
|
* 1. Redistributions of source code must retain the above copyright
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
# Makefile fragment shared across several parts that want to look
|
# Makefile fragment shared across several parts that want to look
|
||||||
# inside libc's include tree.
|
# inside libc's include tree.
|
||||||
|
|
||||||
|
.if defined(__MINIX)
|
||||||
.if defined(LIBC_MACHINE_ARCH) && \
|
.if defined(LIBC_MACHINE_ARCH) && \
|
||||||
exists(${MINIXSRCDIR}/lib/nbsd_libc/arch/${LIBC_MACHINE_ARCH}/SYS.h)
|
exists(${MINIXSRCDIR}/lib/nbsd_libc/arch/${LIBC_MACHINE_ARCH}/SYS.h)
|
||||||
ARCHSUBDIR= ${LIBC_MACHINE_ARCH}
|
ARCHSUBDIR= ${LIBC_MACHINE_ARCH}
|
||||||
|
@ -17,3 +18,19 @@ ARCHSUBDIR= ${MACHINE_CPU}
|
||||||
.endif
|
.endif
|
||||||
|
|
||||||
ARCHDIR= ${MINIXSRCCDIR}/lib/nbsd_libc/arch/${ARCHSUBDIR}
|
ARCHDIR= ${MINIXSRCCDIR}/lib/nbsd_libc/arch/${ARCHSUBDIR}
|
||||||
|
.else
|
||||||
|
.if defined(LIBC_MACHINE_ARCH) && \
|
||||||
|
exists(${NETBSDSRCDIR}/lib/libc/arch/${LIBC_MACHINE_ARCH}/SYS.h)
|
||||||
|
ARCHSUBDIR= ${LIBC_MACHINE_ARCH}
|
||||||
|
.elif exists(${NETBSDSRCDIR}/lib/libc/arch/${MACHINE_ARCH}/SYS.h)
|
||||||
|
ARCHSUBDIR= ${MACHINE_ARCH}
|
||||||
|
.elif exists(${NETBSDSRCDIR}/lib/libc/arch/${MACHINE_CPU}/SYS.h)
|
||||||
|
ARCHSUBDIR= ${MACHINE_CPU}
|
||||||
|
.else
|
||||||
|
.BEGIN:
|
||||||
|
@echo no ARCHDIR for ${MACHINE_ARCH} nor ${MACHINE_CPU}
|
||||||
|
@false
|
||||||
|
.endif
|
||||||
|
|
||||||
|
ARCHDIR= ${NETBSDSRCDIR}/lib/libc/arch/${ARCHSUBDIR}
|
||||||
|
.endif
|
||||||
|
|
|
@ -162,7 +162,6 @@ __setlocale(int category, const char *name)
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
char *
|
char *
|
||||||
setlocale(int category, const char *locale)
|
setlocale(int category, const char *locale)
|
||||||
{
|
{
|
||||||
|
|
|
@ -7,9 +7,12 @@ CPPFLAGS+= -nostdinc -O -D__minix -D_POSIX_SOURCE -I${NETBSDINCLUDES} -D_NETBSD
|
||||||
AFLAGS+= -nostdinc -D__minix -I${NETBSDINCLUDES}
|
AFLAGS+= -nostdinc -D__minix -I${NETBSDINCLUDES}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
CITRUS=yes
|
CITRUS=yes
|
||||||
USE_INET6=no
|
USE_INET6=no
|
||||||
|
|
||||||
MKYP=no #requires RPC
|
MKYP=no #requires RPC
|
||||||
USE_JEMALLOC=no
|
USE_JEMALLOC=no
|
||||||
USE_FORT=no
|
USE_FORT=no
|
||||||
|
USE_LIBTRE=no
|
||||||
|
|
||||||
|
|
2062
lib/nbsd_libc/minix-port.patch
Normal file
2062
lib/nbsd_libc/minix-port.patch
Normal file
File diff suppressed because it is too large
Load diff
|
@ -63,6 +63,7 @@ __guard_setup(void)
|
||||||
|
|
||||||
if (__stack_chk_guard[0] != 0)
|
if (__stack_chk_guard[0] != 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
#ifndef __minix
|
#ifndef __minix
|
||||||
mib[0] = CTL_KERN;
|
mib[0] = CTL_KERN;
|
||||||
mib[1] = KERN_ARND;
|
mib[1] = KERN_ARND;
|
||||||
|
|
|
@ -2,8 +2,13 @@
|
||||||
# @(#)Makefile.inc 8.2 (Berkeley) 9/5/93
|
# @(#)Makefile.inc 8.2 (Berkeley) 9/5/93
|
||||||
|
|
||||||
# net sources
|
# net sources
|
||||||
.PATH: ${ARCHDIR}/net ${.CURDIR}/net/minix ${.CURDIR}/net
|
.if defined(__MINIX)
|
||||||
|
.PATH: ${.CURDIR}/net/minix
|
||||||
|
.endif
|
||||||
|
.PATH: ${ARCHDIR}/net ${.CURDIR}/net
|
||||||
|
|
||||||
|
.if defined(__MINIX)
|
||||||
|
# Not supported by minix: iso_addr.c link_addr.c sockatmark.c
|
||||||
SRCS+= __cmsg_alignbytes.c base64.c ethers.c gethnamaddr.c getifaddrs.c \
|
SRCS+= __cmsg_alignbytes.c base64.c ethers.c gethnamaddr.c getifaddrs.c \
|
||||||
getnetnamadr.c getnetent.c getpeereid.c \
|
getnetnamadr.c getnetent.c getpeereid.c \
|
||||||
getprotobyname.c getprotobynumber.c getprotoent.c \
|
getprotobyname.c getprotobynumber.c getprotoent.c \
|
||||||
|
@ -12,10 +17,18 @@ SRCS+= __cmsg_alignbytes.c base64.c ethers.c gethnamaddr.c getifaddrs.c \
|
||||||
getservbyname_r.c getservbyport_r.c getservent_r.c \
|
getservbyname_r.c getservbyport_r.c getservent_r.c \
|
||||||
nsdispatch.c nslexer.l nsparser.y nsap_addr.c \
|
nsdispatch.c nslexer.l nsparser.y nsap_addr.c \
|
||||||
rcmd.c recv.c send.c sethostent.c
|
rcmd.c recv.c send.c sethostent.c
|
||||||
|
.else
|
||||||
|
SRCS+= __cmsg_alignbytes.c base64.c ethers.c gethnamaddr.c getifaddrs.c \
|
||||||
# Not supported by Minix:
|
getnetnamadr.c getnetent.c getpeereid.c \
|
||||||
# sockatmark.c
|
getprotobyname.c getprotobynumber.c getprotoent.c \
|
||||||
|
getprotobyname_r.c getprotobynumber_r.c getprotoent_r.c \
|
||||||
|
getservbyname.c getservbyport.c getservent.c \
|
||||||
|
getservbyname_r.c getservbyport_r.c getservent_r.c \
|
||||||
|
iso_addr.c linkaddr.c \
|
||||||
|
nsdispatch.c nslexer.l nsparser.y nsap_addr.c \
|
||||||
|
rcmd.c recv.c send.c sethostent.c \
|
||||||
|
sockatmark.c
|
||||||
|
.endif
|
||||||
|
|
||||||
.if (${MKHESIOD} != "no")
|
.if (${MKHESIOD} != "no")
|
||||||
SRCS+= hesiod.c
|
SRCS+= hesiod.c
|
||||||
|
@ -25,9 +38,9 @@ SRCS+= getaddrinfo.c getnameinfo.c
|
||||||
.if (${USE_INET6} != "no")
|
.if (${USE_INET6} != "no")
|
||||||
SRCS+= ip6opt.c rthdr.c vars6.c
|
SRCS+= ip6opt.c rthdr.c vars6.c
|
||||||
.endif
|
.endif
|
||||||
# Not supported by minix
|
.if !defined(__MINIX)
|
||||||
#SRCS+= if_indextoname.c if_nameindex.c if_nametoindex.c
|
SRCS+= if_indextoname.c if_nameindex.c if_nametoindex.c
|
||||||
# iso_addr.c linkaddr.c \
|
.endif
|
||||||
|
|
||||||
LPREFIX=_nsyy
|
LPREFIX=_nsyy
|
||||||
YPREFIX=_nsyy
|
YPREFIX=_nsyy
|
||||||
|
|
|
@ -500,6 +500,7 @@ ip6_sa2str(sa6, buf, bufsiz, flags)
|
||||||
}
|
}
|
||||||
#endif /* INET6 */
|
#endif /* INET6 */
|
||||||
|
|
||||||
|
|
||||||
#ifndef __minix
|
#ifndef __minix
|
||||||
/*
|
/*
|
||||||
* getnameinfo_link():
|
* getnameinfo_link():
|
||||||
|
|
|
@ -48,7 +48,9 @@ __RCSID("$NetBSD: rcmd.c,v 1.65 2007/01/03 11:46:22 ws Exp $");
|
||||||
#include <sys/wait.h>
|
#include <sys/wait.h>
|
||||||
|
|
||||||
#include <netinet/in.h>
|
#include <netinet/in.h>
|
||||||
|
#ifndef __minix
|
||||||
#include <rpc/rpc.h>
|
#include <rpc/rpc.h>
|
||||||
|
#endif
|
||||||
#include <arpa/inet.h>
|
#include <arpa/inet.h>
|
||||||
#include <netgroup.h>
|
#include <netgroup.h>
|
||||||
|
|
||||||
|
@ -70,6 +72,10 @@ __RCSID("$NetBSD: rcmd.c,v 1.65 2007/01/03 11:46:22 ws Exp $");
|
||||||
|
|
||||||
#include "pathnames.h"
|
#include "pathnames.h"
|
||||||
|
|
||||||
|
#ifdef __minix
|
||||||
|
#undef BSD4_4
|
||||||
|
#endif
|
||||||
|
|
||||||
int orcmd __P((char **, u_int, const char *, const char *, const char *,
|
int orcmd __P((char **, u_int, const char *, const char *, const char *,
|
||||||
int *));
|
int *));
|
||||||
int orcmd_af __P((char **, u_int, const char *, const char *, const char *,
|
int orcmd_af __P((char **, u_int, const char *, const char *, const char *,
|
||||||
|
@ -201,7 +207,6 @@ orcmd_af(ahost, rport, locuser, remuser, cmd, fd2p, af)
|
||||||
return (error);
|
return (error);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*ARGSUSED*/
|
/*ARGSUSED*/
|
||||||
static int
|
static int
|
||||||
resrcmd(res, ahost, rport, locuser, remuser, cmd, fd2p)
|
resrcmd(res, ahost, rport, locuser, remuser, cmd, fd2p)
|
||||||
|
@ -543,7 +548,7 @@ rresvport_af(alport, family)
|
||||||
sa = (struct sockaddr *)(void *)&ss;
|
sa = (struct sockaddr *)(void *)&ss;
|
||||||
switch (family) {
|
switch (family) {
|
||||||
case AF_INET:
|
case AF_INET:
|
||||||
#if defined(BSD4_4) && !defined(__minix)
|
#ifdef BSD4_4
|
||||||
sa->sa_len =
|
sa->sa_len =
|
||||||
#endif
|
#endif
|
||||||
salen = sizeof(struct sockaddr_in);
|
salen = sizeof(struct sockaddr_in);
|
||||||
|
@ -551,7 +556,7 @@ rresvport_af(alport, family)
|
||||||
break;
|
break;
|
||||||
#ifdef INET6
|
#ifdef INET6
|
||||||
case AF_INET6:
|
case AF_INET6:
|
||||||
#if defined(BSD4_4) && !defined(__minix)
|
#ifdef BSD4_4
|
||||||
sa->sa_len =
|
sa->sa_len =
|
||||||
#endif
|
#endif
|
||||||
salen = sizeof(struct sockaddr_in6);
|
salen = sizeof(struct sockaddr_in6);
|
||||||
|
@ -654,7 +659,7 @@ iruserok(raddr, superuser, ruser, luser)
|
||||||
|
|
||||||
memset(&irsin, 0, sizeof(irsin));
|
memset(&irsin, 0, sizeof(irsin));
|
||||||
irsin.sin_family = AF_INET;
|
irsin.sin_family = AF_INET;
|
||||||
#if defined(BSD4_4) && !defined(__minix)
|
#ifdef BSD4_4
|
||||||
irsin.sin_len = sizeof(struct sockaddr_in);
|
irsin.sin_len = sizeof(struct sockaddr_in);
|
||||||
#endif
|
#endif
|
||||||
memcpy(&irsin.sin_addr, &raddr, sizeof(irsin.sin_addr));
|
memcpy(&irsin.sin_addr, &raddr, sizeof(irsin.sin_addr));
|
||||||
|
@ -774,7 +779,7 @@ __ivaliduser(hostf, raddr, luser, ruser)
|
||||||
|
|
||||||
memset(&ivusin, 0, sizeof(ivusin));
|
memset(&ivusin, 0, sizeof(ivusin));
|
||||||
ivusin.sin_family = AF_INET;
|
ivusin.sin_family = AF_INET;
|
||||||
#if defined(BSD4_4) && !defined(__minix)
|
#ifdef BSD4_4
|
||||||
ivusin.sin_len = sizeof(struct sockaddr_in);
|
ivusin.sin_len = sizeof(struct sockaddr_in);
|
||||||
#endif
|
#endif
|
||||||
memcpy(&ivusin.sin_addr, &raddr, sizeof(ivusin.sin_addr));
|
memcpy(&ivusin.sin_addr, &raddr, sizeof(ivusin.sin_addr));
|
||||||
|
|
|
@ -603,7 +603,6 @@ out:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
(void)__res_vinit(statp, 0);
|
(void)__res_vinit(statp, 0);
|
||||||
if (mtime)
|
if (mtime)
|
||||||
*mtime = __res_conf_time;
|
*mtime = __res_conf_time;
|
||||||
|
|
|
@ -4,6 +4,8 @@
|
||||||
# stdlib sources
|
# stdlib sources
|
||||||
.PATH: ${ARCHDIR}/stdlib ${.CURDIR}/stdlib
|
.PATH: ${ARCHDIR}/stdlib ${.CURDIR}/stdlib
|
||||||
|
|
||||||
|
.if defined(__MINIX)
|
||||||
|
# pty.c not compiled
|
||||||
SRCS+= _env.c _rand48.c \
|
SRCS+= _env.c _rand48.c \
|
||||||
a64l.c abort.c atexit.c atof.c atoi.c atol.c atoll.c \
|
a64l.c abort.c atexit.c atof.c atoi.c atol.c atoll.c \
|
||||||
bsearch.c drand48.c exit.c \
|
bsearch.c drand48.c exit.c \
|
||||||
|
@ -16,6 +18,20 @@ SRCS+= _env.c _rand48.c \
|
||||||
strtoimax.c strtol.c strtoll.c strtoq.c strtoul.c strtoull.c \
|
strtoimax.c strtol.c strtoll.c strtoq.c strtoul.c strtoull.c \
|
||||||
strtoumax.c strtouq.c system.c tdelete.c tfind.c tsearch.c twalk.c \
|
strtoumax.c strtouq.c system.c tdelete.c tfind.c tsearch.c twalk.c \
|
||||||
unsetenv.c strfmon.c
|
unsetenv.c strfmon.c
|
||||||
|
.else
|
||||||
|
SRCS+= _env.c _rand48.c \
|
||||||
|
a64l.c abort.c atexit.c atof.c atoi.c atol.c atoll.c \
|
||||||
|
bsearch.c drand48.c exit.c \
|
||||||
|
getenv.c getopt.c getopt_long.c getsubopt.c \
|
||||||
|
hcreate.c heapsort.c imaxdiv.c insque.c jrand48.c l64a.c lldiv.c \
|
||||||
|
lcong48.c lrand48.c lsearch.c merge.c mi_vector_hash.c mrand48.c \
|
||||||
|
nrand48.c putenv.c qabs.c qdiv.c qsort.c posix_openpt.c pty.c \
|
||||||
|
radixsort.c rand.c rand_r.c random.c remque.c \
|
||||||
|
seed48.c setenv.c srand48.c strsuftoll.c \
|
||||||
|
strtoimax.c strtol.c strtoll.c strtoq.c strtoul.c strtoull.c \
|
||||||
|
strtoumax.c strtouq.c system.c tdelete.c tfind.c tsearch.c twalk.c \
|
||||||
|
unsetenv.c strfmon.c
|
||||||
|
.endif
|
||||||
|
|
||||||
# These are often replaced by MD .S versions
|
# These are often replaced by MD .S versions
|
||||||
SRCS+= abs.c labs.c llabs.c imaxabs.c
|
SRCS+= abs.c labs.c llabs.c imaxabs.c
|
||||||
|
|
|
@ -2,14 +2,20 @@
|
||||||
|
|
||||||
.PATH: ${.CURDIR}/termios
|
.PATH: ${.CURDIR}/termios
|
||||||
|
|
||||||
|
.if defined(__MINIX)
|
||||||
|
# Not supported by Minix: tcgetsid.c
|
||||||
SRCS+= cfgetispeed.c cfgetospeed.c cfmakeraw.c cfsetispeed.c cfsetospeed.c \
|
SRCS+= cfgetispeed.c cfgetospeed.c cfmakeraw.c cfsetispeed.c cfsetospeed.c \
|
||||||
cfsetspeed.c tcdrain.c tcflow.c tcflush.c tcgetattr.c tcgetpgrp.c \
|
cfsetspeed.c tcdrain.c tcflow.c tcflush.c tcgetattr.c tcgetpgrp.c \
|
||||||
tcsendbreak.c tcsetattr.c tcsetpgrp.c
|
tcsendbreak.c tcsetattr.c tcsetpgrp.c
|
||||||
|
.else
|
||||||
|
SRCS+= cfgetispeed.c cfgetospeed.c cfmakeraw.c cfsetispeed.c cfsetospeed.c \
|
||||||
|
cfsetspeed.c tcdrain.c tcflow.c tcflush.c tcgetattr.c tcgetpgrp.c \
|
||||||
|
tcgetsid.c tcsendbreak.c tcsetattr.c tcsetpgrp.c
|
||||||
|
.endif
|
||||||
|
|
||||||
# Not supported by Minix
|
|
||||||
# tcgetsid.c
|
|
||||||
|
|
||||||
MAN+= tcgetpgrp.3 tcsendbreak.3 tcsetattr.3 tcsetpgrp.3
|
|
||||||
|
MAN+= tcgetpgrp.3 tcgetsid.3 tcsendbreak.3 tcsetattr.3 tcsetpgrp.3
|
||||||
|
|
||||||
MLINKS+=tcsendbreak.3 tcdrain.3 tcsendbreak.3 tcflow.3 \
|
MLINKS+=tcsendbreak.3 tcdrain.3 tcsendbreak.3 tcflow.3 \
|
||||||
tcsendbreak.3 tcflush.3
|
tcsendbreak.3 tcflush.3
|
||||||
|
|
Loading…
Reference in a new issue