WARNS= 4
LIB= util
CPPFLAGS+=-DLIBC_SCCS -I${.CURDIR}
-SRCS= efun.c getbootfile.c \
- getmntopts.c \
- login.c loginx.c login_tty.c logout.c logoutx.c \
- logwtmp.c logwtmpx.c opendisk.c \
+.if !defined(__MINIX)
+SRCS+= efun.c getbootfile.c getlabelsector.c getmaxpartitions.c \
+ getmntopts.c getrawpartition.c \
+ disklabel_dkcksum.c disklabel_scan.c \
+ if_media.c \
+ login.c loginx.c login_cap.c login_tty.c logout.c logoutx.c \
+ logwtmp.c logwtmpx.c opendisk.c parsedate.y \
passwd.c pw_scan.c pidfile.c pidlock.c pty.c \
raise_default_signal.c \
- secure_path.c snprintb.c \
- ttyaction.c login_cap.c stat_flags.c \
- #disklabel_dkcksum.c disklabel_scan.c \
- #if_media.c \
- #sockaddr_snprintf.c
- #getlabelsector.c
- #getmaxpartitions.c
- #getrawpartition.c
- #ttymsg.c
- #parsedate.y
+ secure_path.c sockaddr_snprintf.c stat_flags.c \
+ ttyaction.c ttymsg.c \
MAN= efun.3 getbootfile.3 getlabelsector.3 getmaxpartitions.3 \
getmntopts.3 \
snprintb.3 sockaddr_snprintf.3 stat_flags.3 ttyaction.3 \
ttymsg.3 util.3
+.else
+SRCS+= efun.c getbootfile.c \
+ getmntopts.c \
+ login.c loginx.c login_cap.c login_tty.c logout.c logoutx.c \
+ logwtmp.c logwtmpx.c opendisk.c \
+ passwd.c pw_scan.c pidfile.c pidlock.c pty.c \
+ raise_default_signal.c \
+ secure_path.c stat_flags.c \
+ ttyaction.c \
+
+MAN= efun.3 getbootfile.3 \
+ getmntopts.3 \
+ login.3 login_cap.3 loginx.3 \
+ opendisk.3 openpty.3 pidfile.3 pidlock.3 \
+ pw_getconf.3 pw_init.3 pw_lock.3 secure_path.3 \
+ raise_default_signal.3 \
+ snprintb.3 stat_flags.3 ttyaction.3 \
+ util.3
+.endif
+
YPREFIX=__pd
#.PATH: ${NETBSDSRCDIR}/lib/libc/gen
.PATH: ${NETBSDSRCDIR}/lib/nbsd_libc/gen
-#.include "compat/Makefile.inc"
+.if defined(__MINIX)
+.include "compat-minix/Makefile.inc"
+.else
+.include "compat/Makefile.inc"
+.endif
+.if !defined(__MINIX)
MLINKS+=getlabelsector.3 getlabeloffset.3
+.endif
MLINKS+=login.3 logout.3
MLINKS+=login.3 logwtmp.3
MLINKS+=login_cap.3 login_getclass.3
--- /dev/null
+
+ASM= compat__opendir230.S compat__alphasort30.S compat__ctime50.S \
+ compat__ctime_r50.S compat__ctime_rz50.S compat__dbm_delete13.S \
+ compat__dbm_fetch13.S compat__dbm_firstkey13.S \
+ compat__dbm_nextkey13.S compat__dbm_store13.S compat__difftime50.S \
+ compat__fts_children60.S compat__fts_close60.S compat__fts_open60.S \
+ compat__fts_read60.S compat__fts_set60.S compat__getdents30.S \
+ compat__getitimer50.S compat__getlastlogx50.S compat__getpwent50.S \
+ compat__getpwent_r50.S compat__getpwnam50.S compat__getpwnam_r50.S \
+ compat__getpwuid50.S compat__getpwuid_r50.S compat__getutent50.S \
+ compat__getutmp50.S compat__getutmpx50.S compat__getutxent50.S \
+ compat__getutxid50.S compat__getutxline50.S compat__glob30.S \
+ compat__globfree30.S compat__gmtime50.S compat__gmtime_r50.S \
+ compat__localtime50.S compat__localtime_r50.S compat__localtime_rz50.S \
+ compat__longjmp14.S compat__mknod50.S compat__mktime50.S \
+ compat__mktime_z50.S compat__nanosleep50.S compat__offtime50.S \
+ compat__offtime_r50.S compat__opendir30.S compat__posix2time50.S \
+ compat__posix2time_z50.S compat__pututxline50.S \
+ compat__pwcache_userdb50.S compat__readdir30.S compat__readdir_r30.S \
+ compat___readdir_unlocked50.S compat__scandir30.S compat__select50.S \
+ compat__setitimer50.S compat__setjmp14.S compat__setlocale50.S \
+ compat__settimeofday50.S compat__shmctl50.S compat__sigaction14.S \
+ compat__sigaddset14.S compat__sigdelset14.S compat__sigemptyset14.S \
+ compat__sigfillset14.S compat__sigismember14.S compat__siglongjmp14.S \
+ compat__sigpending14.S compat__sigprocmask14.S compat__sigsetjmp14.S \
+ compat__sigsuspend14.S compat__time50.S compat__time2posix50.S \
+ compat__time2posix_z50.S compat__timegm50.S compat__timelocal50.S \
+ compat__timelocal_z50.S compat__timeoff50.S compat__tzalloc50.S \
+ compat__tzfree50.S compat__tzgetname50.S compat__tzset50.S \
+ compat__tzsetwall50.S compat__unsetenv13.S compat__unvis13.S \
+ compat__updlastlogx50.S compat__updwtmpx50.S compat__utime50.S \
+ compat__vfork14.S
+SRCS+= ${ASM}
+
+${ASM}:
+ ${_MKTARGET_CREATE}
+ printf '/* MINIX3 */\n\n/*\n * Compatibility jump table for renamed symbols.\n *\n * DO NOT EDIT: this file is automatically generated.\n */\n.global ${.PREFIX:S/^compat__//:C/([0-9]{2})$//};\n.global ${.PREFIX:S/^compat//};\n${.PREFIX:S/^compat__//:C/([0-9]{2})$//}: jmp ${.PREFIX:S/^compat//}\n' >${.TARGET}
+
+++ /dev/null
-
-#define MY_ALIAS(alias, orig) \
- .global alias; \
- .global orig; \
- alias: jmp orig
-
-MY_ALIAS(mknod, __mknod50)
-MY_ALIAS(ctime, __ctime50)
-MY_ALIAS(difftime, __difftime50)
-MY_ALIAS(gmtime, __gmtime50)
-MY_ALIAS(localtime, __locatime50)
-MY_ALIAS(time, __time50)
-MY_ALIAS(mktime, __mktime50)
-MY_ALIAS(tzset, __tzset50)
-MY_ALIAS(getitimer, __getitimer50)
-MY_ALIAS(setitimer, __setitimer50)
-MY_ALIAS(settimeofday, __settimeofday50)
-MY_ALIAS(nanosleep, __nanosleep50)
-MY_ALIAS(ctime_r, __ctime_r50)
-MY_ALIAS(gmtime_r, __gmtime_r50)
-MY_ALIAS(localtime_r, __localtime_r50)
-MY_ALIAS(time2posix, __time2posix50)
-MY_ALIAS(posix2time, __posix2time50)
-MY_ALIAS(timegm, __timegm50)
-MY_ALIAS(timeoff, __timeoff50)
-MY_ALIAS(timelocal, __timelocal50)
-MY_ALIAS(offtime, __offtime50)
-MY_ALIAS(tzsetwall, __tzsetwall50)
-MY_ALIAS(offtime_r, __offtime_r50)
-MY_ALIAS(localtime_rz, __localtime_rz50)
-MY_ALIAS(ctime_rz, __ctime_rz50)
-MY_ALIAS(mktime_z, __mktime_z50)
-MY_ALIAS(timelocal_z, __timelocal_z50)
-MY_ALIAS(time2posix_z, __time2posix_z50)
-MY_ALIAS(posix2time_z, __posix2time_z50)
-MY_ALIAS(tzalloc, __tzalloc50)
-MY_ALIAS(tzfree, __tzfree50)
-MY_ALIAS(tzgetname, __tzgetname50)
-MY_ALIAS(select, __select50)
-MY_ALIAS(opendir, __opendir30)
-MY_ALIAS(readdir, __readdir30)
-MY_ALIAS(readdir_r, __readdir_r30)
-MY_ALIAS(__opendir2, __opendir230)
-MY_ALIAS(scandir, __scandir30)
-MY_ALIAS(getdents, __getdents30)
-MY_ALIAS(alphasort, __alphasort30)
-MY_ALIAS(fts_children, __fts_children60)
-MY_ALIAS(fts_close, __fts_close60)
-MY_ALIAS(fts_open, __fts_open60)
-MY_ALIAS(fts_read, __fts_read60)
-MY_ALIAS(fts_set, __fts_set60)
-MY_ALIAS(glob, __glob30)
-MY_ALIAS(globfree, __globfree30)
-MY_ALIAS(dbm_delete, __dbm_delete13)
-MY_ALIAS(dbm_fetch, __dbm_fetch13)
-MY_ALIAS(dbm_firstkey, __dbm_firstkey13)
-MY_ALIAS(dbm_nextkey, __dbm_nextkey13)
-MY_ALIAS(dbm_store, __dbm_store13)
-MY_ALIAS(setjmp, __setjmp14)
-MY_ALIAS(longjmp, __longjmp14)
-MY_ALIAS(setlocale, __setlocale50)
-MY_ALIAS(shmctl, __shmctl50)
-MY_ALIAS(sigsetjmp, __sigsetjmp14)
-MY_ALIAS(siglongjmp, __siglongjmp14)
-MY_ALIAS(sigaction, __sigaction14)
-MY_ALIAS(sigaddset, __sigaddset14)
-MY_ALIAS(sigdelset, __sigdelset14)
-MY_ALIAS(sigemptyset, __sigemptyset14)
-MY_ALIAS(sigfillset, __sigfillset14)
-MY_ALIAS(sigismember, __sigismember14)
-MY_ALIAS(sigpending, __sigpending14)
-MY_ALIAS(sigprocmask, __sigprocmask14)
-MY_ALIAS(sigsuspend, __sigsuspend14)
-MY_ALIAS(unsetenv, __unsetenv13)
-MY_ALIAS(getutent, __getutent50)
-MY_ALIAS(getutxent, __getutxent50)
-MY_ALIAS(getutxid, __getutxid50)
-MY_ALIAS(getutxline, __getutxline50)
-MY_ALIAS(pututxline, __pututxline50)
-MY_ALIAS(updwtmpx, __updwtmpx50)
-MY_ALIAS(getlastlogx, __getlastlogx50)
-MY_ALIAS(updlastlogx, __updlastlogx50)
-MY_ALIAS(getutmp, __getutmp50)
-MY_ALIAS(getutmpx, __getutmpx50)
-MY_ALIAS(utime, __utime50)
-MY_ALIAS(unvis, __unvis13)
-MY_ALIAS(pwcache_userdb, __pwcache_userdb50)
-MY_ALIAS(getpwnam, __getpwnam50)