From owner-svn-src-all@freebsd.org Tue Oct 25 16:29:17 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A7D58C21C46; Tue, 25 Oct 2016 16:29:17 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 65DEA8AB; Tue, 25 Oct 2016 16:29:17 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u9PGTG0Y056985; Tue, 25 Oct 2016 16:29:16 GMT (envelope-from marcel@FreeBSD.org) Received: (from marcel@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u9PGTFKa056978; Tue, 25 Oct 2016 16:29:15 GMT (envelope-from marcel@FreeBSD.org) Message-Id: <201610251629.u9PGTFKa056978@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: marcel set sender to marcel@FreeBSD.org using -f From: Marcel Moolenaar Date: Tue, 25 Oct 2016 16:29:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r307927 - in head/usr.sbin/makefs: . cd9660 ffs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Oct 2016 16:29:17 -0000 Author: marcel Date: Tue Oct 25 16:29:15 2016 New Revision: 307927 URL: https://svnweb.freebsd.org/changeset/base/307927 Log: Be more precise when including headers so that we're less likely to depend on namespace pollution and as such become more portable. This means including headers like or , but also making sure we include system/host headers before local headers. While here: define ENOATTR as ENOMSG in mtree.c. There is no ENOATTR on Linux. With this, makefs is ready for compilation on macOS and Linux. Modified: head/usr.sbin/makefs/cd9660.c head/usr.sbin/makefs/cd9660/cd9660_archimedes.c head/usr.sbin/makefs/cd9660/iso9660_rrip.c head/usr.sbin/makefs/ffs/ffs_bswap.c head/usr.sbin/makefs/ffs/ffs_subr.c head/usr.sbin/makefs/mtree.c head/usr.sbin/makefs/walk.c Modified: head/usr.sbin/makefs/cd9660.c ============================================================================== --- head/usr.sbin/makefs/cd9660.c Tue Oct 25 16:28:30 2016 (r307926) +++ head/usr.sbin/makefs/cd9660.c Tue Oct 25 16:29:15 2016 (r307927) @@ -98,10 +98,11 @@ #include __FBSDID("$FreeBSD$"); -#include -#include #include #include +#include +#include +#include #include "makefs.h" #include "cd9660.h" Modified: head/usr.sbin/makefs/cd9660/cd9660_archimedes.c ============================================================================== --- head/usr.sbin/makefs/cd9660/cd9660_archimedes.c Tue Oct 25 16:28:30 2016 (r307926) +++ head/usr.sbin/makefs/cd9660/cd9660_archimedes.c Tue Oct 25 16:29:15 2016 (r307927) @@ -40,9 +40,11 @@ #include __FBSDID("$FreeBSD$"); +#include #include #include #include +#include #include #include "makefs.h" Modified: head/usr.sbin/makefs/cd9660/iso9660_rrip.c ============================================================================== --- head/usr.sbin/makefs/cd9660/iso9660_rrip.c Tue Oct 25 16:28:30 2016 (r307926) +++ head/usr.sbin/makefs/cd9660/iso9660_rrip.c Tue Oct 25 16:29:15 2016 (r307927) @@ -35,14 +35,16 @@ * defined in iso9660_rrip.h */ -#include "makefs.h" -#include "cd9660.h" -#include "iso9660_rrip.h" +#include +__FBSDID("$FreeBSD$"); + #include +#include #include -#include -__FBSDID("$FreeBSD$"); +#include "makefs.h" +#include "cd9660.h" +#include "iso9660_rrip.h" static void cd9660_rrip_initialize_inode(cd9660node *); static int cd9660_susp_handle_continuation(cd9660node *); Modified: head/usr.sbin/makefs/ffs/ffs_bswap.c ============================================================================== --- head/usr.sbin/makefs/ffs/ffs_bswap.c Tue Oct 25 16:28:30 2016 (r307926) +++ head/usr.sbin/makefs/ffs/ffs_bswap.c Tue Oct 25 16:29:15 2016 (r307927) @@ -38,18 +38,19 @@ __FBSDID("$FreeBSD$"); #include #endif -#include -#include "ffs/ufs_bswap.h" -#include - #if !defined(_KERNEL) #include +#include #include #include #include #define panic(x) printf("%s\n", (x)), abort() #endif +#include +#include "ffs/ufs_bswap.h" +#include + #define fs_old_postbloff fs_spare5[0] #define fs_old_rotbloff fs_spare5[1] #define fs_old_postbl_start fs_maxbsize Modified: head/usr.sbin/makefs/ffs/ffs_subr.c ============================================================================== --- head/usr.sbin/makefs/ffs/ffs_subr.c Tue Oct 25 16:28:30 2016 (r307926) +++ head/usr.sbin/makefs/ffs/ffs_subr.c Tue Oct 25 16:29:15 2016 (r307927) @@ -35,6 +35,7 @@ __FBSDID("$FreeBSD$"); #include +#include #include #include Modified: head/usr.sbin/makefs/mtree.c ============================================================================== --- head/usr.sbin/makefs/mtree.c Tue Oct 25 16:28:30 2016 (r307926) +++ head/usr.sbin/makefs/mtree.c Tue Oct 25 16:29:15 2016 (r307927) @@ -44,10 +44,15 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include "makefs.h" +#ifndef ENOATTR +#define ENOATTR ENOMSG +#endif + #define IS_DOT(nm) ((nm)[0] == '.' && (nm)[1] == '\0') #define IS_DOTDOT(nm) ((nm)[0] == '.' && (nm)[1] == '.' && (nm)[2] == '\0') Modified: head/usr.sbin/makefs/walk.c ============================================================================== --- head/usr.sbin/makefs/walk.c Tue Oct 25 16:28:30 2016 (r307926) +++ head/usr.sbin/makefs/walk.c Tue Oct 25 16:29:15 2016 (r307927) @@ -40,6 +40,7 @@ __FBSDID("$FreeBSD$"); #include +#include #include #include