summaryrefslogtreecommitdiff
path: root/gpxe/src/include/assert.h
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2016-02-09 18:08:47 -0800
committerH. Peter Anvin <hpa@zytor.com>2016-02-09 18:08:47 -0800
commitf2f897a1762fab84d2905f32b1c15dd7b42abb56 (patch)
treea38f51d3f1fcbf44afddb4736d549c12eaf491be /gpxe/src/include/assert.h
parent72d2959272b4616f17a97667e6dfa9d06bf109a3 (diff)
downloadsyslinux-f2f897a1762fab84d2905f32b1c15dd7b42abb56.tar.gz
gpxe: delete long since obsolete snapshot of gPXE
gPXE has been deprecated in favor of iPXE for many, many years now. It is much better than users get it directly from the iPXE project, since we should no longer need any special modifications for Syslinux use. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'gpxe/src/include/assert.h')
-rw-r--r--gpxe/src/include/assert.h67
1 files changed, 0 insertions, 67 deletions
diff --git a/gpxe/src/include/assert.h b/gpxe/src/include/assert.h
deleted file mode 100644
index cc784bc1..00000000
--- a/gpxe/src/include/assert.h
+++ /dev/null
@@ -1,67 +0,0 @@
-#ifndef _ASSERT_H
-#define _ASSERT_H
-
-/** @file
- *
- * Assertions
- *
- * This file provides two assertion macros: assert() (for run-time
- * assertions) and linker_assert() (for link-time assertions).
- *
- */
-
-FILE_LICENCE ( GPL2_OR_LATER );
-
-#ifdef NDEBUG
-#define ASSERTING 0
-#else
-#define ASSERTING 1
-#endif
-
-/** printf() for assertions
- *
- * This function exists so that the assert() macro can expand to
- * printf() calls without dragging the printf() prototype into scope.
- *
- * As far as the compiler is concerned, assert_printf() and printf() are
- * completely unrelated calls; it's only at the assembly stage that
- * references to the assert_printf symbol are collapsed into references
- * to the printf symbol.
- */
-extern int __attribute__ (( format ( printf, 1, 2 ) ))
-assert_printf ( const char *fmt, ... ) asm ( "printf" );
-
-/**
- * Assert a condition at run-time.
- *
- * If the condition is not true, a debug message will be printed.
- * Assertions only take effect in debug-enabled builds (see DBG()).
- *
- * @todo Make an assertion failure abort the program
- *
- */
-#define assert( condition ) \
- do { \
- if ( ASSERTING && ! (condition) ) { \
- assert_printf ( "assert(%s) failed at %s line %d\n", \
- #condition, __FILE__, __LINE__ ); \
- } \
- } while ( 0 )
-
-/**
- * Assert a condition at link-time.
- *
- * If the condition is not true, the link will fail with an unresolved
- * symbol (error_symbol).
- *
- * This macro is gPXE-specific. Do not use this macro in code
- * intended to be portable.
- *
- */
-#define linker_assert( condition, error_symbol ) \
- if ( ! (condition) ) { \
- extern void error_symbol ( void ); \
- error_symbol(); \
- }
-
-#endif /* _ASSERT_H */