svn commit: r308415 - head/sys/arm/include

Stanislav Galabov sgalabov at FreeBSD.org
Mon Nov 7 11:35:15 UTC 2016


Author: sgalabov
Date: Mon Nov  7 11:35:14 2016
New Revision: 308415
URL: https://svnweb.freebsd.org/changeset/base/308415

Log:
  Generate an error if machine/armreg.h is included without sys/cdefs.h
  
  machine/armreg.h requires access to the __ARM_ARCH macro, which is not
  always properly defined (especially by gcc 4.2.1). We should include
  sys/cdefs.h in order to get the definitions in machine/acle-compat.h,
  which would properly define the __ARM_ARCH macro in these cases.
  
  So, in cases where machine/armreg.h is included without _SYS_CDEFS_H_
  being defined - generate an #error.
  
  Reviewed by:	andrew
  Sponsored by:	Smartcom - Bulgaria AD
  Differential Revision:	https://reviews.freebsd.org/D8460

Modified:
  head/sys/arm/include/armreg.h

Modified: head/sys/arm/include/armreg.h
==============================================================================
--- head/sys/arm/include/armreg.h	Mon Nov  7 11:28:50 2016	(r308414)
+++ head/sys/arm/include/armreg.h	Mon Nov  7 11:35:14 2016	(r308415)
@@ -41,6 +41,10 @@
 #ifndef MACHINE_ARMREG_H
 #define MACHINE_ARMREG_H
 
+#ifndef _SYS_CDEFS_H_
+#error Please include sys/cdefs.h before including machine/armreg.h
+#endif
+
 #define INSN_SIZE	4
 #define INSN_COND_MASK	0xf0000000	/* Condition mask */
 #define PSR_MODE        0x0000001f      /* mode mask */


More information about the svn-src-head mailing list