Mark all libobjc2 headers as system headers when not compiling the runtime

itself.  This makes clang hide warnings.
main
theraven 13 years ago
parent 7218882f7e
commit c73b7a2f0b

@ -1,3 +1,7 @@
#if defined(__clang__) && !defined(__OBJC_RUNTIME_INTERNAL__)
#pragma clang system_header
#endif
#ifdef STRICT_MACOS_X #ifdef STRICT_MACOS_X
# define OBJC_NONPORTABLE __attribute__((error("Function not supported by the Apple runtime"))) # define OBJC_NONPORTABLE __attribute__((error("Function not supported by the Apple runtime")))

@ -1,3 +1,7 @@
#if defined(__clang__) && !defined(__OBJC_RUNTIME_INTERNAL__)
#pragma clang system_header
#endif
#include <objc/runtime.h> #include <objc/runtime.h>
@interface Object @interface Object

@ -1,3 +1,7 @@
#if defined(__clang__) && !defined(__OBJC_RUNTIME_INTERNAL__)
#pragma clang system_header
#endif
#import "Object.h" #import "Object.h"
@interface Protocol : Object @end @interface Protocol : Object @end

@ -1,5 +1,9 @@
#ifndef __LIBOBJC_BLOCKS_PRIVATE_H_INCLUDED__ #ifndef __LIBOBJC_BLOCKS_PRIVATE_H_INCLUDED__
#define __LIBOBJC_BLOCKS_PRIVATE_H_INCLUDED__ #define __LIBOBJC_BLOCKS_PRIVATE_H_INCLUDED__
#if defined(__clang__) && !defined(__OBJC_RUNTIME_INTERNAL__)
#pragma clang system_header
#endif
/* /*
* This header file exposes some implementation details of the blocks runtime * This header file exposes some implementation details of the blocks runtime

@ -1,3 +1,7 @@
#if defined(__clang__) && !defined(__OBJC_RUNTIME_INTERNAL__)
#pragma clang system_header
#endif
/* /*
* Blocks Runtime * Blocks Runtime
*/ */

@ -1,3 +1,7 @@
#if defined(__clang__) && !defined(__OBJC_RUNTIME_INTERNAL__)
#pragma clang system_header
#endif
/** /**
* capabilities.h - This file defines the list of capabilities. Runtime * capabilities.h - This file defines the list of capabilities. Runtime
* capabilities can be checked. You may use #ifdef to test at compile time * capabilities can be checked. You may use #ifdef to test at compile time

@ -1,3 +1,7 @@
#if defined(__clang__) && !defined(__OBJC_RUNTIME_INTERNAL__)
#pragma clang system_header
#endif
enum objc_developer_mode_np enum objc_developer_mode_np
{ {
/** User mode - the default. */ /** User mode - the default. */

@ -1,3 +1,7 @@
#if defined(__clang__) && !defined(__OBJC_RUNTIME_INTERNAL__)
#pragma clang system_header
#endif
#ifndef __LIBOBJC_ENCODING_H_INCLUDED__ #ifndef __LIBOBJC_ENCODING_H_INCLUDED__
#define __LIBOBJC_ENCODING_H_INCLUDED__ #define __LIBOBJC_ENCODING_H_INCLUDED__

@ -1,3 +1,7 @@
#if defined(__clang__) && !defined(__OBJC_RUNTIME_INTERNAL__)
#pragma clang system_header
#endif
/** /**
* This file includes all of the hooks that can be used to alter the behaviour * This file includes all of the hooks that can be used to alter the behaviour
* of the runtime. * of the runtime.

@ -1,3 +1,7 @@
#if defined(__clang__) && !defined(__OBJC_RUNTIME_INTERNAL__)
#pragma clang system_header
#endif
#ifndef _OBJC_MESSAGE_H_ #ifndef _OBJC_MESSAGE_H_
#define _OBJC_MESSAGE_H_ #define _OBJC_MESSAGE_H_
@ -37,18 +41,8 @@ id objc_msgSend(id self, SEL _cmd, ...);
#ifdef __cplusplus #ifdef __cplusplus
id objc_msgSend_stret(id self, SEL _cmd, ...); id objc_msgSend_stret(id self, SEL _cmd, ...);
#else #else
// There is a bug in older versions of clang that incorrectly declares the
// signature of this function as a builtin.
# ifdef __clang__
# if (__clang_major__ > 3) || ((__clang_major__ == 3) && __clang_minor__ >= 3)
void objc_msgSend_stret(id self, SEL _cmd, ...);
# else
id objc_msgSend_stret(id self, SEL _cmd, ...);
# endif
# else
void objc_msgSend_stret(id self, SEL _cmd, ...); void objc_msgSend_stret(id self, SEL _cmd, ...);
#endif #endif
#endif
/** /**
* Standard message sending function. This function must be cast to the * Standard message sending function. This function must be cast to the
* correct types for the function before use. The first argument is the * correct types for the function before use. The first argument is the

@ -1 +1,5 @@
#if defined(__clang__) && !defined(__OBJC_RUNTIME_INTERNAL__)
#pragma clang system_header
#endif
#include <objc/runtime.h> #include <objc/runtime.h>

@ -1,3 +1,7 @@
#if defined(__clang__) && !defined(__OBJC_RUNTIME_INTERNAL__)
#pragma clang system_header
#endif
#ifndef __OBJC_ARC_INCLUDED__ #ifndef __OBJC_ARC_INCLUDED__
#define __OBJC_ARC_INCLUDED__ #define __OBJC_ARC_INCLUDED__
/** /**

@ -1,3 +1,7 @@
#if defined(__clang__) && !defined(__OBJC_RUNTIME_INTERNAL__)
#pragma clang system_header
#endif
/** /**
* objc-auto.h - This file provides the interface for Objective-C garbage * objc-auto.h - This file provides the interface for Objective-C garbage
* collection * collection

@ -1,3 +1,7 @@
#if defined(__clang__) && !defined(__OBJC_RUNTIME_INTERNAL__)
#pragma clang system_header
#endif
#if !defined(__GNUSTEP_LIBOBJC_RUNTIME_DEPRECATED_INCLUDED__) && !defined(GNUSTEP_LIBOBJC_NO_LEGACY) #if !defined(__GNUSTEP_LIBOBJC_RUNTIME_DEPRECATED_INCLUDED__) && !defined(GNUSTEP_LIBOBJC_NO_LEGACY)
# define __GNUSTEP_LIBOBJC_RUNTIME_DEPRECATED_INCLUDED__ # define __GNUSTEP_LIBOBJC_RUNTIME_DEPRECATED_INCLUDED__

@ -1,3 +1,7 @@
#if defined(__clang__) && !defined(__OBJC_RUNTIME_INTERNAL__)
#pragma clang system_header
#endif
#ifndef __LIBOBJC_RUNTIME_H_INCLUDED__ #ifndef __LIBOBJC_RUNTIME_H_INCLUDED__
#define __LIBOBJC_RUNTIME_H_INCLUDED__ #define __LIBOBJC_RUNTIME_H_INCLUDED__

@ -1,3 +1,7 @@
#if defined(__clang__) && !defined(__OBJC_RUNTIME_INTERNAL__)
#pragma clang system_header
#endif
#ifndef __OBJC_SLOT_H_INCLUDED__ #ifndef __OBJC_SLOT_H_INCLUDED__
#define __OBJC_SLOT_H_INCLUDED__ #define __OBJC_SLOT_H_INCLUDED__
/** /**

Loading…
Cancel
Save