From 017ce5a50384e94cc1d0029dc2aa2c26827fa7a6 Mon Sep 17 00:00:00 2001 From: Ben Gras Date: Mon, 7 Jan 2013 19:10:08 +0000 Subject: [PATCH] libc, libutil: remove compat hacks --- lib/generateasm.mk | 32 ---------------------- lib/libc/Makefile | 2 -- lib/libc/arch/i386/gen/setjmp.S | 5 ++++ lib/libc/arch/i386/gen/sigsetjmp.S | 5 ++++ lib/libc/compat-minix/Makefile.inc | 38 --------------------------- lib/libc/db/hash/ndbmdatum.c | 8 ++++++ lib/libc/gen/alphasort.c | 4 +++ lib/libc/gen/fts.c | 8 ++++++ lib/libc/gen/getpwent.c | 9 +++++++ lib/libc/gen/glob.c | 5 ++++ lib/libc/gen/minix/utime.c | 4 +++ lib/libc/gen/pwcache.c | 4 +++ lib/libc/gen/readdir.c | 6 +++++ lib/libc/gen/scandir.c | 4 +++ lib/libc/gen/sigsetops.c | 8 ++++++ lib/libc/gen/time.c | 4 +++ lib/libc/gen/utmp.c | 4 +++ lib/libc/gen/utmpx.c | 12 +++++++++ lib/libc/locale/setlocale.c | 4 +++ lib/libc/stdlib/unsetenv.c | 4 +++ lib/libc/sys-minix/getdents.c | 4 +++ lib/libc/sys-minix/getitimer.c | 4 +++ lib/libc/sys-minix/mknod.c | 4 +++ lib/libc/sys-minix/nanosleep.c | 4 +++ lib/libc/sys-minix/select.c | 4 +++ lib/libc/sys-minix/setitimer.c | 4 +++ lib/libc/sys-minix/settimeofday.c | 4 +++ lib/libc/sys-minix/shmctl.c | 4 +++ lib/libc/sys-minix/sigaction.c | 4 +++ lib/libc/sys-minix/sigpending.c | 4 +++ lib/libc/sys-minix/sigprocmask.c | 4 +++ lib/libc/sys-minix/sigsuspend.c | 4 +++ lib/libc/time/difftime.c | 4 +++ lib/libc/time/localtime.c | 18 +++++++++++++ lib/libutil/Makefile | 4 +-- lib/libutil/compat-minix/Makefile.inc | 8 ------ lib/libutil/login.c | 2 ++ lib/libutil/login_cap.c | 3 +++ lib/libutil/loginx.c | 2 ++ lib/libutil/passwd.c | 4 +++ 40 files changed, 180 insertions(+), 83 deletions(-) delete mode 100644 lib/generateasm.mk delete mode 100644 lib/libc/compat-minix/Makefile.inc delete mode 100644 lib/libutil/compat-minix/Makefile.inc diff --git a/lib/generateasm.mk b/lib/generateasm.mk deleted file mode 100644 index 0b2206364..000000000 --- a/lib/generateasm.mk +++ /dev/null @@ -1,32 +0,0 @@ -ORIGFUNC= ${.PREFIX:S/^compat//} -RENAMEDFUNC=${.PREFIX:S/^compat__//:C/([0-9]{2})$//} -.if (${MACHINE_ARCH} == "i386") -FUNCTYPE= @function -PICJMP= jmpl *PIC_PLT(${ORIGFUNC}) -JMP= jmp ${ORIGFUNC} -.elif (${MACHINE_ARCH} == "arm") -FUNCTYPE= %%function -PICJMP= bl PIC_SYM(${ORIGFUNC}, PLT) -JMP= b ${ORIGFUNC} -.endif - -${ASM}: - ${_MKTARGET_CREATE} - printf '/* MINIX3 */ \n\ -/* \n\ -* Compatibility jump table for renamed symbols. \n\ -* \n\ -* DO NOT EDIT: this file is automatically generated. \n\ -*/ \n\ -#include \n\ -.global ${RENAMEDFUNC}; \n\ -.global ${ORIGFUNC}; \n\ -.type ${RENAMEDFUNC},${FUNCTYPE} \n\ -${RENAMEDFUNC}: \n\ -#ifdef PIC \n\ -${PICJMP} \n\ -#else \n\ -${JMP} \n\ -#endif \n\ -\n ' >${.TARGET} - diff --git a/lib/libc/Makefile b/lib/libc/Makefile index 83559c1c9..125b66bfa 100644 --- a/lib/libc/Makefile +++ b/lib/libc/Makefile @@ -55,8 +55,6 @@ COMPATDIR=${.CURDIR}/compat .else SUBDIR+= pkgconfig .include -COMPATDIR= ${.CURDIR}/compat-minix -.include "${.CURDIR}/compat-minix/Makefile.inc" .endif .endif diff --git a/lib/libc/arch/i386/gen/setjmp.S b/lib/libc/arch/i386/gen/setjmp.S index 4c528fbef..5c271212a 100644 --- a/lib/libc/arch/i386/gen/setjmp.S +++ b/lib/libc/arch/i386/gen/setjmp.S @@ -111,3 +111,8 @@ ENTRY(__longjmp14) incl %eax 1: movl %ecx,0(%esp) ret + +#ifdef __minix +.weak longjmp; sigsetjmp = __longjmp14 +.weak setjmp; sigsetjmp = __setjmp14 +#endif diff --git a/lib/libc/arch/i386/gen/sigsetjmp.S b/lib/libc/arch/i386/gen/sigsetjmp.S index 133d41b86..12769d16c 100644 --- a/lib/libc/arch/i386/gen/sigsetjmp.S +++ b/lib/libc/arch/i386/gen/sigsetjmp.S @@ -111,3 +111,8 @@ ENTRY(__siglongjmp14) incl %eax 3: movl %ecx,0(%esp) ret + +#ifdef __minix +.weak sigsetjmp; sigsetjmp = __sigsetjmp14 +.weak siglongjmp; siglongjmp = __siglongjmp14 +#endif diff --git a/lib/libc/compat-minix/Makefile.inc b/lib/libc/compat-minix/Makefile.inc deleted file mode 100644 index b5083f9bd..000000000 --- a/lib/libc/compat-minix/Makefile.inc +++ /dev/null @@ -1,38 +0,0 @@ - -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__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__stat50.S compat__fstat50.S compat__lstat50.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} -CLEANFILES+= ${ASM} - -.include "../generateasm.mk" - diff --git a/lib/libc/db/hash/ndbmdatum.c b/lib/libc/db/hash/ndbmdatum.c index 75c6ab87c..904120e6d 100644 --- a/lib/libc/db/hash/ndbmdatum.c +++ b/lib/libc/db/hash/ndbmdatum.c @@ -156,3 +156,11 @@ dbm_store(DBM *db, datum key, datum data, int flags) return ((db->put)(db, &dbtkey, &dbtdata, (u_int)((flags == DBM_INSERT) ? R_NOOVERWRITE : 0))); } + +#ifdef __minix +__weak_alias(dbm_delete, __dbm_delete13) +__weak_alias(dbm_fetch, __dbm_fetch13) +__weak_alias(dbm_firstkey, __dbm_firstkey13) +__weak_alias(dbm_nextkey, __dbm_nextkey13) +__weak_alias(dbm_store, __dbm_store13) +#endif diff --git a/lib/libc/gen/alphasort.c b/lib/libc/gen/alphasort.c index c8310d425..4ea5dba4e 100644 --- a/lib/libc/gen/alphasort.c +++ b/lib/libc/gen/alphasort.c @@ -57,3 +57,7 @@ alphasort(const void *d1, const void *d2) return (strcmp((*(const struct dirent *const *)d1)->d_name, (*(const struct dirent *const *)d2)->d_name)); } + +#ifdef __minix +__weak_alias(alphasort, __alphasort30) +#endif diff --git a/lib/libc/gen/fts.c b/lib/libc/gen/fts.c index a6e2cb1e0..dadc9c2e4 100644 --- a/lib/libc/gen/fts.c +++ b/lib/libc/gen/fts.c @@ -1225,3 +1225,11 @@ bail: } return ret; } + +#ifdef __minix +__weak_alias(fts_children, __fts_children60) +__weak_alias(fts_close, __fts_close60) +__weak_alias(fts_open, __fts_open60) +__weak_alias(fts_read, __fts_read60) +__weak_alias(fts_set, __fts_set60) +#endif diff --git a/lib/libc/gen/getpwent.c b/lib/libc/gen/getpwent.c index 44abb45fd..64de868c2 100644 --- a/lib/libc/gen/getpwent.c +++ b/lib/libc/gen/getpwent.c @@ -2578,3 +2578,12 @@ setpwent(void) __nsdefaultcompat_forceall); mutex_unlock(&_pwmutex); } + +#ifdef __minix +__weak_alias(getpwent, __getpwent50) +__weak_alias(getpwent_r, __getpwent_r50) +__weak_alias(getpwnam, __getpwnam50) +__weak_alias(getpwnam_r, __getpwnam_r50) +__weak_alias(getpwuid, __getpwuid50) +__weak_alias(getpwuid_r, __getpwuid_r50) +#endif diff --git a/lib/libc/gen/glob.c b/lib/libc/gen/glob.c index c1083f90b..71631b7df 100644 --- a/lib/libc/gen/glob.c +++ b/lib/libc/gen/glob.c @@ -1168,3 +1168,8 @@ qprintf(const char *str, Char *s) (void)printf("\n"); } #endif + +#ifdef __minix +__weak_alias(glob, __glob30) +__weak_alias(globfree, __globfree30) +#endif diff --git a/lib/libc/gen/minix/utime.c b/lib/libc/gen/minix/utime.c index 999174496..df212b90d 100644 --- a/lib/libc/gen/minix/utime.c +++ b/lib/libc/gen/minix/utime.c @@ -22,3 +22,7 @@ int utime(const char *name, const struct utimbuf *timp) m.m2_p1 = (char *) __UNCONST(name); return(_syscall(VFS_PROC_NR, UTIME, &m)); } + +#ifdef __minix +__weak_alias(utime, __utime50) +#endif diff --git a/lib/libc/gen/pwcache.c b/lib/libc/gen/pwcache.c index 2caf96a51..bda04a8e4 100644 --- a/lib/libc/gen/pwcache.c +++ b/lib/libc/gen/pwcache.c @@ -641,3 +641,7 @@ main(int argc, char *argv[]) } #endif /* TEST_PWCACHE */ #endif /* !HAVE_PWCACHE_USERDB */ + +#ifdef __minix +__weak_alias(pwcache_userdb, __pwcache_userdb50) +#endif diff --git a/lib/libc/gen/readdir.c b/lib/libc/gen/readdir.c index 368a96367..277b70938 100644 --- a/lib/libc/gen/readdir.c +++ b/lib/libc/gen/readdir.c @@ -149,3 +149,9 @@ readdir_r(dirp, entry, result) return (0); } + +#ifdef __minix +__weak_alias(readdir, __readdir30) +__weak_alias(readdir_r, __readdir_r30) +__weak_alias(readdir_unlocked, ___readdir_unlocked50) +#endif diff --git a/lib/libc/gen/scandir.c b/lib/libc/gen/scandir.c index 74af88f77..614b02338 100644 --- a/lib/libc/gen/scandir.c +++ b/lib/libc/gen/scandir.c @@ -153,3 +153,7 @@ bad: (void)closedir(dirp); return -1; } + +#ifdef __minix +__weak_alias(scandir, __scandir30) +#endif diff --git a/lib/libc/gen/sigsetops.c b/lib/libc/gen/sigsetops.c index 5b227355a..5dfa50a85 100644 --- a/lib/libc/gen/sigsetops.c +++ b/lib/libc/gen/sigsetops.c @@ -44,3 +44,11 @@ __RCSID("$NetBSD: sigsetops.c,v 1.16 2010/07/31 00:04:43 joerg Exp $"); #include #include + +#ifdef __minix +__weak_alias(sigaddset, __sigaddset14) +__weak_alias(sigdelset, __sigdelset14) +__weak_alias(sigemptyset, __sigemptyset14) +__weak_alias(sigfillset, __sigfillset14) +__weak_alias(sigismember, __sigismember14) +#endif diff --git a/lib/libc/gen/time.c b/lib/libc/gen/time.c index e0df22f85..f31222408 100644 --- a/lib/libc/gen/time.c +++ b/lib/libc/gen/time.c @@ -55,3 +55,7 @@ time(time_t *t) *t = tt.tv_sec; return tt.tv_sec; } + +#ifdef __minix +__weak_alias(time, __time50) +#endif diff --git a/lib/libc/gen/utmp.c b/lib/libc/gen/utmp.c index b83a3c0c7..2bd00eff9 100644 --- a/lib/libc/gen/utmp.c +++ b/lib/libc/gen/utmp.c @@ -104,3 +104,7 @@ utmpname(const char *fname) endutent(); return 1; } + +#ifdef __minix +__weak_alias(getutent, __getutent50) +#endif diff --git a/lib/libc/gen/utmpx.c b/lib/libc/gen/utmpx.c index 63c0e1f07..2ba5bd63d 100644 --- a/lib/libc/gen/utmpx.c +++ b/lib/libc/gen/utmpx.c @@ -511,3 +511,15 @@ updlastlogx(const char *fname, uid_t uid, struct lastlogx *ll) (db->close)(db); return error; } + +#ifdef __minix +__weak_alias(getlastlogx, __getlastlogx50) +__weak_alias(getutmp, __getutmp50) +__weak_alias(getutmpx, __getutmpx50) +__weak_alias(getutxent, __getutxent50) +__weak_alias(getutxid, __getutxid50) +__weak_alias(getutxline, __getutxline50) +__weak_alias(pututxline, __pututxline50) +__weak_alias(updlastlogx, __updlastlogx50) +__weak_alias(updwtmpx, __updwtmpx50) +#endif diff --git a/lib/libc/locale/setlocale.c b/lib/libc/locale/setlocale.c index b8d4129f2..b755dba36 100644 --- a/lib/libc/locale/setlocale.c +++ b/lib/libc/locale/setlocale.c @@ -171,3 +171,7 @@ setlocale(int category, const char *locale) __mb_len_max_runtime = MB_LEN_MAX; return __setlocale(category, locale); } + +#ifdef __minix +__weak_alias(setlocale, __setlocale50) +#endif diff --git a/lib/libc/stdlib/unsetenv.c b/lib/libc/stdlib/unsetenv.c index 5796f3861..eb1c21ff9 100644 --- a/lib/libc/stdlib/unsetenv.c +++ b/lib/libc/stdlib/unsetenv.c @@ -104,3 +104,7 @@ unsetenv(const char *name) (void)__unlockenv(); return 0; } + +#ifdef __minix +__weak_alias(unsetenv, __unsetenv13) +#endif diff --git a/lib/libc/sys-minix/getdents.c b/lib/libc/sys-minix/getdents.c index 6e258e9f5..58a696b2e 100644 --- a/lib/libc/sys-minix/getdents.c +++ b/lib/libc/sys-minix/getdents.c @@ -13,3 +13,7 @@ ssize_t getdents(int fd, char *buffer, size_t nbytes) m.m1_p1 = (char *) buffer; return _syscall(VFS_PROC_NR, GETDENTS, &m); } + +#ifdef __minix +__weak_alias(getdents, __getdents30) +#endif diff --git a/lib/libc/sys-minix/getitimer.c b/lib/libc/sys-minix/getitimer.c index bb8921027..7407ce702 100644 --- a/lib/libc/sys-minix/getitimer.c +++ b/lib/libc/sys-minix/getitimer.c @@ -18,3 +18,7 @@ int getitimer(int which, struct itimerval *value) return _syscall(PM_PROC_NR, ITIMER, &m); } + +#ifdef __minix +__weak_alias(getitimer, __getitimer50) +#endif diff --git a/lib/libc/sys-minix/mknod.c b/lib/libc/sys-minix/mknod.c index 70c7b8705..885e3a245 100644 --- a/lib/libc/sys-minix/mknod.c +++ b/lib/libc/sys-minix/mknod.c @@ -18,3 +18,7 @@ int mknod(const char *name, mode_t mode, dev_t dev) m.m1_p2 = (char *) ((int) 0); /* obsolete size field */ return(_syscall(VFS_PROC_NR, MKNOD, &m)); } + +#ifdef __minix +__weak_alias(mknod, __mknod50) +#endif diff --git a/lib/libc/sys-minix/nanosleep.c b/lib/libc/sys-minix/nanosleep.c index a8cc51406..5e1f4e3d5 100644 --- a/lib/libc/sys-minix/nanosleep.c +++ b/lib/libc/sys-minix/nanosleep.c @@ -90,3 +90,7 @@ int nanosleep(const struct timespec *rqtp, struct timespec *rmtp) return r; } + +#ifdef __minix +__weak_alias(nanosleep, __nanosleep50) +#endif diff --git a/lib/libc/sys-minix/select.c b/lib/libc/sys-minix/select.c index cc84b427d..c54333992 100644 --- a/lib/libc/sys-minix/select.c +++ b/lib/libc/sys-minix/select.c @@ -20,3 +20,7 @@ int select(int nfds, return (_syscall(VFS_PROC_NR, SELECT, &m)); } + +#ifdef __minix +__weak_alias(select, __select50) +#endif diff --git a/lib/libc/sys-minix/setitimer.c b/lib/libc/sys-minix/setitimer.c index dfe86703f..f85a2292e 100644 --- a/lib/libc/sys-minix/setitimer.c +++ b/lib/libc/sys-minix/setitimer.c @@ -24,3 +24,7 @@ int setitimer(int which, const struct itimerval *__restrict value, return _syscall(PM_PROC_NR, ITIMER, &m); } + +#ifdef __minix +__weak_alias(setitimer, __setitimer50) +#endif diff --git a/lib/libc/sys-minix/settimeofday.c b/lib/libc/sys-minix/settimeofday.c index 2e47e9eed..602c952c5 100644 --- a/lib/libc/sys-minix/settimeofday.c +++ b/lib/libc/sys-minix/settimeofday.c @@ -13,3 +13,7 @@ int settimeofday(const struct timeval *tp, const void *tzp) /* Ignore time zones */ return stime(&sec); } + +#ifdef __minix +__weak_alias(settimeofday, __settimeofday50) +#endif diff --git a/lib/libc/sys-minix/shmctl.c b/lib/libc/sys-minix/shmctl.c index 9ae6a5c97..656d19236 100644 --- a/lib/libc/sys-minix/shmctl.c +++ b/lib/libc/sys-minix/shmctl.c @@ -40,3 +40,7 @@ int shmctl(int shmid, int cmd, struct shmid_ds *buf) return m.SHMCTL_RET; return r; } + +#ifdef __minix +__weak_alias(shmctl, __shmctl50) +#endif diff --git a/lib/libc/sys-minix/sigaction.c b/lib/libc/sys-minix/sigaction.c index 8999f5911..50501465a 100644 --- a/lib/libc/sys-minix/sigaction.c +++ b/lib/libc/sys-minix/sigaction.c @@ -18,3 +18,7 @@ int sigaction(int sig, const struct sigaction *act, struct sigaction *oact) return(_syscall(PM_PROC_NR, SIGACTION, &m)); } + +#ifdef __minix +__weak_alias(sigaction, __sigaction14) +#endif diff --git a/lib/libc/sys-minix/sigpending.c b/lib/libc/sys-minix/sigpending.c index 817505f6a..f701cfce7 100644 --- a/lib/libc/sys-minix/sigpending.c +++ b/lib/libc/sys-minix/sigpending.c @@ -13,3 +13,7 @@ sigset_t *set; *set = (sigset_t) m.m2_l1; return(m.m_type); } + +#ifdef __minix +__weak_alias(sigpending, __sigpending14) +#endif diff --git a/lib/libc/sys-minix/sigprocmask.c b/lib/libc/sys-minix/sigprocmask.c index e742ac620..f4462a948 100644 --- a/lib/libc/sys-minix/sigprocmask.c +++ b/lib/libc/sys-minix/sigprocmask.c @@ -22,3 +22,7 @@ sigset_t *oset; if (oset != (sigset_t *) NULL) *oset = (sigset_t) (m.m2_l1); return(m.m_type); } + +#ifdef __minix +__weak_alias(sigprocmask, __sigprocmask14) +#endif diff --git a/lib/libc/sys-minix/sigsuspend.c b/lib/libc/sys-minix/sigsuspend.c index a9425eef9..c7948ca26 100644 --- a/lib/libc/sys-minix/sigsuspend.c +++ b/lib/libc/sys-minix/sigsuspend.c @@ -12,3 +12,7 @@ const sigset_t *set; m.m2_l1 = (long) *set; return(_syscall(PM_PROC_NR, SIGSUSPEND, &m)); } + +#ifdef __minix +__weak_alias(sigsuspend, __sigsuspend14) +#endif diff --git a/lib/libc/time/difftime.c b/lib/libc/time/difftime.c index 648f8fc79..75cb18e51 100644 --- a/lib/libc/time/difftime.c +++ b/lib/libc/time/difftime.c @@ -72,3 +72,7 @@ const time_t time0; return -(double) ((unsigned long) time0 + (unsigned long) (-(time1 + 1)) + 1); } + +#ifdef __minix +__weak_alias(difftime, __difftime50) +#endif diff --git a/lib/libc/time/localtime.c b/lib/libc/time/localtime.c index f1be999a7..9323a78fd 100644 --- a/lib/libc/time/localtime.c +++ b/lib/libc/time/localtime.c @@ -2207,3 +2207,21 @@ posix2time(time_t t) } #endif /* defined STD_INSPIRED */ + +#ifdef __minix +__weak_alias(gmtime, __gmtime50) +__weak_alias(gmtime_r, __gmtime_r50) +__weak_alias(offtime, __offtime50) +__weak_alias(offtime_r, __offtime_r50) +__weak_alias(time2posix, __time2posix50) +__weak_alias(time2posix_z, __time2posix_z50) +__weak_alias(timegm, __timegm50) +__weak_alias(timelocal, __timelocal50) +__weak_alias(timelocal_z, __timelocal_z50) +__weak_alias(timeoff, __timeoff50) +__weak_alias(tzalloc, __tzalloc50) +__weak_alias(tzfree, __tzfree50) +__weak_alias(tzgetname, __tzgetname50) +__weak_alias(tzset, __tzset50) +__weak_alias(tzsetwall, __tzsetwall50) +#endif diff --git a/lib/libutil/Makefile b/lib/libutil/Makefile index 8c178b38d..87092b565 100644 --- a/lib/libutil/Makefile +++ b/lib/libutil/Makefile @@ -59,9 +59,7 @@ MAN= efun.3 getbootfile.3 \ YPREFIX=__pd .PATH: ${NETBSDSRCDIR}/lib/libc/gen -.if defined(__MINIX) -.include "compat-minix/Makefile.inc" -.else +.if !defined(__MINIX) .include "compat/Makefile.inc" .endif diff --git a/lib/libutil/compat-minix/Makefile.inc b/lib/libutil/compat-minix/Makefile.inc deleted file mode 100644 index ceb427b46..000000000 --- a/lib/libutil/compat-minix/Makefile.inc +++ /dev/null @@ -1,8 +0,0 @@ - -ASM= compat__login_getpwclass50.S compat__login50.S compat__loginx50.S \ - compat__pw_copy50.S compat__pw_copyx50.S \ - compat__pw_getpwconf50.S compat__setusercontext50.S -SRCS+= ${ASM} -CLEANFILES+= ${ASM} - -.include "../generateasm.mk" diff --git a/lib/libutil/login.c b/lib/libutil/login.c index 5068a808f..38d0ca9ac 100644 --- a/lib/libutil/login.c +++ b/lib/libutil/login.c @@ -68,3 +68,5 @@ login(const struct utmp *ut) (void)close(fd); } } + +__weak_alias(login, __login50) diff --git a/lib/libutil/login_cap.c b/lib/libutil/login_cap.c index 0daab2c3e..27d07fe50 100644 --- a/lib/libutil/login_cap.c +++ b/lib/libutil/login_cap.c @@ -994,3 +994,6 @@ multiply(u_quad_t n1, u_quad_t n2) return (m); } + +__weak_alias(login_getpwclass, __login_getpwclass50) +__weak_alias(setusercontext, __setusercontext50) diff --git a/lib/libutil/loginx.c b/lib/libutil/loginx.c index 3e1cc12b1..ee2c6b3ae 100644 --- a/lib/libutil/loginx.c +++ b/lib/libutil/loginx.c @@ -52,3 +52,5 @@ loginx(const struct utmpx *ut) (void)pututxline(ut); (void)updwtmpx(_PATH_WTMPX, ut); } + +__weak_alias(loginx, __loginx50) diff --git a/lib/libutil/passwd.c b/lib/libutil/passwd.c index 02c589533..5c2055596 100644 --- a/lib/libutil/passwd.c +++ b/lib/libutil/passwd.c @@ -661,3 +661,7 @@ pw_getpwconf(char *data, size_t max, const struct passwd *pwd, pw_getconf(data, max, "default", option); } } + +__weak_alias(pw_copy, __pw_copy50) +__weak_alias(pw_copyx, __pw_copyx50) +__weak_alias(pw_getpwconf, __pw_getpwconf50) -- 2.44.0