From: rufustfirefly Date: Wed, 20 Jun 2001 14:51:12 +0000 (+0000) Subject: Joe Clarke's fix for linux/quota.h checking, removed NO_DLFCN_H define X-Git-Tag: netatalk-1-5-rc1~364 X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a4f02baeb585398257884bf1b1c1ae340549b6b6;hp=adca12121c797853009813c25f4a60d69f910269;p=netatalk.git Joe Clarke's fix for linux/quota.h checking, removed NO_DLFCN_H define --- diff --git a/ChangeLog b/ChangeLog index b9fbe817..423d865f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,12 @@ -($Id: ChangeLog,v 1.49 2001-06-19 18:04:39 rufustfirefly Exp $) +($Id: ChangeLog,v 1.50 2001-06-20 14:51:12 rufustfirefly Exp $) + +2001-06-20 jeff b + * configure.in: check for linux/quota.h before enabling + QUOTACTL_WRAPPER (Joe Clarke) + + * acconfig.h, configure.in, include/atalk/util.h, + libatalk/util/module.c: removed NO_DLFCN_H in favor of + ifndef HAVE_DLFCN_H (Jeff) 2001-06-19 jeff b * etc/afpd/file.c, etc/afpd/parse_mtab.c, etc/afpd/parse_mtab.h, diff --git a/acconfig.h b/acconfig.h index 0557907f..4f19421a 100644 --- a/acconfig.h +++ b/acconfig.h @@ -21,7 +21,6 @@ #undef NEED_QUOTACTL_WRAPPER #undef NO_CRYPT_H #undef NO_DDP -#undef NO_DLFCN_H #undef NO_STRUCT_TM_GMTOFF #undef OPENSSL_DHX #undef SENDFILE_FLAVOR_BSD diff --git a/configure.in b/configure.in index bb8f5acb..431bca33 100644 --- a/configure.in +++ b/configure.in @@ -1,4 +1,4 @@ -dnl $Id: configure.in,v 1.90 2001-06-19 18:04:39 rufustfirefly Exp $ +dnl $Id: configure.in,v 1.91 2001-06-20 14:51:12 rufustfirefly Exp $ dnl configure.in for netatalk AC_INIT(bin/adv1tov2/adv1tov2.c) @@ -455,10 +455,19 @@ if test x"$this_os" = "xlinux"; then LDSHAREDFLAGS="-shared" dnl ----- check if we need the quotactl wrapper - AC_CHECK_HEADER(sys/quota.h,, + AC_CHECK_HEADER(sys/quota.h, + sys_quota=yes, + sys_quota=no + ) + AC_CHECK_HEADER(linux/quota.h, + linux_quota=yes, + linux_quota=no + ) + + if test "x$linux_quota" = "xno" -a "x$sys_quota" = "xno"; then AC_MSG_RESULT([enabling quotactl wrapper]) AC_DEFINE(NEED_QUOTACTL_WRAPPER) - ) + fi dnl ----- as far as I can tell, dbtob always does the wrong thing dnl ----- on every single version of linux I've ever played with. @@ -494,7 +503,7 @@ if test x"$this_os" = "xmacosx"; then AC_DEFINE(BSD4_4) AC_DEFINE(HAVE_BROKEN_CPP) AC_DEFINE(HAVE_2ARG_DBTOB) - AC_DEFINE(NO_DLFCN_H) + dnl AC_DEFINE(NO_DLFCN_H) AC_DEFINE(MACOSX_SERVER) dnl ----- Set -shared flag diff --git a/etc/afpd/quota.c b/etc/afpd/quota.c index c06a2130..98e817b7 100644 --- a/etc/afpd/quota.c +++ b/etc/afpd/quota.c @@ -1,5 +1,5 @@ /* - * $Id: quota.c,v 1.7 2001-06-01 13:59:46 rufustfirefly Exp $ + * $Id: quota.c,v 1.8 2001-06-20 14:51:13 rufustfirefly Exp $ * * Copyright (c) 1990,1993 Regents of The University of Michigan. * All Rights Reserved. See COPYRIGHT. @@ -7,7 +7,7 @@ #ifdef HAVE_CONFIG_H #include "config.h" -#endif +#endif /* HAVE_CONFIG_H */ #include #include @@ -31,7 +31,7 @@ int quotactl(int cmd, const char *special, int id, caddr_t addr) { return syscall(__NR_quotactl, cmd, special, id, addr); } -#endif +#endif /* NEED_QUOTACTL_WRAPPER */ #if defined(HAVE_SYS_MNTTAB_H) || defined(__svr4__) diff --git a/include/atalk/util.h b/include/atalk/util.h index 01309beb..ff623310 100644 --- a/include/atalk/util.h +++ b/include/atalk/util.h @@ -1,3 +1,7 @@ +/* + * $Id: util.h,v 1.2 2001-06-20 14:51:13 rufustfirefly Exp $ + */ + #ifndef _ATALK_UTIL_H #define _ATALK_UTIL_H 1 @@ -11,7 +15,6 @@ extern unsigned const char _diacasemap[], _dialowermap[]; extern char **getifacelist(void); extern void freeifacelist(char **); - #define diatolower(x) _dialowermap[(x)] #define diatoupper(x) _diacasemap[(x)] extern int atalk_aton __P((char *, struct at_addr *)); @@ -23,24 +26,26 @@ extern pid_t server_lock __P((char * /*program*/, char * /*file*/, int /*debug*/)); #define server_unlock(x) (unlink(x)) -#ifdef NO_DLFCN_H +#ifndef HAVE_DLFCN_H extern void *mod_open __P((const char *)); extern void *mod_symbol __P((void *, const char *)); extern void mod_close __P((void *)); #define mod_error() "" -#else +#else /* ! HAVE_DLFCN_H */ #include #ifndef RTLD_NOW #define RTLD_NOW 1 -#endif +#endif /* ! RTLD_NOW */ + #define mod_open(a) dlopen(a, RTLD_NOW) + #ifndef DLSYM_PREPEND_UNDERSCORE #define mod_symbol(a, b) dlsym(a, b) -#else +#else /* ! DLSYM_PREPEND_UNDERSCORE */ extern void *mod_symbol __P((void *, const char *)); -#endif +#endif /* ! DLSYM_PREPEND_UNDERSCORE */ #define mod_error() dlerror() #define mod_close(a) dlclose(a) -#endif +#endif /* ! HAVE_DLFCN_H */ #endif diff --git a/libatalk/util/module.c b/libatalk/util/module.c index afe2c027..984e7ff9 100644 --- a/libatalk/util/module.c +++ b/libatalk/util/module.c @@ -1,6 +1,10 @@ +/* + * $Id: module.c,v 1.3 2001-06-20 14:51:13 rufustfirefly Exp $ + */ + #ifdef HAVE_CONFIG_H #include "config.h" -#endif +#endif /* HAVE_CONFIG_H */ #include #include @@ -8,7 +12,7 @@ static int _mod_dummy; -#ifdef NO_DLFCN_H +#ifndef HAVE_DLFCN_H #ifdef MACOSX_SERVER #include @@ -41,9 +45,9 @@ void mod_close(void *module) { NSUnLinkModule(module, FALSE); } -#endif +#endif /* MACOSX_SERVER */ -#else +#else /* HAVE_DLFCN_H */ #ifdef DLSYM_PREPEND_UNDERSCORE #include @@ -67,4 +71,4 @@ void *mod_symbol(void *module, const char *name) return symbol; } #endif /* DLSYM_PREPEND_UNDERSCORE */ -#endif /* NO_DLFCN */ +#endif /* HAVE_DLFCN_H */