svn commit: r235153 - in head/sys/boot: common i386/efi sparc64/loader

Andriy Gapon avg at FreeBSD.org
Wed May 9 07:55:43 UTC 2012


Author: avg
Date: Wed May  9 07:55:42 2012
New Revision: 235153
URL: http://svn.freebsd.org/changeset/base/235153

Log:
  sys/boot: add common CTASSERT definition

Modified:
  head/sys/boot/common/bootstrap.h
  head/sys/boot/i386/efi/reloc.c
  head/sys/boot/sparc64/loader/main.c

Modified: head/sys/boot/common/bootstrap.h
==============================================================================
--- head/sys/boot/common/bootstrap.h	Wed May  9 04:54:50 2012	(r235152)
+++ head/sys/boot/common/bootstrap.h	Wed May  9 07:55:42 2012	(r235153)
@@ -327,4 +327,10 @@ void	dev_cleanup(void);
 
 time_t	time(time_t *tloc);
 
+#ifndef CTASSERT                /* Allow lint to override */
+#define CTASSERT(x)             _CTASSERT(x, __LINE__)
+#define _CTASSERT(x, y)         __CTASSERT(x, y)
+#define __CTASSERT(x, y)        typedef char __assert ## y[(x) ? 1 : -1]
+#endif
+
 #endif /* !_BOOTSTRAP_H_ */

Modified: head/sys/boot/i386/efi/reloc.c
==============================================================================
--- head/sys/boot/i386/efi/reloc.c	Wed May  9 04:54:50 2012	(r235152)
+++ head/sys/boot/i386/efi/reloc.c	Wed May  9 07:55:42 2012	(r235153)
@@ -30,16 +30,7 @@ __FBSDID("$FreeBSD$");
 #include <sys/types.h>
 #include <sys/elf32.h>
 #include <efi.h>
-
-/*
- * XXX: we can't include sys/systm.h.
- */
-#ifndef CTASSERT                /* Allow lint to override */
-#define CTASSERT(x)             _CTASSERT(x, __LINE__)
-#define _CTASSERT(x, y)         __CTASSERT(x, y)
-#define __CTASSERT(x, y)        typedef char __assert ## y[(x) ? 1 : -1]
-#endif
-
+#include <bootstrap.h>
 
 /*
  * A simple relocator for IA32 EFI binaries.

Modified: head/sys/boot/sparc64/loader/main.c
==============================================================================
--- head/sys/boot/sparc64/loader/main.c	Wed May  9 04:54:50 2012	(r235152)
+++ head/sys/boot/sparc64/loader/main.c	Wed May  9 07:55:42 2012	(r235153)
@@ -74,12 +74,6 @@ __FBSDID("$FreeBSD$");
 #include "libofw.h"
 #include "dev_net.h"
 
-#ifndef CTASSERT
-#define	CTASSERT(x)		_CTASSERT(x, __LINE__)
-#define	_CTASSERT(x, y)		__CTASSERT(x, y)
-#define	__CTASSERT(x, y)	typedef char __assert ## y[(x) ? 1 : -1]
-#endif
-
 extern char bootprog_name[], bootprog_rev[], bootprog_date[], bootprog_maker[];
 
 enum {


More information about the svn-src-all mailing list