Define TSVTX in tar.h for older POSIX (bug 16978)

Message ID Pine.LNX.4.64.1405222319050.10376@digraph.polyomino.org.uk
State Committed
Headers

Commit Message

Joseph Myers May 22, 2014, 11:20 p.m. UTC
  As noted in bug 16978, older POSIX versions include

#define TSVTX    01000   /* Reserved */

in the specified contents of <tar.h>, with only the 2001 edition
introducing the notion of XSI-conditional definitions and conditioning
that definition.  Thus, this macro should be defined for
!__USE_XOPEN2K as well as for __USE_XOPEN, and this patch duly defines
it in that case.  Tested x86_64.

2014-05-22  Joseph Myers  <joseph@codesourcery.com>

	[BZ #16978]
	* posix/tar.h [!__USE_XOPEN2K] (TSVTX): Define macro.
	* conform/Makefile (test-xfail-POSIX/tar.h/conform): Remove
	variable.
  

Patch

diff --git a/conform/Makefile b/conform/Makefile
index e1df914..6bff8a3 100644
--- a/conform/Makefile
+++ b/conform/Makefile
@@ -188,7 +188,6 @@  test-xfail-XPG4/termios.h/conform = yes
 test-xfail-XPG4/ucontext.h/conform = yes
 test-xfail-XPG4/unistd.h/conform = yes
 test-xfail-XPG4/utmpx.h/conform = yes
-test-xfail-POSIX/tar.h/conform = yes
 test-xfail-UNIX98/arpa/inet.h/conform = yes
 test-xfail-UNIX98/fcntl.h/conform = yes
 test-xfail-UNIX98/langinfo.h/conform = yes
diff --git a/posix/tar.h b/posix/tar.h
index 115f4df..5a86f01 100644
--- a/posix/tar.h
+++ b/posix/tar.h
@@ -73,7 +73,7 @@ 
 /* The bits in mode: */
 #define TSUID	04000
 #define TSGID	02000
-#ifdef __USE_XOPEN
+#if defined __USE_XOPEN || !defined __USE_XOPEN2K
 # define TSVTX	01000
 #endif
 #define TUREAD	00400