mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-22 16:33:29 +00:00
Windows export/defs for DLLs
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@10610 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
71b8835828
commit
d6febadbdf
7 changed files with 54 additions and 28 deletions
13
ChangeLog
13
ChangeLog
|
@ -1,3 +1,16 @@
|
|||
2001-07-30 Adam Fedor <fedor@gnu.org>
|
||||
|
||||
* Headers/gnustep/base/NSObjCRuntime.h: Export additional functions
|
||||
and variables for Windows DLLs.
|
||||
* Headers/gnustep/base/NSObject.h: Likewise.
|
||||
* Headers/gnustep/base/Unicode.h: Likewise.
|
||||
|
||||
* Headers/gnustep/base/preface.h.in: Define __WIN32__ ifndef on
|
||||
MINGW32.
|
||||
|
||||
* Testing/nsarray.m: Use NSCParameterAssert.
|
||||
* Testing/nsconnection.m: Cleanup for MinGW/Cygwin.
|
||||
|
||||
Sat Jul 21 23:25:14 2001 Wim Oudshoorn
|
||||
* Source/NSHost.m ([NSHost +hostWithName:]):
|
||||
Added forgotten argument to NSLog().
|
||||
|
|
|
@ -158,7 +158,7 @@ GSObjCVersion(Class this)
|
|||
* Return the zone in which an object belongs, without using the zone method
|
||||
*/
|
||||
#include <Foundation/NSZone.h>
|
||||
NSZone *GSObjCZone(NSObject *obj);
|
||||
GS_EXPORT NSZone *GSObjCZone(NSObject *obj);
|
||||
|
||||
/*
|
||||
* Quickly return autoreleased data.
|
||||
|
|
|
@ -175,7 +175,7 @@ enum {NSNotFound = 0x7fffffff};
|
|||
/* Global lock to be used by classes when operating on any global
|
||||
data that invoke other methods which also access global; thus,
|
||||
creating the potential for deadlock. */
|
||||
extern NSRecursiveLock *gnustep_global_lock;
|
||||
GS_EXPORT NSRecursiveLock *gnustep_global_lock;
|
||||
|
||||
/*
|
||||
* The GNUDescriptionDestination protocol declares methods used to
|
||||
|
|
|
@ -31,25 +31,28 @@
|
|||
|
||||
#include <Foundation/NSString.h> /* For string encodings */
|
||||
|
||||
NSStringEncoding *GetAvailableEncodings();
|
||||
NSStringEncoding GetDefEncoding();
|
||||
NSString* GetEncodingName(NSStringEncoding encoding);
|
||||
GS_EXPORT NSStringEncoding *GetAvailableEncodings();
|
||||
GS_EXPORT NSStringEncoding GetDefEncoding();
|
||||
GS_EXPORT NSString* GetEncodingName(NSStringEncoding encoding);
|
||||
|
||||
unichar chartouni(char c);
|
||||
char unitochar(unichar u);
|
||||
unichar encode_chartouni(char c, NSStringEncoding enc);
|
||||
char encode_unitochar(unichar u, NSStringEncoding enc);
|
||||
unsigned encode_unitochar_strict(unichar u, NSStringEncoding enc);
|
||||
int strtoustr(unichar * u1,const char *s1,int size);
|
||||
int ustrtostr(char *s2,unichar *u1,int size);
|
||||
int encode_strtoustr(unichar* u1,const char*s1,int size, NSStringEncoding enc);
|
||||
int encode_ustrtostr(char *s2, unichar *u1, int size, NSStringEncoding enc);
|
||||
int encode_ustrtostr_strict(char *s2, unichar *u1, int size, NSStringEncoding enc);
|
||||
GS_EXPORT unichar chartouni(char c);
|
||||
GS_EXPORT char unitochar(unichar u);
|
||||
GS_EXPORT unichar encode_chartouni(char c, NSStringEncoding enc);
|
||||
GS_EXPORT char encode_unitochar(unichar u, NSStringEncoding enc);
|
||||
GS_EXPORT unsigned encode_unitochar_strict(unichar u, NSStringEncoding enc);
|
||||
GS_EXPORT int strtoustr(unichar * u1,const char *s1,int size);
|
||||
GS_EXPORT int ustrtostr(char *s2,unichar *u1,int size);
|
||||
GS_EXPORT int encode_strtoustr(unichar* u1,const char*s1,int size,
|
||||
NSStringEncoding enc);
|
||||
GS_EXPORT int encode_ustrtostr(char *s2, unichar *u1, int size,
|
||||
NSStringEncoding enc);
|
||||
GS_EXPORT int encode_ustrtostr_strict(char *s2, unichar *u1, int size,
|
||||
NSStringEncoding enc);
|
||||
|
||||
unichar uni_tolower(unichar ch);
|
||||
unichar uni_toupper(unichar ch);
|
||||
unsigned char uni_cop(unichar u);
|
||||
BOOL uni_isnonsp(unichar u);
|
||||
unichar *uni_is_decomp(unichar u);
|
||||
GS_EXPORT unichar uni_tolower(unichar ch);
|
||||
GS_EXPORT unichar uni_toupper(unichar ch);
|
||||
GS_EXPORT unsigned char uni_cop(unichar u);
|
||||
GS_EXPORT BOOL uni_isnonsp(unichar u);
|
||||
GS_EXPORT unichar *uni_is_decomp(unichar u);
|
||||
|
||||
#endif /* __Unicode_h_OBJECTS_INCLUDE */
|
||||
|
|
|
@ -38,6 +38,9 @@
|
|||
#ifndef __MINGW__
|
||||
#define __MINGW__
|
||||
#endif
|
||||
#ifndef __WIN32__
|
||||
#define __WIN32__
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(__WIN32__)
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
#include <Foundation/NSArray.h>
|
||||
#include <Foundation/NSValue.h>
|
||||
#include <Foundation/NSString.h>
|
||||
#include <Foundation/NSException.h>
|
||||
|
||||
int
|
||||
main()
|
||||
|
@ -75,7 +76,7 @@ main()
|
|||
|
||||
{
|
||||
// Querying the arra
|
||||
assert([c containsObject:[NSObject class]]);
|
||||
NSCParameterAssert([c containsObject:[NSObject class]]);
|
||||
|
||||
p = [e indexOfObject:@"Hello World\n"];
|
||||
if (p == NSNotFound)
|
||||
|
@ -89,7 +90,7 @@ main()
|
|||
else
|
||||
printf("Index of identical object is %d\n", p);
|
||||
|
||||
assert([c lastObject]);
|
||||
NSCParameterAssert([c lastObject]);
|
||||
printf("Classname at index 2 is %s\n", [[c objectAtIndex:2] name]);
|
||||
|
||||
printf("Forward enumeration\n");
|
||||
|
@ -114,7 +115,7 @@ main()
|
|||
|
||||
{
|
||||
// Comparing arrays
|
||||
assert([d firstObjectCommonWithArray:e]);
|
||||
NSCParameterAssert([d firstObjectCommonWithArray:e]);
|
||||
|
||||
if ([d isEqualToArray: d])
|
||||
printf("NSArray is equal to itself\n");
|
||||
|
@ -208,16 +209,16 @@ main()
|
|||
{
|
||||
// Creating and initializing an NSMutableArray
|
||||
f = [NSMutableArray arrayWithCapacity: 10];
|
||||
assert(f);
|
||||
NSCParameterAssert(f);
|
||||
f = [[NSMutableArray alloc] initWithCapacity: 10];
|
||||
[f release];
|
||||
assert(f);
|
||||
NSCParameterAssert(f);
|
||||
}
|
||||
|
||||
{
|
||||
// Adding objects
|
||||
f = [e mutableCopy];
|
||||
assert([f count]);
|
||||
NSCParameterAssert([f count]);
|
||||
|
||||
printf("Method -addObject:[NSObject class]\n");
|
||||
[f addObject:[NSObject class]];
|
||||
|
|
|
@ -72,9 +72,15 @@ id myServer;
|
|||
@end
|
||||
|
||||
int
|
||||
main()
|
||||
main(int argc, char *argv[], char **env)
|
||||
{
|
||||
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
|
||||
NSAutoreleasePool *pool;
|
||||
|
||||
#if LIB_FOUNDATION_LIBRARY || defined(GS_PASS_ARGUMENTS)
|
||||
[NSProcessInfo initializeWithArguments:argv count:argc environment:env];
|
||||
#endif
|
||||
pool = [[NSAutoreleasePool alloc] init];
|
||||
|
||||
|
||||
[Tester startup];
|
||||
[[NSRunLoop currentRunLoop] run];
|
||||
|
|
Loading…
Reference in a new issue