Skip to content

Commit c59ccc0

Browse files
committed
Always include addrxlat-priv.h (or config.h) where appropriate
addrxlat-priv.h includes config.h for us, but we should include it first to ensure it affects standard headers too given config.h may set feature test macros and so on. Where addrxlat-priv.h is not already used, add config.h instead. Signed-off-by: Sam James <[email protected]>
1 parent 120d4f0 commit c59ccc0

File tree

16 files changed

+32
-16
lines changed

16 files changed

+32
-16
lines changed

src/addrxlat/aarch64.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,11 @@
2828
not, see <http://www.gnu.org/licenses/>.
2929
*/
3030

31+
#include "addrxlat-priv.h"
32+
3133
#include <stdlib.h>
3234
#include <string.h>
3335

34-
#include "addrxlat-priv.h"
3536
#include <linux/version.h>
3637

3738
/** Maximum virtual address bits (architectural limit). */

src/addrxlat/arm.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,10 @@
2828
not, see <http://www.gnu.org/licenses/>.
2929
*/
3030

31-
#include <stdint.h>
32-
3331
#include "addrxlat-priv.h"
3432

33+
#include <stdint.h>
34+
3535
/* Maximum physical address bits (architectural limit) */
3636
#define PHYSADDR_BITS_MAX 40
3737
#define PHYSADDR_MASK ADDR_MASK(PHYSADDR_BITS_MAX)

src/addrxlat/ctx.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,12 @@
2828
not, see <http://www.gnu.org/licenses/>.
2929
*/
3030

31+
#include "addrxlat-priv.h"
32+
3133
#include <stdlib.h>
3234
#include <string.h>
3335
#include <stdarg.h>
3436

35-
#include "addrxlat-priv.h"
36-
3737
/** Maximum length of the static error message. */
3838
#define ERRBUF 64
3939

src/addrxlat/ia32.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,12 @@
2828
not, see <http://www.gnu.org/licenses/>.
2929
*/
3030

31+
#include "addrxlat-priv.h"
32+
3133
#include <stdint.h>
3234
#include <string.h>
3335
#include <stdlib.h>
3436

35-
#include "addrxlat-priv.h"
36-
3737
#define PGD_PSE_HIGH_SHIFT 13
3838
#define PGD_PSE_HIGH_BITS 8
3939
#define PGD_PSE_HIGH_MASK ADDR_MASK(PGD_PSE_HIGH_BITS)

src/addrxlat/map.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@
2828
not, see <http://www.gnu.org/licenses/>.
2929
*/
3030

31+
#include "addrxlat-priv.h"
32+
3133
#include <stdlib.h>
3234
#include <string.h>
3335

34-
#include "addrxlat-priv.h"
35-
3636
DEFINE_ALIAS(map_new);
3737

3838
addrxlat_map_t *

src/addrxlat/riscv64.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,11 @@
2828
not, see <http://www.gnu.org/licenses/>.
2929
*/
3030

31+
#include "addrxlat-priv.h"
32+
3133
#include <stdlib.h>
3234
#include <string.h>
3335

34-
#include "addrxlat-priv.h"
3536
#include <linux/version.h>
3637

3738
/** Maximum physical address bits (architectural limit) */

src/addrxlat/step.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,10 @@
2828
not, see <http://www.gnu.org/licenses/>.
2929
*/
3030

31-
#include <string.h>
32-
3331
#include "addrxlat-priv.h"
3432

33+
#include <string.h>
34+
3535
int
3636
addrxlat_pteval_shift(addrxlat_pte_format_t fmt)
3737
{

src/addrxlat/sys.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@
2828
not, see <http://www.gnu.org/licenses/>.
2929
*/
3030

31+
#include "addrxlat-priv.h"
32+
3133
#include <stdlib.h>
3234
#include <string.h>
3335

34-
#include "addrxlat-priv.h"
35-
3636
addrxlat_sys_t *
3737
addrxlat_sys_new(void)
3838
{

src/addrxlat/x86_64.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,10 @@
2828
not, see <http://www.gnu.org/licenses/>.
2929
*/
3030

31-
#include <stdlib.h>
32-
3331
#include "addrxlat-priv.h"
3432

33+
#include <stdlib.h>
34+
3535
/* Maximum physical address bits (architectural limit) */
3636
#define PHYSADDR_BITS_MAX 52
3737
#define PHYSADDR_MASK ADDR_MASK(PHYSADDR_BITS_MAX)

src/errmsg.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@
3131
#ifndef _ERRMSG_H
3232
#define _ERRMSG_H 1
3333

34+
#include "config.h"
35+
3436
#include <stdlib.h>
3537
#include <string.h>
3638
#include <stdarg.h>

0 commit comments

Comments
 (0)