diff --git a/ChangeLog b/ChangeLog index 421125a4c..c81c83598 100644 --- a/ChangeLog +++ b/ChangeLog @@ -10,6 +10,12 @@ * Tools/gdomap.c: Change WIN32 to MINGW. Check if IFF_POINTOPOINT is defined. + * Headers/gnustep/base/*h: Remove preface include from headers. + Change extern function and var definitions to GS_EXPORT for better + handling of DLLs + * Headers/gnustep/base/NSObjCRuntime.h: Set definition of GS_EXPORT + based on using or compiling DLL + 2000-06-11 Adam Fedor * Headers/gnustep/base/preface.h.in: Define MINGW if MINW32. diff --git a/Headers/gnustep/base/Archiver.h b/Headers/gnustep/base/Archiver.h index c2ee46105..c8beebb80 100644 --- a/Headers/gnustep/base/Archiver.h +++ b/Headers/gnustep/base/Archiver.h @@ -24,7 +24,6 @@ #ifndef __Archiver_h_GNUSTEP_BASE_INCLUDE #define __Archiver_h_GNUSTEP_BASE_INCLUDE -#include #include /* Eventually some functionality may be moved out of Coder and diff --git a/Headers/gnustep/base/Array.h b/Headers/gnustep/base/Array.h index bfd5247fb..188866a22 100644 --- a/Headers/gnustep/base/Array.h +++ b/Headers/gnustep/base/Array.h @@ -24,7 +24,6 @@ #ifndef __Array_h_GNUSTEP_BASE_INCLUDE #define __Array_h_GNUSTEP_BASE_INCLUDE -#include #include #include diff --git a/Headers/gnustep/base/ArrayPrivate.h b/Headers/gnustep/base/ArrayPrivate.h index 14268f48b..61ffb54e9 100644 --- a/Headers/gnustep/base/ArrayPrivate.h +++ b/Headers/gnustep/base/ArrayPrivate.h @@ -24,7 +24,6 @@ #ifndef __ArrayPrivate_h_GNUSTEP_BASE_INCLUDE #define __ArrayPrivate_h_GNUSTEP_BASE_INCLUDE -#include #include #define DEFAULT_ARRAY_CAPACITY 2 diff --git a/Headers/gnustep/base/Bag.h b/Headers/gnustep/base/Bag.h index fa1de130d..0f3abc4dc 100644 --- a/Headers/gnustep/base/Bag.h +++ b/Headers/gnustep/base/Bag.h @@ -24,7 +24,6 @@ #ifndef __Bag_h_GNUSTEP_BASE_INCLUDE #define __Bag_h_GNUSTEP_BASE_INCLUDE -#include #include #include diff --git a/Headers/gnustep/base/BinaryCStream.h b/Headers/gnustep/base/BinaryCStream.h index c1561790d..5ad7db50c 100644 --- a/Headers/gnustep/base/BinaryCStream.h +++ b/Headers/gnustep/base/BinaryCStream.h @@ -24,7 +24,6 @@ #ifndef __BinaryCStream_h_GNUSTEP_BASE_INCLUDE #define __BinaryCStream_h_GNUSTEP_BASE_INCLUDE -#include #include #include diff --git a/Headers/gnustep/base/BinaryTree.h b/Headers/gnustep/base/BinaryTree.h index e36fc8cf4..7826ece78 100644 --- a/Headers/gnustep/base/BinaryTree.h +++ b/Headers/gnustep/base/BinaryTree.h @@ -29,7 +29,6 @@ #ifndef __BinaryTree_h_GNUSTEP_BASE_INCLUDE #define __BinaryTree_h_GNUSTEP_BASE_INCLUDE -#include #include /* The protocol defines the interface to an object diff --git a/Headers/gnustep/base/BinaryTreeNode.h b/Headers/gnustep/base/BinaryTreeNode.h index 52ce73031..542c841da 100644 --- a/Headers/gnustep/base/BinaryTreeNode.h +++ b/Headers/gnustep/base/BinaryTreeNode.h @@ -24,7 +24,6 @@ #ifndef __BinaryTreeNode_h_GNUSTEP_BASE_INCLUDE #define __BinaryTreeNode_h_GNUSTEP_BASE_INCLUDE -#include #include #include diff --git a/Headers/gnustep/base/CStream.h b/Headers/gnustep/base/CStream.h index 73ebd9061..2da77918a 100644 --- a/Headers/gnustep/base/CStream.h +++ b/Headers/gnustep/base/CStream.h @@ -24,7 +24,6 @@ #ifndef __CStream_h_GNUSTEP_BASE_INCLUDE #define __CStream_h_GNUSTEP_BASE_INCLUDE -#include #include #include diff --git a/Headers/gnustep/base/CStreaming.h b/Headers/gnustep/base/CStreaming.h index e5354fe6a..2e2b38cbc 100644 --- a/Headers/gnustep/base/CStreaming.h +++ b/Headers/gnustep/base/CStreaming.h @@ -24,7 +24,6 @@ #ifndef __CStreaming_h__GNUSTEP_BASE_INCLUDE #define __CStreaming_h__GNUSTEP_BASE_INCLUDE -#include #include @protocol CStreaming diff --git a/Headers/gnustep/base/CircularArray.h b/Headers/gnustep/base/CircularArray.h index aa57c43ff..ace57d70f 100644 --- a/Headers/gnustep/base/CircularArray.h +++ b/Headers/gnustep/base/CircularArray.h @@ -24,7 +24,6 @@ #ifndef __CircularArray_h_GNUSTEP_BASE_INCLUDE #define __CircularArray_h_GNUSTEP_BASE_INCLUDE -#include #include @interface CircularArray : Array diff --git a/Headers/gnustep/base/CircularArrayPrivate.h b/Headers/gnustep/base/CircularArrayPrivate.h index de12377c1..4f47d5453 100644 --- a/Headers/gnustep/base/CircularArrayPrivate.h +++ b/Headers/gnustep/base/CircularArrayPrivate.h @@ -24,7 +24,6 @@ #ifndef __CircularArrayPrivate_h_GNUSTEP_BASE_INCLUDE #define __CircularArrayPrivate_h_GNUSTEP_BASE_INCLUDE -#include #include #define CIRCULAR_TO_BASIC(INDEX) \ diff --git a/Headers/gnustep/base/Coder.h b/Headers/gnustep/base/Coder.h index dbffaf49b..df8f74182 100644 --- a/Headers/gnustep/base/Coder.h +++ b/Headers/gnustep/base/Coder.h @@ -24,7 +24,6 @@ #ifndef __Coder_h_GNUSTEP_BASE_INCLUDE #define __Coder_h_GNUSTEP_BASE_INCLUDE -#include #include #include #include @@ -144,6 +143,6 @@ + (void) encodeObject: anObject withConnectedCoder: aRmc; @end -extern id CoderSignatureMalformedException; +GS_EXPORT id CoderSignatureMalformedException; #endif /* __Coder_h_GNUSTEP_BASE_INCLUDE */ diff --git a/Headers/gnustep/base/CoderPrivate.h b/Headers/gnustep/base/CoderPrivate.h index 00293fc68..30fba5e98 100644 --- a/Headers/gnustep/base/CoderPrivate.h +++ b/Headers/gnustep/base/CoderPrivate.h @@ -24,7 +24,6 @@ #ifndef __CoderPrivate_h_GNUSTEP_BASE_INCLUDE #define __CoderPrivate_h_GNUSTEP_BASE_INCLUDE -#include #include #include diff --git a/Headers/gnustep/base/Coding.h b/Headers/gnustep/base/Coding.h index aedebe7d5..2ea51fe0b 100644 --- a/Headers/gnustep/base/Coding.h +++ b/Headers/gnustep/base/Coding.h @@ -24,7 +24,7 @@ #ifndef __Coding_h_GNUSTEP_BASE_INCLUDE #define __Coding_h_GNUSTEP_BASE_INCLUDE -#include +#include /* #include xxx Think about trying to get back in types, diff --git a/Headers/gnustep/base/Collecting.h b/Headers/gnustep/base/Collecting.h index d720f385e..7cbca2601 100644 --- a/Headers/gnustep/base/Collecting.h +++ b/Headers/gnustep/base/Collecting.h @@ -34,7 +34,6 @@ #ifndef __Collecting_h_GNUSTEP_BASE_INCLUDE #define __Collecting_h_GNUSTEP_BASE_INCLUDE -#include #include #include #include diff --git a/Headers/gnustep/base/Collection.h b/Headers/gnustep/base/Collection.h index 0c192c9cf..6586ebaad 100644 --- a/Headers/gnustep/base/Collection.h +++ b/Headers/gnustep/base/Collection.h @@ -28,7 +28,6 @@ #ifndef __Collection_h_GNUSTEP_BASE_INCLUDE #define __Collection_h_GNUSTEP_BASE_INCLUDE -#include #include #include #include diff --git a/Headers/gnustep/base/CollectionPrivate.h b/Headers/gnustep/base/CollectionPrivate.h index c6b5134c5..07f4f5b31 100644 --- a/Headers/gnustep/base/CollectionPrivate.h +++ b/Headers/gnustep/base/CollectionPrivate.h @@ -24,8 +24,6 @@ #ifndef __CollectionPrivate_h_GNUSTEP_BASE_INCLUDE #define __CollectionPrivate_h_GNUSTEP_BASE_INCLUDE -#include - @interface ConstantCollection (ArchivingHelpers) /* These methods should never be called except in order, and inside -encodeWithCoder: and -decodeWithCoder: */ diff --git a/Headers/gnustep/base/ConnectedCoder.h b/Headers/gnustep/base/ConnectedCoder.h index 488123cb6..4ad720e7c 100644 --- a/Headers/gnustep/base/ConnectedCoder.h +++ b/Headers/gnustep/base/ConnectedCoder.h @@ -24,7 +24,6 @@ #ifndef __ConnectedCoder_h #define __ConnectedCoder_h -#include #include #include diff --git a/Headers/gnustep/base/DelegatePool.h b/Headers/gnustep/base/DelegatePool.h index a1f189f5b..d385e5771 100644 --- a/Headers/gnustep/base/DelegatePool.h +++ b/Headers/gnustep/base/DelegatePool.h @@ -28,7 +28,6 @@ #ifndef __DelegatePool_h_GNUSTEP_BASE_INCLUDE #define __DelegatePool_h_GNUSTEP_BASE_INCLUDE -#include #include /* Available sending behaviors */ diff --git a/Headers/gnustep/base/Dictionary.h b/Headers/gnustep/base/Dictionary.h index 25f6b197f..42a9b064e 100644 --- a/Headers/gnustep/base/Dictionary.h +++ b/Headers/gnustep/base/Dictionary.h @@ -24,7 +24,6 @@ #ifndef __Dictionary_h_GNUSTEP_BASE_INCLUDE #define __Dictionary_h_GNUSTEP_BASE_INCLUDE -#include #include #include diff --git a/Headers/gnustep/base/Enumerating.h b/Headers/gnustep/base/Enumerating.h index 6969c835e..a294be5da 100644 --- a/Headers/gnustep/base/Enumerating.h +++ b/Headers/gnustep/base/Enumerating.h @@ -24,8 +24,7 @@ #ifndef __Enumerating_h__GNUSTEP_BASE_INCLUDE #define __Enumerating_h__GNUSTEP_BASE_INCLUDE -#include - +#include @protocol Enumerating - initWithCollection: aCollection; diff --git a/Headers/gnustep/base/GSConfig.h.in b/Headers/gnustep/base/GSConfig.h.in index bb8774b10..9a751d744 100644 --- a/Headers/gnustep/base/GSConfig.h.in +++ b/Headers/gnustep/base/GSConfig.h.in @@ -70,7 +70,7 @@ */ #define main gnustep_base_user_main -extern int gnustep_base_user_main (/* int argc, char *argv[] */); +GS_IMPORT int gnustep_base_user_main (/* int argc, char *argv[] */); #endif /* GS_FAKE_MAIN */ diff --git a/Headers/gnustep/base/GapArray.h b/Headers/gnustep/base/GapArray.h index fce2ce1bb..5edbd329e 100644 --- a/Headers/gnustep/base/GapArray.h +++ b/Headers/gnustep/base/GapArray.h @@ -24,7 +24,6 @@ #ifndef __GapArray_h_GNUSTEP_BASE_INCLUDE #define __GapArray_h_GNUSTEP_BASE_INCLUDE -#include #include @interface GapArray : Array diff --git a/Headers/gnustep/base/GapArrayPrivate.h b/Headers/gnustep/base/GapArrayPrivate.h index b4e547b06..a20fcd87b 100644 --- a/Headers/gnustep/base/GapArrayPrivate.h +++ b/Headers/gnustep/base/GapArrayPrivate.h @@ -26,7 +26,6 @@ #ifndef __GapArrayPrivate_h_GNUSTEP_BASE_INCLUDE #define __GapArrayPrivate_h_GNUSTEP_BASE_INCLUDE -#include #include #include diff --git a/Headers/gnustep/base/GetDefEncoding.h b/Headers/gnustep/base/GetDefEncoding.h index 2727f9f35..5ab9b77e9 100644 --- a/Headers/gnustep/base/GetDefEncoding.h +++ b/Headers/gnustep/base/GetDefEncoding.h @@ -26,6 +26,7 @@ #ifndef __GetDefEncoding_h__GNUSTEP_BASE_INCLUDE #define __GetDefEncoding_h__GNUSTEP_BASE_INCLUDE +#include NSStringEncoding GetDefEncoding(); NSString* GetEncodingName(NSStringEncoding encoding); diff --git a/Headers/gnustep/base/Heap.h b/Headers/gnustep/base/Heap.h index 096c974bf..421ebe40e 100644 --- a/Headers/gnustep/base/Heap.h +++ b/Headers/gnustep/base/Heap.h @@ -24,7 +24,6 @@ #ifndef __Heap_h_GNUSTEP_BASE_INCLUDE #define __Heap_h_GNUSTEP_BASE_INCLUDE -#include #include @interface Heap : Array diff --git a/Headers/gnustep/base/IndexedCollecting.h b/Headers/gnustep/base/IndexedCollecting.h index 23117d266..145692be3 100644 --- a/Headers/gnustep/base/IndexedCollecting.h +++ b/Headers/gnustep/base/IndexedCollecting.h @@ -35,7 +35,6 @@ #ifndef __IndexedCollecting_h_GNUSTEP_BASE_INCLUDE #define __IndexedCollecting_h_GNUSTEP_BASE_INCLUDE -#include #include #include diff --git a/Headers/gnustep/base/IndexedCollection.h b/Headers/gnustep/base/IndexedCollection.h index 14cf21a6f..7250b25dc 100644 --- a/Headers/gnustep/base/IndexedCollection.h +++ b/Headers/gnustep/base/IndexedCollection.h @@ -24,7 +24,6 @@ #ifndef __IndexedCollection_h_GNUSTEP_BASE_INCLUDE #define __IndexedCollection_h_GNUSTEP_BASE_INCLUDE -#include #include #include diff --git a/Headers/gnustep/base/IndexedCollectionPrivate.h b/Headers/gnustep/base/IndexedCollectionPrivate.h index f236b46ef..19fcd87f8 100644 --- a/Headers/gnustep/base/IndexedCollectionPrivate.h +++ b/Headers/gnustep/base/IndexedCollectionPrivate.h @@ -24,7 +24,6 @@ #ifndef __IndexedCollectionPrivate_h_GNUSTEP_BASE_INCLUDE #define __IndexedCollectionPrivate_h_GNUSTEP_BASE_INCLUDE -#include #include #include #include diff --git a/Headers/gnustep/base/InvalidationListening.h b/Headers/gnustep/base/InvalidationListening.h index b5aa2de7e..70ded9d95 100644 --- a/Headers/gnustep/base/InvalidationListening.h +++ b/Headers/gnustep/base/InvalidationListening.h @@ -24,6 +24,7 @@ #ifndef __InvalidationListening_h_GNUSTEP_BASE_INCLUDE #define __InvalidationListening_h_GNUSTEP_BASE_INCLUDE +#include /* This protocol is just temporary. It will disappear when GNU writes a more general notification system. It is not recommended that you use it in your code. */ diff --git a/Headers/gnustep/base/Invocation.h b/Headers/gnustep/base/Invocation.h index f2452c722..5eab6efbd 100644 --- a/Headers/gnustep/base/Invocation.h +++ b/Headers/gnustep/base/Invocation.h @@ -8,7 +8,6 @@ extraneous stuff after the first type. */ -#include #include #include diff --git a/Headers/gnustep/base/Invoking.h b/Headers/gnustep/base/Invoking.h index 0b6ea07f8..e9b11ec65 100644 --- a/Headers/gnustep/base/Invoking.h +++ b/Headers/gnustep/base/Invoking.h @@ -24,7 +24,7 @@ #ifndef __Invoking_h__GNUSTEP_BASE_INCLUDE #define __Invoking_h__GNUSTEP_BASE_INCLUDE -#include +#include @protocol Invoking diff --git a/Headers/gnustep/base/KeyedCollecting.h b/Headers/gnustep/base/KeyedCollecting.h index b9215f040..c11823f7a 100644 --- a/Headers/gnustep/base/KeyedCollecting.h +++ b/Headers/gnustep/base/KeyedCollecting.h @@ -33,7 +33,6 @@ #ifndef __KeyedCollecting_h_GNUSTEP_BASE_INCLUDE #define __KeyedCollecting_h_GNUSTEP_BASE_INCLUDE -#include #include @protocol ConstantKeyedCollecting diff --git a/Headers/gnustep/base/KeyedCollection.h b/Headers/gnustep/base/KeyedCollection.h index 5b64d5bda..e7e407547 100644 --- a/Headers/gnustep/base/KeyedCollection.h +++ b/Headers/gnustep/base/KeyedCollection.h @@ -24,7 +24,6 @@ #ifndef __KeyedCollection_h_GNUSTEP_BASE_INCLUDE #define __KeyedCollection_h_GNUSTEP_BASE_INCLUDE -#include #include #include diff --git a/Headers/gnustep/base/LinkedList.h b/Headers/gnustep/base/LinkedList.h index 97b37d9c9..0d57b8c2c 100644 --- a/Headers/gnustep/base/LinkedList.h +++ b/Headers/gnustep/base/LinkedList.h @@ -24,7 +24,6 @@ #ifndef __LinkedList_h_GNUSTEP_BASE_INCLUDE #define __LinkedList_h_GNUSTEP_BASE_INCLUDE -#include #include /* The protocol defines the interface to an object diff --git a/Headers/gnustep/base/LinkedListNode.h b/Headers/gnustep/base/LinkedListNode.h index ce3a066ac..55342d9f6 100644 --- a/Headers/gnustep/base/LinkedListNode.h +++ b/Headers/gnustep/base/LinkedListNode.h @@ -24,7 +24,6 @@ #ifndef __LinkedListNode_h_GNUSTEP_BASE_INCLUDE #define __LinkedListNode_h_GNUSTEP_BASE_INCLUDE -#include #include #include diff --git a/Headers/gnustep/base/Locking.h b/Headers/gnustep/base/Locking.h index 31a19e143..997045d1a 100644 --- a/Headers/gnustep/base/Locking.h +++ b/Headers/gnustep/base/Locking.h @@ -24,7 +24,6 @@ #ifndef __Locking_h_GNUSTEP_BASE_INCLUDE #define __Locking_h_GNUSTEP_BASE_INCLUDE -#include #include @protocol Locking diff --git a/Headers/gnustep/base/MachPort.h b/Headers/gnustep/base/MachPort.h index 88521ef29..a1384a76b 100644 --- a/Headers/gnustep/base/MachPort.h +++ b/Headers/gnustep/base/MachPort.h @@ -26,7 +26,6 @@ #if __mach__ -#include #include @interface MachInPort : InPort diff --git a/Headers/gnustep/base/Magnitude.h b/Headers/gnustep/base/Magnitude.h index c5a9d6f8a..fc458982d 100644 --- a/Headers/gnustep/base/Magnitude.h +++ b/Headers/gnustep/base/Magnitude.h @@ -24,7 +24,6 @@ #ifndef __Magnitude_h_GNUSTEP_BASE_INCLUDE #define __Magnitude_h_GNUSTEP_BASE_INCLUDE -#include #include @interface Magnitude : NSObject diff --git a/Headers/gnustep/base/MappedCollector.h b/Headers/gnustep/base/MappedCollector.h index 1972c6df2..8c8453deb 100644 --- a/Headers/gnustep/base/MappedCollector.h +++ b/Headers/gnustep/base/MappedCollector.h @@ -24,7 +24,6 @@ #ifndef __MappedCollector_h_GNUSTEP_BASE_INCLUDE #define __MappedCollector_h_GNUSTEP_BASE_INCLUDE -#include #include @interface MappedCollector : KeyedCollection diff --git a/Headers/gnustep/base/MemoryStream.h b/Headers/gnustep/base/MemoryStream.h index 066dad31d..0427e9917 100644 --- a/Headers/gnustep/base/MemoryStream.h +++ b/Headers/gnustep/base/MemoryStream.h @@ -31,7 +31,6 @@ #ifndef __MemoryStream_h_GNUSTEP_BASE_INCLUDE #define __MemoryStream_h_GNUSTEP_BASE_INCLUDE -#include #include #include diff --git a/Headers/gnustep/base/NSArchiver.h b/Headers/gnustep/base/NSArchiver.h index 5060834b2..18ee5c2e0 100644 --- a/Headers/gnustep/base/NSArchiver.h +++ b/Headers/gnustep/base/NSArchiver.h @@ -270,6 +270,6 @@ /* Exceptions */ -extern NSString *NSInconsistentArchiveException; +GS_EXPORT NSString *NSInconsistentArchiveException; #endif /* __NSArchiver_h_GNUSTEP_BASE_INCLUDE */ diff --git a/Headers/gnustep/base/NSArray.h b/Headers/gnustep/base/NSArray.h index f40a68957..1f058ef4f 100644 --- a/Headers/gnustep/base/NSArray.h +++ b/Headers/gnustep/base/NSArray.h @@ -24,7 +24,6 @@ #ifndef __NSArray_h_GNUSTEP_BASE_INCLUDE #define __NSArray_h_GNUSTEP_BASE_INCLUDE -#include #include #include diff --git a/Headers/gnustep/base/NSAutoreleasePool.h b/Headers/gnustep/base/NSAutoreleasePool.h index a716eca53..c9791febf 100644 --- a/Headers/gnustep/base/NSAutoreleasePool.h +++ b/Headers/gnustep/base/NSAutoreleasePool.h @@ -24,8 +24,7 @@ #ifndef __NSAutoreleasePool_h_GNUSTEP_BASE_INCLUDE #define __NSAutoreleasePool_h_GNUSTEP_BASE_INCLUDE -#include -#include /* for memset() */ +#include @class NSAutoreleasePool; diff --git a/Headers/gnustep/base/NSBundle.h b/Headers/gnustep/base/NSBundle.h index 650b98fa9..3328b4ead 100644 --- a/Headers/gnustep/base/NSBundle.h +++ b/Headers/gnustep/base/NSBundle.h @@ -31,9 +31,9 @@ @class NSDictionary; @class NSMutableDictionary; -extern NSString* NSBundleDidLoadNotification; -extern NSString* NSShowNonLocalizedStrings; -extern NSString* NSLoadedClasses; +GS_EXPORT NSString* NSBundleDidLoadNotification; +GS_EXPORT NSString* NSShowNonLocalizedStrings; +GS_EXPORT NSString* NSLoadedClasses; @interface NSBundle : NSObject { diff --git a/Headers/gnustep/base/NSConnection.h b/Headers/gnustep/base/NSConnection.h index d297174c6..8b6861f64 100644 --- a/Headers/gnustep/base/NSConnection.h +++ b/Headers/gnustep/base/NSConnection.h @@ -40,13 +40,13 @@ * Keys for the NSDictionary returned by [NSConnection -statistics] */ /* These in OPENSTEP 4.2 */ -extern NSString *NSConnectionRepliesReceived; -extern NSString *NSConnectionRepliesSent; -extern NSString *NSConnectionRequestsReceived; -extern NSString *NSConnectionRequestsSent; +GS_EXPORT NSString *NSConnectionRepliesReceived; +GS_EXPORT NSString *NSConnectionRepliesSent; +GS_EXPORT NSString *NSConnectionRequestsReceived; +GS_EXPORT NSString *NSConnectionRequestsSent; /* These Are GNUstep extras */ -extern NSString *NSConnectionLocalCount; /* Objects sent out */ -extern NSString *NSConnectionProxyCount; /* Objects received */ +GS_EXPORT NSString *NSConnectionLocalCount; /* Objects sent out */ +GS_EXPORT NSString *NSConnectionProxyCount; /* Objects received */ /* @@ -236,7 +236,7 @@ extern NSString *NSConnectionProxyCount; /* Objects received */ @end -extern NSString *ConnectionBecameInvalidNotification; +GS_EXPORT NSString *ConnectionBecameInvalidNotification; @interface Object (NSConnectionDelegate) - (BOOL) connection: (NSConnection*)parent @@ -299,9 +299,9 @@ extern NSString *ConnectionBecameInvalidNotification; /* * NSRunLoop mode, NSNotification name and NSException strings. */ -extern NSString *NSConnectionReplyMode; -extern NSString *NSConnectionDidDieNotification; -extern NSString *NSConnectionDidInitializeNotification; /* OPENSTEP */ +GS_EXPORT NSString *NSConnectionReplyMode; +GS_EXPORT NSString *NSConnectionDidDieNotification; +GS_EXPORT NSString *NSConnectionDidInitializeNotification; /* OPENSTEP */ /* * For compatibility with old GNU DO code - diff --git a/Headers/gnustep/base/NSDebug.h b/Headers/gnustep/base/NSDebug.h index a95370ff9..27008ecfa 100644 --- a/Headers/gnustep/base/NSDebug.h +++ b/Headers/gnustep/base/NSDebug.h @@ -24,10 +24,10 @@ #ifndef __NSDebug_h_GNUSTEP_BASE_INCLUDE #define __NSDebug_h_GNUSTEP_BASE_INCLUDE -#include #include +#include -extern int errno; +GS_IMPORT int errno; /* @@ -59,17 +59,17 @@ extern int errno; */ #ifndef NDEBUG -extern void GSDebugAllocationAdd(Class c); -extern void GSDebugAllocationRemove(Class c); +GS_EXPORT void GSDebugAllocationAdd(Class c); +GS_EXPORT void GSDebugAllocationRemove(Class c); -extern BOOL GSDebugAllocationActive(BOOL active); -extern int GSDebugAllocationCount(Class c); -extern const char* GSDebugAllocationList(BOOL changeFlag); -extern const char* GSDebugAllocationListAll(); +GS_EXPORT BOOL GSDebugAllocationActive(BOOL active); +GS_EXPORT int GSDebugAllocationCount(Class c); +GS_EXPORT const char* GSDebugAllocationList(BOOL changeFlag); +GS_EXPORT const char* GSDebugAllocationListAll(); -extern NSString* GSDebugFunctionMsg(const char *func, const char *file, +GS_EXPORT NSString* GSDebugFunctionMsg(const char *func, const char *file, int line, NSString *fmt); -extern NSString* GSDebugMethodMsg(id obj, SEL sel, const char *file, +GS_EXPORT NSString* GSDebugMethodMsg(id obj, SEL sel, const char *file, int line, NSString *fmt); #endif diff --git a/Headers/gnustep/base/NSDecimal.h b/Headers/gnustep/base/NSDecimal.h index 1dee7d169..1573faad9 100644 --- a/Headers/gnustep/base/NSDecimal.h +++ b/Headers/gnustep/base/NSDecimal.h @@ -63,40 +63,40 @@ NSDecimalIsNotANumber(const NSDecimal *decimal) return (decimal->validNumber == NO); } -extern void +GS_EXPORT void NSDecimalCopy(NSDecimal *destination, const NSDecimal *source); -extern void +GS_EXPORT void NSDecimalCompact(NSDecimal *number); -extern NSComparisonResult +GS_EXPORT NSComparisonResult NSDecimalCompare(const NSDecimal *leftOperand, const NSDecimal *rightOperand); -extern void +GS_EXPORT void NSDecimalRound(NSDecimal *result, const NSDecimal *number, int scale, NSRoundingMode mode); -extern NSCalculationError +GS_EXPORT NSCalculationError NSDecimalNormalize(NSDecimal *n1, NSDecimal *n2, NSRoundingMode mode); -extern NSCalculationError +GS_EXPORT NSCalculationError NSDecimalAdd(NSDecimal *result, const NSDecimal *left, const NSDecimal *right, NSRoundingMode mode); -extern NSCalculationError +GS_EXPORT NSCalculationError NSDecimalSubtract(NSDecimal *result, const NSDecimal *left, const NSDecimal *right, NSRoundingMode mode); -extern NSCalculationError +GS_EXPORT NSCalculationError NSDecimalMultiply(NSDecimal *result, const NSDecimal *l, const NSDecimal *r, NSRoundingMode mode); -extern NSCalculationError +GS_EXPORT NSCalculationError NSDecimalDivide(NSDecimal *result, const NSDecimal *l, const NSDecimal *rr, NSRoundingMode mode); -extern NSCalculationError +GS_EXPORT NSCalculationError NSDecimalPower(NSDecimal *result, const NSDecimal *n, unsigned power, NSRoundingMode mode); -extern NSCalculationError +GS_EXPORT NSCalculationError NSDecimalMultiplyByPowerOf10(NSDecimal *result, const NSDecimal *n, short power, NSRoundingMode mode); -extern NSString* +GS_EXPORT NSString* NSDecimalString(const NSDecimal *decimal, NSDictionary *locale); #endif diff --git a/Headers/gnustep/base/NSDictionary.h b/Headers/gnustep/base/NSDictionary.h index 47fe83844..a25013a65 100644 --- a/Headers/gnustep/base/NSDictionary.h +++ b/Headers/gnustep/base/NSDictionary.h @@ -24,7 +24,7 @@ #ifndef _NSDictionary_h_GNUSTEP_BASE_INCLUDE #define _NSDictionary_h_GNUSTEP_BASE_INCLUDE -#include +#include @class NSArray, NSString, NSEnumerator; diff --git a/Headers/gnustep/base/NSDistributedNotificationCenter.h b/Headers/gnustep/base/NSDistributedNotificationCenter.h index ef58edde7..13ece7e16 100644 --- a/Headers/gnustep/base/NSDistributedNotificationCenter.h +++ b/Headers/gnustep/base/NSDistributedNotificationCenter.h @@ -39,7 +39,7 @@ typedef enum { NSNotificationSuspensionBehaviorDeliverImmediately } NSNotificationSuspensionBehavior; -extern NSString *NSLocalNotificationCenterType; +GS_EXPORT NSString *NSLocalNotificationCenterType; @interface NSDistributedNotificationCenter : NSObject { diff --git a/Headers/gnustep/base/NSException.h b/Headers/gnustep/base/NSException.h index 8d0dd470b..3cbb8e230 100644 --- a/Headers/gnustep/base/NSException.h +++ b/Headers/gnustep/base/NSException.h @@ -59,13 +59,13 @@ @end /* Common exceptions */ -extern NSString *NSInconsistentArchiveException; -extern NSString *NSGenericException; -extern NSString *NSInternalInconsistencyException; -extern NSString *NSInvalidArgumentException; -extern NSString *NSMallocException; -extern NSString *NSRangeException; -extern NSString *NSCharacterConversionException; +GS_EXPORT NSString *NSInconsistentArchiveException; +GS_EXPORT NSString *NSGenericException; +GS_EXPORT NSString *NSInternalInconsistencyException; +GS_EXPORT NSString *NSInvalidArgumentException; +GS_EXPORT NSString *NSMallocException; +GS_EXPORT NSString *NSRangeException; +GS_EXPORT NSString *NSCharacterConversionException; /* Exception handler definitions */ typedef struct _NSHandler @@ -77,7 +77,7 @@ typedef struct _NSHandler typedef void NSUncaughtExceptionHandler(NSException *exception); -extern NSUncaughtExceptionHandler *_NSUncaughtExceptionHandler; +GS_EXPORT NSUncaughtExceptionHandler *_NSUncaughtExceptionHandler; #define NSGetUncaughtExceptionHandler() _NSUncaughtExceptionHandler #define NSSetUncaughtExceptionHandler(proc) \ (_NSUncaughtExceptionHandler = (proc)) @@ -102,8 +102,8 @@ extern NSUncaughtExceptionHandler *_NSUncaughtExceptionHandler; */ /* private support routines. Do not call directly. */ -extern void _NSAddHandler( NSHandler *handler ); -extern void _NSRemoveHandler( NSHandler *handler ); +GS_EXPORT void _NSAddHandler( NSHandler *handler ); +GS_EXPORT void _NSRemoveHandler( NSHandler *handler ); #define NS_DURING { NSHandler NSLocalHandler; \ _NSAddHandler(&NSLocalHandler); \ diff --git a/Headers/gnustep/base/NSFileHandle.h b/Headers/gnustep/base/NSFileHandle.h index e50c47356..e1be12112 100644 --- a/Headers/gnustep/base/NSFileHandle.h +++ b/Headers/gnustep/base/NSFileHandle.h @@ -84,20 +84,20 @@ // Notification names. -extern NSString* NSFileHandleConnectionAcceptedNotification; -extern NSString* NSFileHandleDataAvailableNotification; -extern NSString* NSFileHandleReadCompletionNotification; -extern NSString* NSFileHandleReadToEndOfFileCompletionNotification; +GS_EXPORT NSString* NSFileHandleConnectionAcceptedNotification; +GS_EXPORT NSString* NSFileHandleDataAvailableNotification; +GS_EXPORT NSString* NSFileHandleReadCompletionNotification; +GS_EXPORT NSString* NSFileHandleReadToEndOfFileCompletionNotification; // Keys for accessing userInfo dictionary in notification handlers. -extern NSString* NSFileHandleNotificationDataItem; -extern NSString* NSFileHandleNotificationFileHandleItem; -extern NSString* NSFileHandleNotificationMonitorModes; +GS_EXPORT NSString* NSFileHandleNotificationDataItem; +GS_EXPORT NSString* NSFileHandleNotificationFileHandleItem; +GS_EXPORT NSString* NSFileHandleNotificationMonitorModes; // Exceptions -extern NSString* NSFileHandleOperationException; +GS_EXPORT NSString* NSFileHandleOperationException; @interface NSPipe : NSObject { @@ -137,10 +137,10 @@ extern NSString* NSFileHandleOperationException; // GNUstep Notification names. -extern NSString* GSFileHandleConnectCompletionNotification; -extern NSString* GSFileHandleWriteCompletionNotification; +GS_EXPORT NSString* GSFileHandleConnectCompletionNotification; +GS_EXPORT NSString* GSFileHandleWriteCompletionNotification; // Message describing error in async accept,read,write operation. -extern NSString* GSFileHandleNotificationError; +GS_EXPORT NSString* GSFileHandleNotificationError; #endif /* __NSFileHandle_h_GNUSTEP_BASE_INCLUDE */ diff --git a/Headers/gnustep/base/NSFileManager.h b/Headers/gnustep/base/NSFileManager.h index e9b619fbe..2e60005ab 100644 --- a/Headers/gnustep/base/NSFileManager.h +++ b/Headers/gnustep/base/NSFileManager.h @@ -149,40 +149,40 @@ @end /* NSDirectoryEnumerator */ /* File Attributes */ -extern NSString* const NSFileDeviceIdentifier; -extern NSString* const NSFileGroupOwnerAccountName; -extern NSString* const NSFileDeviceIdentifier; -extern NSString* const NSFileModificationDate; -extern NSString* const NSFileOwnerAccountName; -extern NSString* const NSFilePosixPermissions; -extern NSString* const NSFileReferenceCount; -extern NSString* const NSFileSize; -extern NSString* const NSFileSystemFileNumber; -extern NSString* const NSFileSystemNumber; -extern NSString* const NSFileType; +GS_EXPORT NSString* const NSFileDeviceIdentifier; +GS_EXPORT NSString* const NSFileGroupOwnerAccountName; +GS_EXPORT NSString* const NSFileDeviceIdentifier; +GS_EXPORT NSString* const NSFileModificationDate; +GS_EXPORT NSString* const NSFileOwnerAccountName; +GS_EXPORT NSString* const NSFilePosixPermissions; +GS_EXPORT NSString* const NSFileReferenceCount; +GS_EXPORT NSString* const NSFileSize; +GS_EXPORT NSString* const NSFileSystemFileNumber; +GS_EXPORT NSString* const NSFileSystemNumber; +GS_EXPORT NSString* const NSFileType; #ifndef STRICT_MACOS_X -extern NSString* const NSFileGroupOwnerAccountNumber; -extern NSString* const NSFileOwnerAccountNumber; +GS_EXPORT NSString* const NSFileGroupOwnerAccountNumber; +GS_EXPORT NSString* const NSFileOwnerAccountNumber; #endif /* File Types */ -extern NSString* const NSFileTypeDirectory; -extern NSString* const NSFileTypeRegular; -extern NSString* const NSFileTypeSymbolicLink; -extern NSString* const NSFileTypeSocket; -extern NSString* const NSFileTypeFifo; -extern NSString* const NSFileTypeCharacterSpecial; -extern NSString* const NSFileTypeBlockSpecial; -extern NSString* const NSFileTypeUnknown; +GS_EXPORT NSString* const NSFileTypeDirectory; +GS_EXPORT NSString* const NSFileTypeRegular; +GS_EXPORT NSString* const NSFileTypeSymbolicLink; +GS_EXPORT NSString* const NSFileTypeSocket; +GS_EXPORT NSString* const NSFileTypeFifo; +GS_EXPORT NSString* const NSFileTypeCharacterSpecial; +GS_EXPORT NSString* const NSFileTypeBlockSpecial; +GS_EXPORT NSString* const NSFileTypeUnknown; /* FileSystem Attributes */ -extern NSString* const NSFileSystemSize; -extern NSString* const NSFileSystemFreeSize; -extern NSString* const NSFileSystemNodes; -extern NSString* const NSFileSystemFreeNodes; +GS_EXPORT NSString* const NSFileSystemSize; +GS_EXPORT NSString* const NSFileSystemFreeSize; +GS_EXPORT NSString* const NSFileSystemNodes; +GS_EXPORT NSString* const NSFileSystemFreeNodes; /* Easy access to attributes in a dictionary */ diff --git a/Headers/gnustep/base/NSGArchiver.h b/Headers/gnustep/base/NSGArchiver.h index 943d1058c..177fa968b 100644 --- a/Headers/gnustep/base/NSGArchiver.h +++ b/Headers/gnustep/base/NSGArchiver.h @@ -24,7 +24,6 @@ #ifndef __NSGArchiver_h_GNUSTEP_BASE_INCLUDE #define __NSGArchiver_h_GNUSTEP_BASE_INCLUDE -#include #include #include diff --git a/Headers/gnustep/base/NSGArray.h b/Headers/gnustep/base/NSGArray.h index edf7e2aaf..c907cc166 100644 --- a/Headers/gnustep/base/NSGArray.h +++ b/Headers/gnustep/base/NSGArray.h @@ -24,7 +24,6 @@ #ifndef __NSGArray_h_GNUSTEP_BASE_INCLUDE #define __NSGArray_h_GNUSTEP_BASE_INCLUDE -#include #include #include diff --git a/Headers/gnustep/base/NSGAttributedString.h b/Headers/gnustep/base/NSGAttributedString.h index 8f5250b24..596e5a9be 100644 --- a/Headers/gnustep/base/NSGAttributedString.h +++ b/Headers/gnustep/base/NSGAttributedString.h @@ -48,7 +48,7 @@ #ifndef _NSGAttributedString_h_INCLUDE #define _NSGAttributedString_h_INCLUDE -#include "NSAttributedString.h" +#include "Foundation/NSAttributedString.h" @interface NSGAttributedString : NSAttributedString { diff --git a/Headers/gnustep/base/NSGCString.h b/Headers/gnustep/base/NSGCString.h index 2416099af..3d7e9a94a 100644 --- a/Headers/gnustep/base/NSGCString.h +++ b/Headers/gnustep/base/NSGCString.h @@ -24,7 +24,6 @@ #ifndef __NSGCString_h_GNUSTEP_BASE_INCLUDE #define __NSGCString_h_GNUSTEP_BASE_INCLUDE -#include #include /* diff --git a/Headers/gnustep/base/NSGSet.h b/Headers/gnustep/base/NSGSet.h index 8002aa3e9..3c4b86ed4 100644 --- a/Headers/gnustep/base/NSGSet.h +++ b/Headers/gnustep/base/NSGSet.h @@ -24,7 +24,6 @@ #ifndef __NSGSet_h_GNUSTEP_BASE_INCLUDE #define __NSGSet_h_GNUSTEP_BASE_INCLUDE -#include #include #include #include diff --git a/Headers/gnustep/base/NSGString.h b/Headers/gnustep/base/NSGString.h index 7b20054fa..aa9cc167f 100644 --- a/Headers/gnustep/base/NSGString.h +++ b/Headers/gnustep/base/NSGString.h @@ -28,7 +28,6 @@ #ifndef __NSGString_h_GNUSTEP_BASE_INCLUDE #define __NSGString_h_GNUSTEP_BASE_INCLUDE -#include #include /* NSGString and NSGMutableString must have the same initial ivar layout diff --git a/Headers/gnustep/base/NSGeometry.h b/Headers/gnustep/base/NSGeometry.h index a242c0c5e..240355eec 100644 --- a/Headers/gnustep/base/NSGeometry.h +++ b/Headers/gnustep/base/NSGeometry.h @@ -278,7 +278,7 @@ NSInsetRect(NSRect aRect, float dX, float dY) * "cutting" ARECT---parallel to, and a distance AMOUNT from the edge v * of ARECT determined by EDGE. You may pass 0 in as either of SLICE or * REMAINDER to avoid obtaining either of the created rectangles. */ -extern void +GS_EXPORT void NSDivideRect(NSRect aRect, NSRect *slice, NSRect *remainder, @@ -287,7 +287,7 @@ NSDivideRect(NSRect aRect, /* Returns a rectangle obtained by expanding ARECT minimally * so that all four of its defining components are integers. */ -extern NSRect +GS_EXPORT NSRect NSIntegralRect(NSRect aRect); /** Compute a Third Rectangle from Two Rectangles... **/ @@ -468,23 +468,23 @@ NSIntersectsRect(NSRect aRect, NSRect bRect) #ifdef __OBJC__ /* Returns an NSString of the form "{x=X; y=Y}", where * X and Y are the x- and y-coordinates of APOINT, respectively. */ -extern NSString * +GS_EXPORT NSString * NSStringFromPoint(NSPoint aPoint); /* Returns an NSString of the form "{x=X; y=Y; width=W; height=H}", * where X, Y, W, and H are the x-coordinate, y-coordinate, * width, and height of ARECT, respectively. */ -extern NSString * +GS_EXPORT NSString * NSStringFromRect(NSRect aRect); /* Returns an NSString of the form "{width=W; height=H}", where * W and H are the width and height of ASIZE, respectively. */ -extern NSString * +GS_EXPORT NSString * NSStringFromSize(NSSize aSize); -extern NSPoint NSPointFromString(NSString* string); -extern NSSize NSSizeFromString(NSString* string); -extern NSRect NSRectFromString(NSString* string); +GS_EXPORT NSPoint NSPointFromString(NSString* string); +GS_EXPORT NSSize NSSizeFromString(NSString* string); +GS_EXPORT NSRect NSRectFromString(NSString* string); #endif /* __OBJC__ */ diff --git a/Headers/gnustep/base/NSHashTable.h b/Headers/gnustep/base/NSHashTable.h index 05665d0af..0464c75f4 100644 --- a/Headers/gnustep/base/NSHashTable.h +++ b/Headers/gnustep/base/NSHashTable.h @@ -63,23 +63,23 @@ struct _NSHashTableCallBacks }; /* For sets of pointer-sized or smaller quantities. */ -extern const NSHashTableCallBacks NSIntHashCallBacks; +GS_EXPORT const NSHashTableCallBacks NSIntHashCallBacks; /* For sets of pointers hashed by address. */ -extern const NSHashTableCallBacks NSNonOwnedPointerHashCallBacks; +GS_EXPORT const NSHashTableCallBacks NSNonOwnedPointerHashCallBacks; /* For sets of objects without retaining and releasing. */ -extern const NSHashTableCallBacks NSNonRetainedObjectHashCallBacks; +GS_EXPORT const NSHashTableCallBacks NSNonRetainedObjectHashCallBacks; /* For sets of objects; similar to NSSet. */ -extern const NSHashTableCallBacks NSObjectHashCallBacks; +GS_EXPORT const NSHashTableCallBacks NSObjectHashCallBacks; /* For sets of pointers with transfer of ownership upon insertion. */ -extern const NSHashTableCallBacks NSOwnedPointerHashCallBacks; +GS_EXPORT const NSHashTableCallBacks NSOwnedPointerHashCallBacks; /* For sets of pointers to structs when the first field of the * struct is the size of an int. */ -extern const NSHashTableCallBacks NSPointerToStructHashCallBacks; +GS_EXPORT const NSHashTableCallBacks NSPointerToStructHashCallBacks; /* These are to increase readabilty locally. */ typedef unsigned int (*NSHT_hash_func_t)(NSHashTable *, const void *); diff --git a/Headers/gnustep/base/NSHost.h b/Headers/gnustep/base/NSHost.h index 19f260911..860055a4c 100644 --- a/Headers/gnustep/base/NSHost.h +++ b/Headers/gnustep/base/NSHost.h @@ -23,7 +23,7 @@ #ifndef __NSHost_h_GNUSTEP_BASE_INCLUDE #define __NSHost_h_GNUSTEP_BASE_INCLUDE -#include +#include @class NSString, NSArray, NSMutableArray; diff --git a/Headers/gnustep/base/NSMapTable.h b/Headers/gnustep/base/NSMapTable.h index 83ef8f967..009e71098 100644 --- a/Headers/gnustep/base/NSMapTable.h +++ b/Headers/gnustep/base/NSMapTable.h @@ -85,37 +85,37 @@ struct _NSMapTableValueCallBacks #define NSNotAPointerMapKey o_not_a_void_p_marker /* For keys that are pointer-sized or smaller quantities. */ -extern const NSMapTableKeyCallBacks NSIntMapKeyCallBacks; +GS_EXPORT const NSMapTableKeyCallBacks NSIntMapKeyCallBacks; /* For keys that are pointers not freed. */ -extern const NSMapTableKeyCallBacks NSNonOwnedPointerMapKeyCallBacks; +GS_EXPORT const NSMapTableKeyCallBacks NSNonOwnedPointerMapKeyCallBacks; /* For keys that are pointers not freed, or 0. */ -extern const NSMapTableKeyCallBacks NSNonOwnedPointerOrNullMapKeyCallBacks; +GS_EXPORT const NSMapTableKeyCallBacks NSNonOwnedPointerOrNullMapKeyCallBacks; /* For sets of objects without retaining and releasing. */ -extern const NSMapTableKeyCallBacks NSNonRetainedObjectMapKeyCallBacks; +GS_EXPORT const NSMapTableKeyCallBacks NSNonRetainedObjectMapKeyCallBacks; /* For keys that are objects. */ -extern const NSMapTableKeyCallBacks NSObjectMapKeyCallBacks; +GS_EXPORT const NSMapTableKeyCallBacks NSObjectMapKeyCallBacks; /* For keys that are pointers with transfer of ownership upon insertion. */ -extern const NSMapTableKeyCallBacks NSOwnedPointerMapKeyCallBacks; +GS_EXPORT const NSMapTableKeyCallBacks NSOwnedPointerMapKeyCallBacks; /* For values that are pointer-sized quantities. */ -extern const NSMapTableValueCallBacks NSIntMapValueCallBacks; +GS_EXPORT const NSMapTableValueCallBacks NSIntMapValueCallBacks; /* For values that are pointers not freed. */ -extern const NSMapTableValueCallBacks NSNonOwnedPointerMapValueCallBacks; +GS_EXPORT const NSMapTableValueCallBacks NSNonOwnedPointerMapValueCallBacks; /* For sets of objects without retaining and releasing. */ -extern const NSMapTableValueCallBacks NSNonRetainedObjectMapValueCallBacks; +GS_EXPORT const NSMapTableValueCallBacks NSNonRetainedObjectMapValueCallBacks; /* For values that are objects. */ -extern const NSMapTableValueCallBacks NSObjectMapValueCallBacks; +GS_EXPORT const NSMapTableValueCallBacks NSObjectMapValueCallBacks; /* For values that are pointers with transfer of ownership upon insertion. */ -extern const NSMapTableValueCallBacks NSOwnedPointerMapValueCallBacks; +GS_EXPORT const NSMapTableValueCallBacks NSOwnedPointerMapValueCallBacks; /* This is for keeping track of information... */ typedef struct _NSMT_extra _NSMT_extra_t; diff --git a/Headers/gnustep/base/NSObjCRuntime.h b/Headers/gnustep/base/NSObjCRuntime.h index d8705f0c5..3268f347f 100644 --- a/Headers/gnustep/base/NSObjCRuntime.h +++ b/Headers/gnustep/base/NSObjCRuntime.h @@ -24,26 +24,35 @@ #ifndef __NSObjCRuntime_h_GNUSTEP_BASE_INCLUDE #define __NSObjCRuntime_h_GNUSTEP_BASE_INCLUDE -#include #include +#include + +#if BUILD_libgnustep-base_DLL +# define GS_EXPORT __declspec(dllexport) +#elif libgnustep-base_ISDLL +# define GS_EXPORT extern __declspec(dllimport) +#else +# define GS_EXPORT extern +#endif +#define GS_IMPORT extern @class NSString; -extern NSString *NSStringFromSelector(SEL aSelector); -extern SEL NSSelectorFromString(NSString *aSelectorName); -extern Class NSClassFromString(NSString *aClassName); -extern NSString *NSStringFromClass(Class aClass); -extern const char *NSGetSizeAndAlignment(const char *typePtr, unsigned int *sizep, unsigned int *alignp); +GS_EXPORT NSString *NSStringFromSelector(SEL aSelector); +GS_EXPORT SEL NSSelectorFromString(NSString *aSelectorName); +GS_EXPORT Class NSClassFromString(NSString *aClassName); +GS_EXPORT NSString *NSStringFromClass(Class aClass); +GS_EXPORT const char *NSGetSizeAndAlignment(const char *typePtr, unsigned int *sizep, unsigned int *alignp); /* Logging */ /* OpenStep spec states that log messages go to stderr, but just in case someone wants them to go somewhere else, they can implement a function like this */ typedef void NSLog_printf_handler (NSString* message); -extern NSLog_printf_handler *_NSLog_printf_handler; +GS_EXPORT NSLog_printf_handler *_NSLog_printf_handler; -extern void NSLog (NSString* format, ...); -extern void NSLogv (NSString* format, va_list args); +GS_EXPORT void NSLog (NSString* format, ...); +GS_EXPORT void NSLogv (NSString* format, va_list args); #ifndef YES #define YES 1 @@ -56,8 +65,8 @@ extern void NSLogv (NSString* format, va_list args); #endif nil #ifndef NO_GNUSTEP -extern BOOL GSGetInstanceVariable(id obj, NSString *name, void* data); -extern BOOL GSSetInstanceVariable(id obj, NSString *name, const void* data); +GS_EXPORT BOOL GSGetInstanceVariable(id obj, NSString *name, void* data); +GS_EXPORT BOOL GSSetInstanceVariable(id obj, NSString *name, const void* data); #endif #define FOUNDATION_EXPORT diff --git a/Headers/gnustep/base/NSPathUtilities.h b/Headers/gnustep/base/NSPathUtilities.h index 8784da5bb..a3bc76648 100644 --- a/Headers/gnustep/base/NSPathUtilities.h +++ b/Headers/gnustep/base/NSPathUtilities.h @@ -24,7 +24,6 @@ #ifndef __NSPathUtilities_h_GNUSTEP_BASE_INCLUDE #define __NSPathUtilities_h_GNUSTEP_BASE_INCLUDE -#include #include #ifndef NO_GNUSTEP @@ -37,12 +36,12 @@ * [NSUserDefaults +resetUserDefaults] extension to reset the defaults system * to use the defaults belonging to the new user. */ -extern void GSSetUserName(NSString *name); -extern NSArray *GSStandardPathPrefixes(void); +GS_EXPORT void GSSetUserName(NSString *name); +GS_EXPORT NSArray *GSStandardPathPrefixes(void); #endif -extern NSString *NSUserName(); -extern NSString *NSHomeDirectory(); -extern NSString *NSHomeDirectoryForUser(NSString *userName); +GS_EXPORT NSString *NSUserName(); +GS_EXPORT NSString *NSHomeDirectory(); +GS_EXPORT NSString *NSHomeDirectoryForUser(NSString *userName); #ifndef STRICT_OPENSTEP typedef enum @@ -66,12 +65,12 @@ typedef unsigned int NSSearchPathDomainMask; #define NSSystemDomainMask 0x00000008 #define NSAllDomainsMask 0xffffffff -extern NSArray *NSSearchPathForDirectoriesInDomains(NSSearchPathDirectory directory, NSSearchPathDomainMask domainMask, BOOL expandTilde); -extern NSString *NSFullUserName(void); -extern NSArray *NSStandardApplicationPaths(void); -extern NSArray *NSStandardLibraryPaths(void); -extern NSString *NSTemporaryDirectory(void); -extern NSString *NSOpenStepRootDirectory(void); +GS_EXPORT NSArray *NSSearchPathForDirectoriesInDomains(NSSearchPathDirectory directory, NSSearchPathDomainMask domainMask, BOOL expandTilde); +GS_EXPORT NSString *NSFullUserName(void); +GS_EXPORT NSArray *NSStandardApplicationPaths(void); +GS_EXPORT NSArray *NSStandardLibraryPaths(void); +GS_EXPORT NSString *NSTemporaryDirectory(void); +GS_EXPORT NSString *NSOpenStepRootDirectory(void); #endif /* !STRICT_OPENSTEP */ #endif /* __NSPathUtilities_h_GNUSTEP_BASE_INCLUDE */ diff --git a/Headers/gnustep/base/NSPort.h b/Headers/gnustep/base/NSPort.h index 5bfce12df..2f53390c1 100644 --- a/Headers/gnustep/base/NSPort.h +++ b/Headers/gnustep/base/NSPort.h @@ -32,7 +32,7 @@ @class NSRunLoop; @class NSString; -extern NSString *NSPortTimeoutException; /* OPENSTEP */ +GS_EXPORT NSString *NSPortTimeoutException; /* OPENSTEP */ @interface NSPort : NSObject { @@ -79,7 +79,7 @@ extern NSString *NSPortTimeoutException; /* OPENSTEP */ @end #endif -extern NSString* NSPortDidBecomeInvalidNotification; +GS_EXPORT NSString* NSPortDidBecomeInvalidNotification; #define PortBecameInvalidNotification NSPortDidBecomeInvalidNotification diff --git a/Headers/gnustep/base/NSPortCoder.h b/Headers/gnustep/base/NSPortCoder.h index 0a29f7f60..b65e73685 100644 --- a/Headers/gnustep/base/NSPortCoder.h +++ b/Headers/gnustep/base/NSPortCoder.h @@ -24,7 +24,6 @@ #ifndef __NSPortCoder_h #define __NSPortCoder_h -#include #include @class NSConnection; diff --git a/Headers/gnustep/base/NSProcessInfo.h b/Headers/gnustep/base/NSProcessInfo.h index 5736d2ebd..a56a1174e 100644 --- a/Headers/gnustep/base/NSProcessInfo.h +++ b/Headers/gnustep/base/NSProcessInfo.h @@ -26,7 +26,7 @@ #ifndef __NSProcessInfo_h_GNUSTEP_BASE_INCLUDE #define __NSProcessInfo_h_GNUSTEP_BASE_INCLUDE -#include +#include @class NSArray; @class NSMutableArray; @@ -63,7 +63,7 @@ * This function determines if the specified debug level is present in the * set of active debug levels. */ -extern BOOL GSDebugSet(NSString *level); +GS_EXPORT BOOL GSDebugSet(NSString *level); #endif diff --git a/Headers/gnustep/base/NSProxy.h b/Headers/gnustep/base/NSProxy.h index fe53969ea..18d5452b0 100644 --- a/Headers/gnustep/base/NSProxy.h +++ b/Headers/gnustep/base/NSProxy.h @@ -24,10 +24,8 @@ #ifndef __NSProxy_h_GNUSTEP_BASE_INCLUDE #define __NSProxy_h_GNUSTEP_BASE_INCLUDE -#include #include - @interface NSProxy { @public diff --git a/Headers/gnustep/base/NSRange.h b/Headers/gnustep/base/NSRange.h index fae35155d..d01d724d8 100644 --- a/Headers/gnustep/base/NSRange.h +++ b/Headers/gnustep/base/NSRange.h @@ -86,7 +86,7 @@ NSLocationInRange(unsigned location, NSRange range) } /* Create an NSRange having the specified LOCATION and LENGTH. */ -extern NSRange +GS_EXPORT NSRange NSMakeRange(unsigned int location, unsigned int length); GS_RANGE_SCOPE BOOL @@ -134,8 +134,8 @@ NSIntersectionRange (NSRange aRange, NSRange bRange) @class NSString; -extern NSString *NSStringFromRange(NSRange range); -extern NSRange NSRangeFromString(NSString *aString); +GS_EXPORT NSString *NSStringFromRange(NSRange range); +GS_EXPORT NSRange NSRangeFromString(NSString *aString); #ifdef GS_DEFINED_MAX #undef GS_DEFINED_MAX diff --git a/Headers/gnustep/base/NSRunLoop.h b/Headers/gnustep/base/NSRunLoop.h index 58fb828e3..bd02ce911 100644 --- a/Headers/gnustep/base/NSRunLoop.h +++ b/Headers/gnustep/base/NSRunLoop.h @@ -24,13 +24,12 @@ #ifndef __NSRunLoop_h_GNUSTEP_BASE_INCLUDE #define __NSRunLoop_h_GNUSTEP_BASE_INCLUDE -#include #include @class NSTimer, NSDate, NSPort; /* Mode strings. */ -extern id NSDefaultRunLoopMode; +GS_EXPORT id NSDefaultRunLoopMode; @interface NSRunLoop : NSObject { diff --git a/Headers/gnustep/base/NSScanner.h b/Headers/gnustep/base/NSScanner.h index 6f53b2650..1073d88e3 100644 --- a/Headers/gnustep/base/NSScanner.h +++ b/Headers/gnustep/base/NSScanner.h @@ -24,7 +24,6 @@ #ifndef __NSScanner_h_GNUSTEP_INCLUDE #define __NSScanner_h_GNUSTEP_INCLUDE -#include #include #include #include diff --git a/Headers/gnustep/base/NSSet.h b/Headers/gnustep/base/NSSet.h index d8452e3f5..c27457bb2 100644 --- a/Headers/gnustep/base/NSSet.h +++ b/Headers/gnustep/base/NSSet.h @@ -24,7 +24,7 @@ #ifndef _NSSet_h_GNUSTEP_BASE_INCLUDE #define _NSSet_h_GNUSTEP_BASE_INCLUDE -#include +#include @class NSArray, NSString, NSEnumerator, NSDictionary; diff --git a/Headers/gnustep/base/NSString.h b/Headers/gnustep/base/NSString.h index 1e0b05c24..0a8064a59 100644 --- a/Headers/gnustep/base/NSString.h +++ b/Headers/gnustep/base/NSString.h @@ -24,8 +24,7 @@ #ifndef __NSString_h_GNUSTEP_BASE_INCLUDE #define __NSString_h_GNUSTEP_BASE_INCLUDE -#include - +#include #include typedef unsigned short unichar; diff --git a/Headers/gnustep/base/NSTask.h b/Headers/gnustep/base/NSTask.h index 2a260f206..3303411df 100644 --- a/Headers/gnustep/base/NSTask.h +++ b/Headers/gnustep/base/NSTask.h @@ -24,7 +24,6 @@ #ifndef __NSTask_h_GNUSTEP_BASE_INCLUDE #define __NSTask_h_GNUSTEP_BASE_INCLUDE -#include #include #include #include @@ -88,6 +87,6 @@ - (void) waitUntilExit; @end -extern NSString* NSTaskDidTerminateNotification; +GS_EXPORT NSString* NSTaskDidTerminateNotification; #endif /* __NSTask_h_GNUSTEP_BASE_INCLUDE */ diff --git a/Headers/gnustep/base/NSThread.h b/Headers/gnustep/base/NSThread.h index 4e849ad71..82267bd4d 100644 --- a/Headers/gnustep/base/NSThread.h +++ b/Headers/gnustep/base/NSThread.h @@ -25,7 +25,6 @@ #ifndef __NSThread_h_GNUSTEP_BASE_INCLUDE #define __NSThread_h_GNUSTEP_BASE_INCLUDE -#include #include #include #include @@ -66,17 +65,17 @@ typedef enum @end /* Notification Strings. */ -extern NSString *NSWillBecomeMultiThreadedNotification; +GS_EXPORT NSString *NSWillBecomeMultiThreadedNotification; #define NSBecomingMultiThreaded NSWillBecomeMultiThreadedNotification -extern NSString *NSThreadWillExitNotification; +GS_EXPORT NSString *NSThreadWillExitNotification; #define NSThreadExiting NSThreadWillExitNotification #ifndef NO_GNUSTEP /* * Get current thread and it's dictionary. */ -extern NSThread *GSCurrentThread(); -extern NSMutableDictionary *GSCurrentThreadDictionary(); +GS_EXPORT NSThread *GSCurrentThread(); +GS_EXPORT NSMutableDictionary *GSCurrentThreadDictionary(); #endif #endif /* __NSThread_h_GNUSTEP_BASE_INCLUDE */ diff --git a/Headers/gnustep/base/NSTimer.h b/Headers/gnustep/base/NSTimer.h index 97b6ed9f6..2d3bd86fd 100644 --- a/Headers/gnustep/base/NSTimer.h +++ b/Headers/gnustep/base/NSTimer.h @@ -27,7 +27,6 @@ /* This class is currently thrown together. When it is cleaned up, it may no longer be concrete. */ -#include #include /* diff --git a/Headers/gnustep/base/NSURL.h b/Headers/gnustep/base/NSURL.h index 0896a9df1..b9ad3f0d4 100644 --- a/Headers/gnustep/base/NSURL.h +++ b/Headers/gnustep/base/NSURL.h @@ -29,7 +29,7 @@ @class NSURLHandle; @class NSURL; -extern NSString* NSURLFileScheme; //file +GS_EXPORT NSString* NSURLFileScheme; //file //============================================================================ @interface NSURL: NSObject diff --git a/Headers/gnustep/base/NSURLHandle.h b/Headers/gnustep/base/NSURLHandle.h index 016d0f922..c677f7669 100644 --- a/Headers/gnustep/base/NSURLHandle.h +++ b/Headers/gnustep/base/NSURLHandle.h @@ -27,11 +27,11 @@ @class NSURLHandle; @class NSURL; -extern NSString *NSHTTPPropertyStatusCodeKey; -extern NSString *NSHTTPPropertyStatusReasonKey; -extern NSString *NSHTTPPropertyServerHTTPVersionKey; -extern NSString *NSHTTPPropertyRedirectionHeadersKey; -extern NSString *NSHTTPPropertyErrorPageDataKey; +GS_EXPORT NSString *NSHTTPPropertyStatusCodeKey; +GS_EXPORT NSString *NSHTTPPropertyStatusReasonKey; +GS_EXPORT NSString *NSHTTPPropertyServerHTTPVersionKey; +GS_EXPORT NSString *NSHTTPPropertyRedirectionHeadersKey; +GS_EXPORT NSString *NSHTTPPropertyErrorPageDataKey; typedef enum { diff --git a/Headers/gnustep/base/NSUndoManager.h b/Headers/gnustep/base/NSUndoManager.h index db34bd01f..ad0eddfee 100644 --- a/Headers/gnustep/base/NSUndoManager.h +++ b/Headers/gnustep/base/NSUndoManager.h @@ -31,13 +31,13 @@ @class NSInvocation; /* Public notification */ -extern NSString *NSUndoManagerCheckpointNotification; -extern NSString *NSUndoManagerDidOpenUndoGroupNotification; -extern NSString *NSUndoManagerDidRedoChangeNotification; -extern NSString *NSUndoManagerDidUndoChangeNotification; -extern NSString *NSUndoManagerWillCloseUndoGroupNotification; -extern NSString *NSUndoManagerWillRedoChangeNotification; -extern NSString *NSUndoManagerWillUndoChangeNotification; +GS_EXPORT NSString *NSUndoManagerCheckpointNotification; +GS_EXPORT NSString *NSUndoManagerDidOpenUndoGroupNotification; +GS_EXPORT NSString *NSUndoManagerDidRedoChangeNotification; +GS_EXPORT NSString *NSUndoManagerDidUndoChangeNotification; +GS_EXPORT NSString *NSUndoManagerWillCloseUndoGroupNotification; +GS_EXPORT NSString *NSUndoManagerWillRedoChangeNotification; +GS_EXPORT NSString *NSUndoManagerWillUndoChangeNotification; @interface NSUndoManager: NSObject { diff --git a/Headers/gnustep/base/NSUserDefaults.h b/Headers/gnustep/base/NSUserDefaults.h index a71ddb6c9..93950486d 100644 --- a/Headers/gnustep/base/NSUserDefaults.h +++ b/Headers/gnustep/base/NSUserDefaults.h @@ -37,42 +37,42 @@ @class NSTimer; /* Standard domains */ -extern NSString* const NSArgumentDomain; -extern NSString* const NSGlobalDomain; -extern NSString* const NSRegistrationDomain; +GS_EXPORT NSString* const NSArgumentDomain; +GS_EXPORT NSString* const NSGlobalDomain; +GS_EXPORT NSString* const NSRegistrationDomain; /* Public notification */ -extern NSString* const NSUserDefaultsDidChangeNotification; +GS_EXPORT NSString* const NSUserDefaultsDidChangeNotification; /* Backwards compatibility */ #define NSUserDefaultsChanged NSUserDefaultsDidChangeNotification /* Keys for language-dependent information */ -extern NSString* const NSWeekDayNameArray; -extern NSString* const NSShortWeekDayNameArray; -extern NSString* const NSMonthNameArray; -extern NSString* const NSShortMonthNameArray; -extern NSString* const NSTimeFormatString; -extern NSString* const NSDateFormatString; -extern NSString* const NSTimeDateFormatString; -extern NSString* const NSShortTimeDateFormatString; -extern NSString* const NSCurrencySymbol; -extern NSString* const NSDecimalSeparator; -extern NSString* const NSThousandsSeparator; -extern NSString* const NSInternationalCurrencyString; -extern NSString* const NSCurrencyString; -extern NSString* const NSDecimalDigits; -extern NSString* const NSAMPMDesignation; +GS_EXPORT NSString* const NSWeekDayNameArray; +GS_EXPORT NSString* const NSShortWeekDayNameArray; +GS_EXPORT NSString* const NSMonthNameArray; +GS_EXPORT NSString* const NSShortMonthNameArray; +GS_EXPORT NSString* const NSTimeFormatString; +GS_EXPORT NSString* const NSDateFormatString; +GS_EXPORT NSString* const NSTimeDateFormatString; +GS_EXPORT NSString* const NSShortTimeDateFormatString; +GS_EXPORT NSString* const NSCurrencySymbol; +GS_EXPORT NSString* const NSDecimalSeparator; +GS_EXPORT NSString* const NSThousandsSeparator; +GS_EXPORT NSString* const NSInternationalCurrencyString; +GS_EXPORT NSString* const NSCurrencyString; +GS_EXPORT NSString* const NSDecimalDigits; +GS_EXPORT NSString* const NSAMPMDesignation; #ifndef STRICT_OPENSTEP -extern NSString* const NSHourNameDesignations; -extern NSString* const NSYearMonthWeekDesignations; -extern NSString* const NSEarlierTimeDesignations; -extern NSString* const NSLaterTimeDesignations; -extern NSString* const NSThisDayDesignations; -extern NSString* const NSNextDayDesignations; -extern NSString* const NSNextNextDayDesignations; -extern NSString* const NSPriorDayDesignations; -extern NSString* const NSDateTimeOrdering; +GS_EXPORT NSString* const NSHourNameDesignations; +GS_EXPORT NSString* const NSYearMonthWeekDesignations; +GS_EXPORT NSString* const NSEarlierTimeDesignations; +GS_EXPORT NSString* const NSLaterTimeDesignations; +GS_EXPORT NSString* const NSThisDayDesignations; +GS_EXPORT NSString* const NSNextDayDesignations; +GS_EXPORT NSString* const NSNextNextDayDesignations; +GS_EXPORT NSString* const NSPriorDayDesignations; +GS_EXPORT NSString* const NSDateTimeOrdering; #endif /* General implementation notes: diff --git a/Headers/gnustep/base/NSZone.h b/Headers/gnustep/base/NSZone.h index 723a8e521..2afd7e477 100644 --- a/Headers/gnustep/base/NSZone.h +++ b/Headers/gnustep/base/NSZone.h @@ -23,7 +23,7 @@ #ifndef __NSZone_h_GNUSTEP_BASE_INCLUDE #define __NSZone_h_GNUSTEP_BASE_INCLUDE -#include +#include @class NSString; @@ -60,7 +60,7 @@ void *GSOutOfMemory(size_t size, BOOL retry); /* Default zone. Name is hopelessly long so that no one will ever want to use it. ;) Private variable. */ -extern NSZone* __nszone_private_hidden_default_zone; +GS_EXPORT NSZone* __nszone_private_hidden_default_zone; #ifndef GS_WITH_GC #define GS_WITH_GC 0 @@ -69,21 +69,21 @@ extern NSZone* __nszone_private_hidden_default_zone; #include -extern NSZone* __nszone_private_hidden_atomic_zone; +GS_EXPORT NSZone* __nszone_private_hidden_atomic_zone; -extern inline NSZone* NSCreateZone (size_t start, size_t gran, BOOL canFree) +GS_EXPORT inline NSZone* NSCreateZone (size_t start, size_t gran, BOOL canFree) { return __nszone_private_hidden_default_zone; } -extern inline NSZone* NSDefaultMallocZone (void) +GS_EXPORT inline NSZone* NSDefaultMallocZone (void) { return __nszone_private_hidden_default_zone; } -extern inline NSZone* GSAtomicMallocZone (void) +GS_EXPORT inline NSZone* GSAtomicMallocZone (void) { return __nszone_private_hidden_atomic_zone; } -extern inline NSZone* NSZoneFromPointer (void *ptr) +GS_EXPORT inline NSZone* NSZoneFromPointer (void *ptr) { return __nszone_private_hidden_default_zone; } -extern inline void* NSZoneMalloc (NSZone *zone, size_t size) +GS_EXPORT inline void* NSZoneMalloc (NSZone *zone, size_t size) { void *ptr; @@ -97,7 +97,7 @@ extern inline void* NSZoneMalloc (NSZone *zone, size_t size) return ptr; } -extern inline void* NSZoneCalloc (NSZone *zone, size_t elems, size_t bytes) +GS_EXPORT inline void* NSZoneCalloc (NSZone *zone, size_t elems, size_t bytes) { size_t size = elems * bytes; void *ptr; @@ -113,7 +113,7 @@ extern inline void* NSZoneCalloc (NSZone *zone, size_t elems, size_t bytes) return ptr; } -extern inline void* NSZoneRealloc (NSZone *zone, void *ptr, size_t size) +GS_EXPORT inline void* NSZoneRealloc (NSZone *zone, void *ptr, size_t size) { ptr = GC_REALLOC(ptr, size); if (ptr == 0) @@ -121,37 +121,37 @@ extern inline void* NSZoneRealloc (NSZone *zone, void *ptr, size_t size) return ptr; } -extern inline void NSRecycleZone (NSZone *zone) +GS_EXPORT inline void NSRecycleZone (NSZone *zone) { } -extern inline void NSZoneFree (NSZone *zone, void *ptr) +GS_EXPORT inline void NSZoneFree (NSZone *zone, void *ptr) { GC_FREE(ptr); } -extern inline void NSSetZoneName (NSZone *zone, NSString *name) +GS_EXPORT inline void NSSetZoneName (NSZone *zone, NSString *name) { } -extern inline NSString* NSZoneName (NSZone *zone) +GS_EXPORT inline NSString* NSZoneName (NSZone *zone) { return nil; } #ifndef NO_GNUSTEP -extern inline void* NSZoneMallocAtomic (NSZone *zone, size_t size) +GS_EXPORT inline void* NSZoneMallocAtomic (NSZone *zone, size_t size) { return NSZoneMalloc(GSAtomicMallocZone(), size); } -extern inline BOOL NSZoneCheck (NSZone *zone) +GS_EXPORT inline BOOL NSZoneCheck (NSZone *zone) { return YES; } -extern inline struct NSZoneStats NSZoneStats (NSZone *zone) +GS_EXPORT inline struct NSZoneStats NSZoneStats (NSZone *zone) { struct NSZoneStats stats = { 0 }; return stats; @@ -160,53 +160,53 @@ extern inline struct NSZoneStats NSZoneStats (NSZone *zone) #else /* GS_WITH_GC */ -extern NSZone* NSCreateZone (size_t start, size_t gran, BOOL canFree); +GS_EXPORT NSZone* NSCreateZone (size_t start, size_t gran, BOOL canFree); -extern inline NSZone* NSDefaultMallocZone (void) +GS_EXPORT inline NSZone* NSDefaultMallocZone (void) { return __nszone_private_hidden_default_zone; } -extern inline NSZone* GSAtomicMallocZone (void) +GS_EXPORT inline NSZone* GSAtomicMallocZone (void) { return NSDefaultMallocZone(); } -extern NSZone* NSZoneFromPointer (void *ptr); +GS_EXPORT NSZone* NSZoneFromPointer (void *ptr); -extern inline void* NSZoneMalloc (NSZone *zone, size_t size) +GS_EXPORT inline void* NSZoneMalloc (NSZone *zone, size_t size) { if (!zone) zone = NSDefaultMallocZone(); return (zone->malloc)(zone, size); } -extern void* NSZoneCalloc (NSZone *zone, size_t elems, size_t bytes); +GS_EXPORT void* NSZoneCalloc (NSZone *zone, size_t elems, size_t bytes); -extern inline void* NSZoneRealloc (NSZone *zone, void *ptr, size_t size) +GS_EXPORT inline void* NSZoneRealloc (NSZone *zone, void *ptr, size_t size) { if (!zone) zone = NSDefaultMallocZone(); return (zone->realloc)(zone, ptr, size); } -extern inline void NSRecycleZone (NSZone *zone) +GS_EXPORT inline void NSRecycleZone (NSZone *zone) { if (!zone) zone = NSDefaultMallocZone(); (zone->recycle)(zone); } -extern inline void NSZoneFree (NSZone *zone, void *ptr) +GS_EXPORT inline void NSZoneFree (NSZone *zone, void *ptr) { if (!zone) zone = NSDefaultMallocZone(); (zone->free)(zone, ptr); } -extern void NSSetZoneName (NSZone *zone, NSString *name); +GS_EXPORT void NSSetZoneName (NSZone *zone, NSString *name); -extern inline NSString* NSZoneName (NSZone *zone) +GS_EXPORT inline NSString* NSZoneName (NSZone *zone) { if (!zone) zone = NSDefaultMallocZone(); @@ -214,21 +214,21 @@ extern inline NSString* NSZoneName (NSZone *zone) } #ifndef NO_GNUSTEP -extern inline void* NSZoneMallocAtomic (NSZone *zone, size_t size) +GS_EXPORT inline void* NSZoneMallocAtomic (NSZone *zone, size_t size) { if (!zone) zone = NSDefaultMallocZone(); return (zone->malloc)(zone, size); } -extern inline BOOL NSZoneCheck (NSZone *zone) +GS_EXPORT inline BOOL NSZoneCheck (NSZone *zone) { if (!zone) zone = NSDefaultMallocZone(); return (zone->check)(zone); } -extern inline struct NSZoneStats NSZoneStats (NSZone *zone) +GS_EXPORT inline struct NSZoneStats NSZoneStats (NSZone *zone) { if (!zone) zone = NSDefaultMallocZone(); @@ -239,22 +239,22 @@ extern inline struct NSZoneStats NSZoneStats (NSZone *zone) #endif /* GS_WITH_GC */ -extern unsigned NSPageSize (void) __attribute__ ((const)); +GS_EXPORT unsigned NSPageSize (void) __attribute__ ((const)); -extern unsigned NSLogPageSize (void) __attribute__ ((const)); +GS_EXPORT unsigned NSLogPageSize (void) __attribute__ ((const)); -extern unsigned NSRoundDownToMultipleOfPageSize (unsigned bytes) +GS_EXPORT unsigned NSRoundDownToMultipleOfPageSize (unsigned bytes) __attribute__ ((const)); -extern unsigned NSRoundUpToMultipleOfPageSize (unsigned bytes) +GS_EXPORT unsigned NSRoundUpToMultipleOfPageSize (unsigned bytes) __attribute__ ((const)); -extern unsigned NSRealMemoryAvailable (void); +GS_EXPORT unsigned NSRealMemoryAvailable (void); -extern void* NSAllocateMemoryPages (unsigned bytes); +GS_EXPORT void* NSAllocateMemoryPages (unsigned bytes); -extern void NSDeallocateMemoryPages (void *ptr, unsigned bytes); +GS_EXPORT void NSDeallocateMemoryPages (void *ptr, unsigned bytes); -extern void NSCopyMemoryPages (const void *src, void *dest, unsigned bytes); +GS_EXPORT void NSCopyMemoryPages (const void *src, void *dest, unsigned bytes); #endif /* not __NSZone_h_GNUSTEP_BASE_INCLUDE */ diff --git a/Headers/gnustep/base/NotificationDispatcher.h b/Headers/gnustep/base/NotificationDispatcher.h index 523377951..09b5f0b0d 100644 --- a/Headers/gnustep/base/NotificationDispatcher.h +++ b/Headers/gnustep/base/NotificationDispatcher.h @@ -56,7 +56,6 @@ */ -#include #include #include #include diff --git a/Headers/gnustep/base/OrderedCollecting.h b/Headers/gnustep/base/OrderedCollecting.h index dd592ffe5..3b5c3bb7b 100644 --- a/Headers/gnustep/base/OrderedCollecting.h +++ b/Headers/gnustep/base/OrderedCollecting.h @@ -35,7 +35,6 @@ #ifndef __OrderedCollecting_h_GNUSTEP_BASE_INCLUDE #define __OrderedCollecting_h_GNUSTEP_BASE_INCLUDE -#include #include @protocol OrderedCollecting diff --git a/Headers/gnustep/base/OrderedCollection.h b/Headers/gnustep/base/OrderedCollection.h index 69eebdd4c..709688002 100644 --- a/Headers/gnustep/base/OrderedCollection.h +++ b/Headers/gnustep/base/OrderedCollection.h @@ -24,7 +24,6 @@ #ifndef __OrderedCollection_h_GNUSTEP_BASE_INCLUDE #define __OrderedCollection_h_GNUSTEP_BASE_INCLUDE -#include #include #include diff --git a/Headers/gnustep/base/Ordering.h b/Headers/gnustep/base/Ordering.h index 2ec72e166..ff4a5ee39 100644 --- a/Headers/gnustep/base/Ordering.h +++ b/Headers/gnustep/base/Ordering.h @@ -24,8 +24,8 @@ #ifndef __Ordering_h_GNUSTEP_BASE_INCLUDE #define __Ordering_h_GNUSTEP_BASE_INCLUDE -#include #include +#include @protocol Ordering diff --git a/Headers/gnustep/base/Port.h b/Headers/gnustep/base/Port.h index 2a907d66e..1358587b5 100644 --- a/Headers/gnustep/base/Port.h +++ b/Headers/gnustep/base/Port.h @@ -24,7 +24,6 @@ #ifndef __Port_h_GNUSTEP_BASE_INCLUDE #define __Port_h_GNUSTEP_BASE_INCLUDE -#include #include #include #include diff --git a/Headers/gnustep/base/Queue.h b/Headers/gnustep/base/Queue.h index 0b1ae3d26..beb6d8354 100644 --- a/Headers/gnustep/base/Queue.h +++ b/Headers/gnustep/base/Queue.h @@ -24,7 +24,6 @@ #ifndef __Queue_h_GNUSTEP_BASE_INCLUDE #define __Queue_h_GNUSTEP_BASE_INCLUDE -#include #include @interface Queue : CircularArray diff --git a/Headers/gnustep/base/RBTree.h b/Headers/gnustep/base/RBTree.h index b10a1fdad..37b67e32c 100644 --- a/Headers/gnustep/base/RBTree.h +++ b/Headers/gnustep/base/RBTree.h @@ -24,7 +24,6 @@ #ifndef __RBTree_h_GNUSTEP_BASE_INCLUDE #define __RBTree_h_GNUSTEP_BASE_INCLUDE -#include #include @protocol RBTreeComprising diff --git a/Headers/gnustep/base/RBTreeNode.h b/Headers/gnustep/base/RBTreeNode.h index adf00f219..5072e010b 100644 --- a/Headers/gnustep/base/RBTreeNode.h +++ b/Headers/gnustep/base/RBTreeNode.h @@ -24,7 +24,6 @@ #ifndef __RBTreeNode_h_GNUSTEP_BASE_INCLUDE #define __RBTreeNode_h_GNUSTEP_BASE_INCLUDE -#include #include #include diff --git a/Headers/gnustep/base/README b/Headers/gnustep/base/README deleted file mode 100644 index 6f3524f50..000000000 --- a/Headers/gnustep/base/README +++ /dev/null @@ -1,8 +0,0 @@ -This directory contains header files for the GNU Objective C Class -Library, `libobjects'. - -The complete list of include file directories belonging to libobjects -is: - ../objects - ../objc - ../Foundation diff --git a/Headers/gnustep/base/RNGAdditiveCongruential.h b/Headers/gnustep/base/RNGAdditiveCongruential.h index 804f43eaa..1e6a79c9f 100644 --- a/Headers/gnustep/base/RNGAdditiveCongruential.h +++ b/Headers/gnustep/base/RNGAdditiveCongruential.h @@ -27,7 +27,6 @@ #ifndef __RNGAdditiveCongruential_h_GNUSTEP_BASE_INCLUDE #define __RNGAdditiveCongruential_h_GNUSTEP_BASE_INCLUDE -#include #include @interface RNGAdditiveCongruential : NSObject diff --git a/Headers/gnustep/base/RNGBerkeley.h b/Headers/gnustep/base/RNGBerkeley.h index d16474d38..2d6a8e15e 100644 --- a/Headers/gnustep/base/RNGBerkeley.h +++ b/Headers/gnustep/base/RNGBerkeley.h @@ -47,7 +47,6 @@ * It was reworked for the GNU Objective-C Library by Andrew Kachites McCallum */ -#include #include @interface RNGBerkeley : NSObject diff --git a/Headers/gnustep/base/Random.h b/Headers/gnustep/base/Random.h index bb728464d..1df32c2fc 100644 --- a/Headers/gnustep/base/Random.h +++ b/Headers/gnustep/base/Random.h @@ -24,7 +24,6 @@ #ifndef __Random_h_GNUSTEP_BASE_INCLUDE #define __Random_h_GNUSTEP_BASE_INCLUDE -#include #include @interface Random : NSObject diff --git a/Headers/gnustep/base/RandomGenerating.h b/Headers/gnustep/base/RandomGenerating.h index ebdeda47b..3422de1d0 100644 --- a/Headers/gnustep/base/RandomGenerating.h +++ b/Headers/gnustep/base/RandomGenerating.h @@ -24,7 +24,7 @@ #ifndef __RandomGenerating_h_GNUSTEP_BASE_INCLUDE #define __RandomGenerating_h_GNUSTEP_BASE_INCLUDE -#include +#include @protocol RandomGenerating diff --git a/Headers/gnustep/base/RawCStream.h b/Headers/gnustep/base/RawCStream.h index 2cd99f7b8..b0ead9d56 100644 --- a/Headers/gnustep/base/RawCStream.h +++ b/Headers/gnustep/base/RawCStream.h @@ -24,7 +24,6 @@ #ifndef __RawCStream_h_GNUSTEP_BASE_INCLUDE #define __RawCStream_h_GNUSTEP_BASE_INCLUDE -#include #include #include diff --git a/Headers/gnustep/base/Retaining.h b/Headers/gnustep/base/Retaining.h index 19c794120..851b6b1e9 100644 --- a/Headers/gnustep/base/Retaining.h +++ b/Headers/gnustep/base/Retaining.h @@ -24,7 +24,7 @@ #ifndef __Retaining_h_GNUSTEP_BASE_INCLUDE #define __Retaining_h_GNUSTEP_BASE_INCLUDE -#include +#include @protocol Retaining diff --git a/Headers/gnustep/base/Set.h b/Headers/gnustep/base/Set.h index 787842ffa..82d930542 100644 --- a/Headers/gnustep/base/Set.h +++ b/Headers/gnustep/base/Set.h @@ -24,7 +24,6 @@ #ifndef __Set_h_GNUSTEP_BASE_INCLUDE #define __Set_h_GNUSTEP_BASE_INCLUDE -#include #include #include diff --git a/Headers/gnustep/base/SplayTree.h b/Headers/gnustep/base/SplayTree.h index 8e71720a8..ada513a8a 100644 --- a/Headers/gnustep/base/SplayTree.h +++ b/Headers/gnustep/base/SplayTree.h @@ -34,7 +34,6 @@ #ifndef __SplayTree_h_GNUSTEP_BASE_INCLUDE #define __SplayTree_h_GNUSTEP_BASE_INCLUDE -#include #include @interface SplayTree : BinaryTree diff --git a/Headers/gnustep/base/Stack.h b/Headers/gnustep/base/Stack.h index 5ea1df2cb..033458792 100644 --- a/Headers/gnustep/base/Stack.h +++ b/Headers/gnustep/base/Stack.h @@ -24,7 +24,6 @@ #ifndef __Stack_h_GNUSTEP_BASE_INCLUDE #define __Stack_h_GNUSTEP_BASE_INCLUDE -#include #include @interface Stack : Array diff --git a/Headers/gnustep/base/StdioStream.h b/Headers/gnustep/base/StdioStream.h index 2612f3dab..9070e11d3 100644 --- a/Headers/gnustep/base/StdioStream.h +++ b/Headers/gnustep/base/StdioStream.h @@ -24,7 +24,6 @@ #ifndef __StdioStream_h__GNUSTEP_BASE_INCLUDE #define __StdioStream_h__GNUSTEP_BASE_INCLUDE -#include #include #include diff --git a/Headers/gnustep/base/Stream.h b/Headers/gnustep/base/Stream.h index f8fd606a8..579af4a64 100644 --- a/Headers/gnustep/base/Stream.h +++ b/Headers/gnustep/base/Stream.h @@ -24,10 +24,9 @@ #ifndef __Stream_h__GNUSTEP_BASE_INCLUDE #define __Stream_h__GNUSTEP_BASE_INCLUDE -#include #include -extern NSString* StreamException; +GS_EXPORT NSString* StreamException; @interface Stream : NSObject diff --git a/Headers/gnustep/base/Streaming.h b/Headers/gnustep/base/Streaming.h index e0b61458c..5543261ae 100644 --- a/Headers/gnustep/base/Streaming.h +++ b/Headers/gnustep/base/Streaming.h @@ -24,7 +24,7 @@ #ifndef __Streaming_h__GNUSTEP_BASE_INCLUDE #define __Streaming_h__GNUSTEP_BASE_INCLUDE -#include +#include @protocol Streaming diff --git a/Headers/gnustep/base/TcpPort.h b/Headers/gnustep/base/TcpPort.h index b3fdf8381..59e6ab211 100644 --- a/Headers/gnustep/base/TcpPort.h +++ b/Headers/gnustep/base/TcpPort.h @@ -24,10 +24,9 @@ #ifndef __TcpPort_h__GNUSTEP_BASE_INCLUDE #define __TcpPort_h__GNUSTEP_BASE_INCLUDE -#include #include #include -#ifdef __MINGW__ +#ifdef __MINGW32__ # include #else #include @@ -89,8 +88,8 @@ /* Notification Strings. */ -extern NSString *InPortClientBecameInvalidNotification; -extern NSString *InPortAcceptedClientNotification; +GS_EXPORT NSString *InPortClientBecameInvalidNotification; +GS_EXPORT NSString *InPortAcceptedClientNotification; #endif /* __TcpPort_h__GNUSTEP_BASE_INCLUDE */ diff --git a/Headers/gnustep/base/TextCStream.h b/Headers/gnustep/base/TextCStream.h index b454240ef..ff01157db 100644 --- a/Headers/gnustep/base/TextCStream.h +++ b/Headers/gnustep/base/TextCStream.h @@ -24,7 +24,6 @@ #ifndef __TextCStream_h_GNUSTEP_BASE_INCLUDE #define __TextCStream_h_GNUSTEP_BASE_INCLUDE -#include #include #include diff --git a/Headers/gnustep/base/Time.h b/Headers/gnustep/base/Time.h index 909f3844b..86d71235a 100644 --- a/Headers/gnustep/base/Time.h +++ b/Headers/gnustep/base/Time.h @@ -26,7 +26,6 @@ #ifndef __Time_h_GNUSTEP_BASE_INCLUDE #define __Time_h_GNUSTEP_BASE_INCLUDE -#include #include #ifndef __WIN32__ diff --git a/Headers/gnustep/base/UdpPort.h b/Headers/gnustep/base/UdpPort.h index 62b392596..a0386982e 100644 --- a/Headers/gnustep/base/UdpPort.h +++ b/Headers/gnustep/base/UdpPort.h @@ -24,10 +24,9 @@ #ifndef __UdpPort_h_GNUSTEP_BASE_INCLUDE #define __UdpPort_h_GNUSTEP_BASE_INCLUDE -#include #include #include -#ifdef __MINGW__ +#ifdef __MINGW32__ # include #else # include diff --git a/Headers/gnustep/base/ValueHolding.h b/Headers/gnustep/base/ValueHolding.h index 205b2351e..4bd44062b 100644 --- a/Headers/gnustep/base/ValueHolding.h +++ b/Headers/gnustep/base/ValueHolding.h @@ -24,7 +24,7 @@ #ifndef __ValueHolding_h_GNUSTEP_BASE_INCLUDE #define __ValueHolding_h_GNUSTEP_BASE_INCLUDE -#include +#include /* protocol String; */ diff --git a/Headers/gnustep/base/all.h b/Headers/gnustep/base/all.h index 0df28232b..711ddda15 100644 --- a/Headers/gnustep/base/all.h +++ b/Headers/gnustep/base/all.h @@ -24,8 +24,6 @@ #ifndef __o_h_GNUSTEP_BASE_INCLUDE #define __o_h_GNUSTEP_BASE_INCLUDE -#include - /* Collection objects */ #include #include diff --git a/Headers/gnustep/base/fast.x b/Headers/gnustep/base/fast.x index 5228dba68..003873df9 100644 --- a/Headers/gnustep/base/fast.x +++ b/Headers/gnustep/base/fast.x @@ -26,6 +26,7 @@ #include #include +#include #ifndef INLINE #define INLINE inline @@ -85,7 +86,7 @@ typedef struct { Class _NSDataMalloc; Class _NSMutableDataMalloc; } fastCls; -extern fastCls _fastCls; /* Populated by _fastBuildCache() */ +GS_EXPORT fastCls _fastCls; /* Populated by _fastBuildCache() */ /* * Structure to cache method implementation information. @@ -102,7 +103,7 @@ typedef struct { BOOL (*_NSGString_isEqual_)(); BOOL (*_NSGCString_isEqual_)(); } fastImp; -extern fastImp _fastImp; /* Populated by _fastBuildCache() */ +GS_EXPORT fastImp _fastImp; /* Populated by _fastBuildCache() */ /* * The '_fastBuildCache()' function is called to populate the cache @@ -111,7 +112,7 @@ extern fastImp _fastImp; /* Populated by _fastBuildCache() */ * changes have been made to the runtime by loading of categories or * by classes posing as other classes. */ -extern void _fastBuildCache(); +GS_EXPORT void _fastBuildCache(); /* @@ -119,7 +120,7 @@ extern void _fastBuildCache(); * memory that will automatically be released when the current * autorelease pool goes away. */ -extern void *_fastMallocBuffer(unsigned size); +GS_EXPORT void *_fastMallocBuffer(unsigned size); /* * Fast access to class info - DON'T pass nil to these! @@ -215,7 +216,7 @@ fastSelectorTypes(SEL s) * This function DOES know about NXConstantString, so it's pretty safe * for normal use. */ -extern NSZone *fastZone(NSObject* obj); +GS_EXPORT NSZone *fastZone(NSObject* obj); #endif diff --git a/Headers/gnustep/base/ostream.h b/Headers/gnustep/base/ostream.h index 720b75f58..075e05a7d 100644 --- a/Headers/gnustep/base/ostream.h +++ b/Headers/gnustep/base/ostream.h @@ -26,6 +26,7 @@ #include #include +#include typedef struct _ostream { @@ -51,30 +52,30 @@ typedef struct _ostream #define OSTREAM_USER_OWNS_BUF (1 << 3) #define OSTREAM_CANSEEK (1 << 4) -extern int ostream_getc (ostream* s); -extern void ostream_ungetc (ostream* s); -extern int ostream_putc (ostream* s, int c); -extern BOOL ostream_at_eos (ostream* s); -extern char* ostream_gets (ostream* s, char* buf, int count); +GS_EXPORT int ostream_getc (ostream* s); +GS_EXPORT void ostream_ungetc (ostream* s); +GS_EXPORT int ostream_putc (ostream* s, int c); +GS_EXPORT BOOL ostream_at_eos (ostream* s); +GS_EXPORT char* ostream_gets (ostream* s, char* buf, int count); -extern int ostream_flush (ostream *s); -extern void ostream_seek (ostream *s, long offset, int mode); -extern long ostream_tell (ostream *s); -extern int ostream_read (ostream* s, void* buf, int count); -extern int ostream_write (ostream* s, const void* buf, int count); -extern void ostream_printf (ostream *s, const char *format, ...); -extern void ostream_vprintf (ostream *s, const char *format, va_list argList); -extern int ostream_scanf (ostream *s, const char *format, ...); -extern int ostream_vscanf (ostream *s, const char *format, va_list argList); +GS_EXPORT int ostream_flush (ostream *s); +GS_EXPORT void ostream_seek (ostream *s, long offset, int mode); +GS_EXPORT long ostream_tell (ostream *s); +GS_EXPORT int ostream_read (ostream* s, void* buf, int count); +GS_EXPORT int ostream_write (ostream* s, const void* buf, int count); +GS_EXPORT void ostream_printf (ostream *s, const char *format, ...); +GS_EXPORT void ostream_vprintf (ostream *s, const char *format, va_list argList); +GS_EXPORT int ostream_scanf (ostream *s, const char *format, ...); +GS_EXPORT int ostream_vscanf (ostream *s, const char *format, va_list argList); -extern ostream *ostream_open_descriptor (int fd, int mode); -extern ostream *ostream_open_memory (const char *addr, int size, int mode); -extern ostream *ostream_map_file (const char *name, int mode); -extern int ostream_save_to_file (ostream *s, const char *name); -extern void ostream_get_memory_buffer (ostream *s, char **addr, +GS_EXPORT ostream *ostream_open_descriptor (int fd, int mode); +GS_EXPORT ostream *ostream_open_memory (const char *addr, int size, int mode); +GS_EXPORT ostream *ostream_map_file (const char *name, int mode); +GS_EXPORT int ostream_save_to_file (ostream *s, const char *name); +GS_EXPORT void ostream_get_memory_buffer (ostream *s, char **addr, int *len, int *maxlen); -extern void ostream_close_memory (ostream *s, int option); -extern void ostream_close (ostream *s); +GS_EXPORT void ostream_close_memory (ostream *s, int option); +GS_EXPORT void ostream_close (ostream *s); #define OSTREAM_FREEBUFFER 0 #define OSTREAM_TRUNCATEBUFFER 1 diff --git a/Headers/gnustep/base/preface.h.in b/Headers/gnustep/base/preface.h.in index c48ae0af5..a10672888 100644 --- a/Headers/gnustep/base/preface.h.in +++ b/Headers/gnustep/base/preface.h.in @@ -27,7 +27,6 @@ #include #include #include -#include #if defined(__WIN32__) || defined(_WIN32) || defined(__MS_WIN32__) #ifndef __WIN32__ @@ -88,9 +87,6 @@ #include /* Hack to get rid of warning in GNU libc 2.0.3. */ #endif -#include -#include - /* The following group of lines maintained by the gstep-base src/Makefile */ #define @VERSION@ #define @MAJOR_VERSION@ diff --git a/Source/GNUmakefile b/Source/GNUmakefile index 186240473..380385e98 100644 --- a/Source/GNUmakefile +++ b/Source/GNUmakefile @@ -242,7 +242,6 @@ o_map.h \ o_map_bas.h \ o_map_cbs.h \ objc-gnu2next.h \ -README \ preface.h GNU_EXTRAS_HFILES = \ diff --git a/Source/NSAssertionHandler.m b/Source/NSAssertionHandler.m index 5a1acb414..a62cdbea0 100644 --- a/Source/NSAssertionHandler.m +++ b/Source/NSAssertionHandler.m @@ -22,6 +22,7 @@ */ #include +#include #include #include #include diff --git a/Source/NSBundle.m b/Source/NSBundle.m index 79f235ca7..f42926a16 100644 --- a/Source/NSBundle.m +++ b/Source/NSBundle.m @@ -303,59 +303,6 @@ _bundle_load_callback(Class theClass, Category *theCategory) return [self notImplemented: _cmd]; } -+ (NSString *) _absolutePathOfExecutable: (NSString *)path -{ - NSFileManager *mgr; - NSDictionary *env; - NSString *pathlist, *prefix; - id patharr; - - path = [path stringByStandardizingPath]; - if ([path isAbsolutePath]) - return path; - - mgr = [NSFileManager defaultManager]; - env = [[NSProcessInfo processInfo] environment]; - pathlist = [env objectForKey:@"PATH"]; -#if defined(__MINGW__) - patharr = [pathlist componentsSeparatedByString:@";"]; -#else - patharr = [pathlist componentsSeparatedByString:@":"]; -#endif - /* Add . if not already in path */ - if ([patharr indexOfObject: @"."] == NSNotFound) - { - patharr = AUTORELEASE([patharr mutableCopy]); - [patharr addObject: @"."]; - } - patharr = [patharr objectEnumerator]; - while ((prefix = [patharr nextObject])) - { - if ([prefix isEqual:@"."]) - prefix = [mgr currentDirectoryPath]; - prefix = [prefix stringByAppendingPathComponent: path]; - if ([mgr isExecutableFileAtPath: prefix]) - return [prefix stringByStandardizingPath]; -#if defined(__WIN32__) - /* Also add common executable extensions on windows */ - if ([path pathExtension] == nil) - { - NSString *wpath; - wpath = [prefix stringByAppendingPathExtension: @"exe"]; - if ([mgr isExecutableFileAtPath: wpath]) - return [wpath stringByStandardizingPath]; - wpath = [prefix stringByAppendingPathExtension: @"com"]; - if ([mgr isExecutableFileAtPath: wpath]) - return [wpath stringByStandardizingPath]; - wpath = [prefix stringByAppendingPathExtension: @"cmd"]; - if ([mgr isExecutableFileAtPath: wpath]) - return [wpath stringByStandardizingPath]; - } -#endif - } - return nil; -} - + (NSBundle *)mainBundle { [load_lock lock]; @@ -961,6 +908,59 @@ _bundle_load_callback(Class theClass, Category *theCategory) within the GNUstep directory structure specified by the environment variables. */ ++ (NSString *) _absolutePathOfExecutable: (NSString *)path +{ + NSFileManager *mgr; + NSDictionary *env; + NSString *pathlist, *prefix; + id patharr; + + path = [path stringByStandardizingPath]; + if ([path isAbsolutePath]) + return path; + + mgr = [NSFileManager defaultManager]; + env = [[NSProcessInfo processInfo] environment]; + pathlist = [env objectForKey:@"PATH"]; +#if defined(__MINGW__) + patharr = [pathlist componentsSeparatedByString:@";"]; +#else + patharr = [pathlist componentsSeparatedByString:@":"]; +#endif + /* Add . if not already in path */ + if ([patharr indexOfObject: @"."] == NSNotFound) + { + patharr = AUTORELEASE([patharr mutableCopy]); + [patharr addObject: @"."]; + } + patharr = [patharr objectEnumerator]; + while ((prefix = [patharr nextObject])) + { + if ([prefix isEqual:@"."]) + prefix = [mgr currentDirectoryPath]; + prefix = [prefix stringByAppendingPathComponent: path]; + if ([mgr isExecutableFileAtPath: prefix]) + return [prefix stringByStandardizingPath]; +#if defined(__WIN32__) + /* Also add common executable extensions on windows */ + if ([path pathExtension] == nil) + { + NSString *wpath; + wpath = [prefix stringByAppendingPathExtension: @"exe"]; + if ([mgr isExecutableFileAtPath: wpath]) + return [wpath stringByStandardizingPath]; + wpath = [prefix stringByAppendingPathExtension: @"com"]; + if ([mgr isExecutableFileAtPath: wpath]) + return [wpath stringByStandardizingPath]; + wpath = [prefix stringByAppendingPathExtension: @"cmd"]; + if ([mgr isExecutableFileAtPath: wpath]) + return [wpath stringByStandardizingPath]; + } +#endif + } + return nil; +} + + (NSBundle *) gnustepBundle { return _gnustep_bundle; diff --git a/Source/NSCalendarDate.m b/Source/NSCalendarDate.m index 0a3cbef6c..6e406ccd2 100644 --- a/Source/NSCalendarDate.m +++ b/Source/NSCalendarDate.m @@ -24,6 +24,7 @@ #include #include #include +#include #include #include #include diff --git a/Source/NSCallBacks.m b/Source/NSCallBacks.m index 110fdced9..8e08d03e2 100644 --- a/Source/NSCallBacks.m +++ b/Source/NSCallBacks.m @@ -26,6 +26,7 @@ /**** Included Headers *******************************************************/ #include +#include #include #include #include diff --git a/Source/NSConcreteNumber.m b/Source/NSConcreteNumber.m index d25474115..9b56e46bb 100644 --- a/Source/NSConcreteNumber.m +++ b/Source/NSConcreteNumber.m @@ -26,6 +26,7 @@ */ #include +#include #include #include #include diff --git a/Source/NSCopyObject.m b/Source/NSCopyObject.m index 6631592dc..f8416b4da 100644 --- a/Source/NSCopyObject.m +++ b/Source/NSCopyObject.m @@ -23,6 +23,7 @@ #include #include +#include NSObject *NSCopyObject(NSObject *anObject, unsigned extraBytes, NSZone *zone) { diff --git a/Source/NSDistantObject.m b/Source/NSDistantObject.m index 59725ffe0..2f540a7b3 100644 --- a/Source/NSDistantObject.m +++ b/Source/NSDistantObject.m @@ -23,6 +23,7 @@ */ #include +#include #include #include #include diff --git a/Source/NSDistributedNotificationCenter.m b/Source/NSDistributedNotificationCenter.m index 4cf47d701..e0e9d6dd2 100644 --- a/Source/NSDistributedNotificationCenter.m +++ b/Source/NSDistributedNotificationCenter.m @@ -22,6 +22,7 @@ */ #include +#include #include #include #include diff --git a/Source/NSFileManager.m b/Source/NSFileManager.m index 987741f2b..76c4c51d8 100644 --- a/Source/NSFileManager.m +++ b/Source/NSFileManager.m @@ -26,6 +26,7 @@ */ #include +#include #include #include #include diff --git a/Source/NSProtocolChecker.m b/Source/NSProtocolChecker.m index 2863b5080..1a95890a4 100644 --- a/Source/NSProtocolChecker.m +++ b/Source/NSProtocolChecker.m @@ -22,6 +22,7 @@ */ #include "config.h" +#import #import #import #import diff --git a/Source/NSString.m b/Source/NSString.m index 9b551e34a..9042406ae 100644 --- a/Source/NSString.m +++ b/Source/NSString.m @@ -40,6 +40,8 @@ */ #include +#include +#include #include #include #include diff --git a/Source/NSUnarchiver.m b/Source/NSUnarchiver.m index 2c31f057c..26777cde7 100644 --- a/Source/NSUnarchiver.m +++ b/Source/NSUnarchiver.m @@ -22,6 +22,7 @@ */ #include +#include #include #include #include diff --git a/Source/ostream.m b/Source/ostream.m index a11802193..f25b833d2 100644 --- a/Source/ostream.m +++ b/Source/ostream.m @@ -23,6 +23,7 @@ #include #include +#include #include #include #include diff --git a/Tools/defaults.m b/Tools/defaults.m index 773279295..3ce7b76cc 100644 --- a/Tools/defaults.m +++ b/Tools/defaults.m @@ -19,6 +19,8 @@ */ #include "config.h" +#include +#include #include #include #include diff --git a/Tools/plmerge.m b/Tools/plmerge.m index a07893b8a..11ad1f351 100644 --- a/Tools/plmerge.m +++ b/Tools/plmerge.m @@ -20,6 +20,8 @@ #import #import +#import +#import #import #import #import