]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Use xattr functions from sys/xattr.h instead of attr/xattr.h (closes #12720)
authorBenjamin Peterson <benjamin@python.org>
Tue, 13 Sep 2011 21:20:47 +0000 (17:20 -0400)
committerBenjamin Peterson <benjamin@python.org>
Tue, 13 Sep 2011 21:20:47 +0000 (17:20 -0400)
sys/xattr.h is glibc while attr/xattr.h is a separate library.

Modules/posixmodule.c
configure
configure.in
pyconfig.h.in

index 153ddcd7a3f268c83abf85fb1542cab0e70b5668..aca52e5e56263fb0602065b25638e7e4aa6bc8ca 100644 (file)
@@ -107,8 +107,8 @@ corresponding Unix manual entries for more information on calls.");
 #include <sched.h>
 #endif
 
-#ifdef HAVE_ATTR_XATTR_H
-#include <attr/xattr.h>
+#ifdef HAVE_SYS_XATTR_H
+#include <sys/xattr.h>
 #endif
 
 #if defined(__FreeBSD__) || defined(__DragonFly__) || defined(__APPLE__)
@@ -10032,7 +10032,7 @@ posix_mkfifoat(PyObject *self, PyObject *args)
 }
 #endif
 
-#ifdef HAVE_ATTR_XATTR_H
+#ifdef HAVE_SYS_XATTR_H
 
 static int
 try_getxattr(const char *path, const char *name,
@@ -10408,7 +10408,7 @@ posix_flistxattr(PyObject *self, PyObject *args)
     return listxattr_common((const char *)(Py_uintptr_t)fd, wrap_flistxattr);
 }
 
-#endif /* HAVE_ATTR_XATTR_H */
+#endif /* HAVE_SYS_XATTR_H */
 
 static PyMethodDef posix_methods[] = {
     {"access",          posix_access, METH_VARARGS, posix_access__doc__},
@@ -10861,7 +10861,7 @@ static PyMethodDef posix_methods[] = {
 #ifdef HAVE_MKFIFOAT
     {"mkfifoat",        posix_mkfifoat, METH_VARARGS, posix_mkfifoat__doc__},
 #endif
-#ifdef HAVE_ATTR_XATTR_H
+#ifdef HAVE_SYS_XATTR_H
     {"setxattr", posix_setxattr, METH_VARARGS, posix_setxattr__doc__},
     {"lsetxattr", posix_lsetxattr, METH_VARARGS, posix_lsetxattr__doc__},
     {"fsetxattr", posix_fsetxattr, METH_VARARGS, posix_fsetxattr__doc__},
@@ -11336,7 +11336,7 @@ all_ins(PyObject *d)
 #endif
 #endif
 
-#ifdef HAVE_ATTR_XATTR_H
+#ifdef HAVE_SYS_XATTR_H
     if (ins(d, "XATTR_CREATE", (long)XATTR_CREATE)) return -1;
     if (ins(d, "XATTR_REPLACE", (long)XATTR_REPLACE)) return -1;
     if (ins(d, "XATTR_SIZE_MAX", (long)XATTR_SIZE_MAX)) return -1;
index 7948862a249eb148df4b3e96782858804c9e192e..82f8539f89024e7957df0e919481ed71fda44dad 100755 (executable)
--- a/configure
+++ b/configure
@@ -6090,12 +6090,12 @@ $as_echo "#define STDC_HEADERS 1" >>confdefs.h
 
 fi
 
-for ac_header in asm/types.h attr/xattr.h conio.h curses.h direct.h dlfcn.h errno.h \
+for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
 fcntl.h grp.h \
 ieeefp.h io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \
 sched.h shadow.h signal.h stdint.h stropts.h termios.h \
 unistd.h utime.h \
-sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
+sys/audioio.h sys/xattr.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
 sys/lock.h sys/mkdev.h sys/modem.h \
 sys/param.h sys/poll.h sys/select.h sys/sendfile.h sys/socket.h sys/statvfs.h \
 sys/stat.h sys/termio.h sys/time.h \
index 800ba261d468282521e79d6ab6005fe39c782627..5a16bb0dea1ff42bab5e66927b2ff53bc5029e36 100644 (file)
@@ -1299,12 +1299,12 @@ dnl AC_MSG_RESULT($cpp_type)
 
 # checks for header files
 AC_HEADER_STDC
-AC_CHECK_HEADERS(asm/types.h attr/xattr.h conio.h curses.h direct.h dlfcn.h errno.h \
+AC_CHECK_HEADERS(asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
 fcntl.h grp.h \
 ieeefp.h io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \
 sched.h shadow.h signal.h stdint.h stropts.h termios.h \
 unistd.h utime.h \
-sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
+sys/audioio.h sys/xattr.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
 sys/lock.h sys/mkdev.h sys/modem.h \
 sys/param.h sys/poll.h sys/select.h sys/sendfile.h sys/socket.h sys/statvfs.h \
 sys/stat.h sys/termio.h sys/time.h \
index edc2e697650caee808c72c159e94f2313a4439e7..5aac4c58f11893b1569080029bd0f08271340fe0 100644 (file)
@@ -64,9 +64,6 @@
 /* Define if GCC supports __attribute__((format(PyArg_ParseTuple, 2, 3))) */
 #undef HAVE_ATTRIBUTE_FORMAT_PARSETUPLE
 
-/* Define to 1 if you have the <attr/xattr.h> header file. */
-#undef HAVE_ATTR_XATTR_H
-
 /* Define to 1 if you have the `bind_textdomain_codeset' function. */
 #undef HAVE_BIND_TEXTDOMAIN_CODESET
 
 /* Define to 1 if you have the <sys/wait.h> header file. */
 #undef HAVE_SYS_WAIT_H
 
+/* Define to 1 if you have the <sys/xattr.h> header file. */
+#undef HAVE_SYS_XATTR_H
+
 /* Define to 1 if you have the `tcgetpgrp' function. */
 #undef HAVE_TCGETPGRP
 
    this defined. */
 #undef _POSIX_1_SOURCE
 
-/* Define to activate features from IEEE Stds 1003.1-2001 */
+/* Define to activate features from IEEE Stds 1003.1-2008 */
 #undef _POSIX_C_SOURCE
 
 /* Define to 1 if you need to in order for `stat' and other things to work. */