-dnl $Id: configure.in,v 1.243 2010-04-12 14:28:42 franklahm Exp $
+dnl $Id: configure.in,v 1.244 2010-04-13 08:05:06 franklahm Exp $
dnl configure.in for netatalk
AC_INIT(etc/afpd/main.c)
LIBS="$LIBS -L\$(top_srcdir)/libatalk"
CFLAGS="-I\$(top_srcdir)/include $CFLAGS -I\$(top_srcdir)/sys"
+AC_DEFINE(OPEN_NOFOLLOW_ERRNO, ELOOP, errno returned by open with O_NOFOLLOW)
+
dnl --------------------------------------------------------------------------
dnl specific configuration comes in here:
dnl --------------------------------------------------------------------------
AC_DEFINE(BSD4_4, 1, [BSD compatiblity macro])
AC_DEFINE(FREEBSD, 1, [Define if OS is FreeBSD])
AC_DEFINE(SENDFILE_FLAVOR_BSD, 1, [Define if the sendfile() function uses BSD semantics])
+ AC_DEFINE(OPEN_NOFOLLOW_ERRNO, EMLINK, errno returned by open with O_NOFOLLOW)
fi
dnl ----- HP-UX 11 specific -----
AC_MSG_RESULT([ * NetBSD specific configuration])
AC_DEFINE(BSD4_4, 1, [BSD compatiblity macro])
AC_DEFINE(NETBSD, 1, [Define if OS is NetBSD])
+ AC_DEFINE(OPEN_NOFOLLOW_ERRNO, EFTYPE, errno returned by open with O_NOFOLLOW)
+
CFLAGS="-I\$(top_srcdir)/sys/netbsd $CFLAGS"
need_dash_r=yes
/*
- * $Id: ad_open.c,v 1.73 2010-03-30 12:55:26 franklahm Exp $
+ * $Id: ad_open.c,v 1.74 2010-04-13 08:05:06 franklahm Exp $
*
* Copyright (c) 1999 Adrian Sun (asun@u.washington.edu)
* Copyright (c) 1990,1991 Regents of The University of Michigan.
hoflags = oflags;
ad->ad_data_fork.adf_fd = open( path, hoflags | O_NOFOLLOW, admode );
}
- if (ad->ad_data_fork.adf_fd == -1 && errno == ELOOP) {
+ if (ad->ad_data_fork.adf_fd == -1 && errno == OPEN_NOFOLLOW_ERRNO) {
int lsz;
ad->ad_data_fork.adf_syml = malloc(PATH_MAX+1);
/*
- $Id: ea_sys.c,v 1.7 2010-04-03 07:11:36 franklahm Exp $
+ $Id: ea_sys.c,v 1.8 2010-04-13 08:05:06 franklahm Exp $
Copyright (c) 2009 Frank Lahm <franklahm@gmail.com>
This program is free software; you can redistribute it and/or modify
memset(rbuf, 0, 4);
*rbuflen += 4;
switch(errno) {
- case ELOOP:
+ case OPEN_NOFOLLOW_ERRNO:
/* its a symlink and client requested O_NOFOLLOW */
LOG(log_debug, logtype_afpd, "sys_getextattr_size(%s): encountered symlink with kXAttrNoFollow", uname);
return AFP_OK;
memset(rbuf, 0, 4);
*rbuflen += 4;
switch(errno) {
- case ELOOP:
+ case OPEN_NOFOLLOW_ERRNO:
/* its a symlink and client requested O_NOFOLLOW */
LOG(log_debug, logtype_afpd, "sys_getextattr_content(%s): encountered symlink with kXAttrNoFollow", uname);
return AFP_OK;
}
if (ret == -1) switch(errno) {
- case ELOOP:
+ case OPEN_NOFOLLOW_ERRNO:
/* its a symlink and client requested O_NOFOLLOW */
ret = AFPERR_BADTYPE;
default:
if (ret == -1) {
switch(errno) {
- case ELOOP:
+ case OPEN_NOFOLLOW_ERRNO:
/* its a symlink and client requested O_NOFOLLOW */
LOG(log_debug, logtype_afpd, "sys_set_ea(%s/%s): encountered symlink with kXAttrNoFollow",
uname, attruname);
if (ret == -1) {
switch(errno) {
- case ELOOP:
+ case OPEN_NOFOLLOW_ERRNO:
/* its a symlink and client requested O_NOFOLLOW */
LOG(log_debug, logtype_afpd, "sys_remove_ea(%s/%s): encountered symlink with kXAttrNoFollow", uname);
return AFP_OK;