* src/system.h: Note where it should be included, and
make ordering check portable to GLIBC > 2
* src/copy.c: Move <sys/ioctl.h> along with other system headers
as is done elsewhere.
* src/install.c: Move <sys/wait.h> along with other system headers
as is done elsewhere.
* src/ptx.c: Include <regex.h> rather than "regex.h" as
is done elsewhere. Note <regex.h> is kept after "system.h"
as per commit
dba300a0.
#include <config.h>
#include <stdio.h>
#include <assert.h>
+#include <sys/ioctl.h>
#include <sys/types.h>
#include <selinux/selinux.h>
# include "verror.h"
#endif
-#include <sys/ioctl.h>
-
#ifndef HAVE_FCHOWN
# define HAVE_FCHOWN false
# define fchown(fd, uid, gid) (-1)
#include <pwd.h>
#include <grp.h>
#include <selinux/selinux.h>
+#include <sys/wait.h>
#include "system.h"
#include "backupfile.h"
#define AUTHORS proper_name ("David MacKenzie")
-#include <sys/wait.h>
-
static int selinux_enabled = 0;
static bool use_default_selinux_context = true;
#include <getopt.h>
#include <sys/types.h>
#include "system.h"
+#include <regex.h>
#include "argmatch.h"
#include "diacrit.h"
#include "error.h"
#include "fadvise.h"
#include "quote.h"
#include "quotearg.h"
-#include "regex.h"
#include "stdio--.h"
#include "xstrtol.h"
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+/* Include this file _after_ system headers if possible. */
+
#include <alloca.h>
-/* Include sys/types.h before this file. */
+/* Include <sys/types.h> before this file.
+ Note this doesn't warn if we're included
+ before all system headers. */
-#if 2 <= __GLIBC__ && 2 <= __GLIBC_MINOR__
+#if 2 < __GLIBC__ || ( 2 == ___GLIBC__ && 2 <= __GLIBC_MINOR__ )
# if ! defined _SYS_TYPES_H
you must include <sys/types.h> before including this file
# endif