split irg and irp resources, add IRP_RESOURCE_TYPE_LINK
[libfirm] / include / libfirm / begin.h
index 8a1c85d..251c0de 100644 (file)
                #ifdef _WIN32
                        #define FIRM_API extern __declspec(dllimport)
                #else
-                       #define FIRM_API
+                       #define FIRM_API extern
                #endif
        #endif
 #else
-       #define  FIRM_API
+       #define  FIRM_API extern
 #endif
 
-/* mark declarations as C function */
 #ifdef __cplusplus
-extern "C" {
+# define FIRM_NOTHROW throw ()
+#else
+# define FIRM_NOTHROW
 #endif
 
+/**
+ * @def FIRM_PRINTF
+ * Attribute with marks a function to have a printf style format
+ * string and variadic argument.
+ */
+#if defined(__GNUC__)
+# define FIRM_PRINTF(a,b) __attribute__((__format__(__printf__, a, b)))
+#else
+# define FIRM_PRINTF(a,b)
+#endif
+
+#endif
+
+/* mark declarations as C function (note that we always need this,
+ * so don't put it in the include guard) */
+#ifdef __cplusplus
+extern "C" {
 #endif