parser: simplify code by keeping a pointer to the current operand
[platform/upstream/nasm.git] / compiler.h
index a3a5039..5805f5a 100644 (file)
@@ -100,6 +100,10 @@ int vsnprintf(char *, size_t, const char *, va_list);
 # endif
 #endif
 
+#if !defined(HAVE_STRLCPY) || !HAVE_DECL_STRLCPY
+size_t strlcpy(char *, const char *, size_t);
+#endif
+
 #ifndef __cplusplus            /* C++ has false, true, bool as keywords */
 # if defined(HAVE_STDBOOL_H) && defined(HAVE_WORKING_BOOL)
 #  include <stdbool.h>
@@ -170,4 +174,13 @@ char *strsep(char **, const char *);
 # define unlikely(x)   (!!(x))
 #endif
 
+/*
+ * How to tell the compiler that a function doesn't return
+ */
+#ifdef __GNUC__
+# define no_return void __attribute__((noreturn))
+#else
+# define no_return void
+#endif
+
 #endif /* NASM_COMPILER_H */