Author: mlytwyn
Date: Fri Sep 23 18:59:14 2016
New Revision: 40100

URL: http://svn.gna.org/viewcvs/gnustep?rev=40100&view=rev
Log:
Merge with base trunk revision 40072

Modified:
    libs/base/branches/gnustep_testplant_branch/Source/NSDistantObject.m
    
libs/base/branches/gnustep_testplant_branch/Source/NSDistributedNotificationCenter.m
    libs/base/branches/gnustep_testplant_branch/Source/NSError.m
    libs/base/branches/gnustep_testplant_branch/Source/NSFileHandle.m
    libs/base/branches/gnustep_testplant_branch/Source/NSGarbageCollector.m
    libs/base/branches/gnustep_testplant_branch/Source/NSHashTable.m
    libs/base/branches/gnustep_testplant_branch/Source/NSHost.m

Modified: libs/base/branches/gnustep_testplant_branch/Source/NSDistantObject.m
URL: 
http://svn.gna.org/viewcvs/gnustep/libs/base/branches/gnustep_testplant_branch/Source/NSDistantObject.m?rev=40100&r1=40099&r2=40100&view=diff
==============================================================================
--- libs/base/branches/gnustep_testplant_branch/Source/NSDistantObject.m        
(original)
+++ libs/base/branches/gnustep_testplant_branch/Source/NSDistantObject.m        
Fri Sep 23 18:59:14 2016
@@ -77,16 +77,19 @@
 @end
 /*
  * Evil hack ... if a remote system wants to know if we conform
- * to a protocol we usa a local protocol with the same name.
+ * to a protocol we use a local protocol with the same name.
  */
 #ifndef __GNUSTEP_RUNTIME__
+@interface Object (conformsTo)
+- (BOOL) conformsTo: (Protocol*)p;
+@end
 @implementation Object (NSConformsToProtocolNamed)
 - (BOOL) _conformsToProtocolNamed: (const char*)aName
 {
   Protocol     *p;
 
   p = objc_getProtocol(aName);
-  return [self conformsTo: p];
+  return [(id)self conformsTo: p];
 }
 @end
 #endif
@@ -380,13 +383,16 @@
 @end
 
 @interface NSDistantObject (Debug)
-+ (void) setDebug: (int)val;
++ (int) setDebug: (int)val;
 @end
 
 @implementation NSDistantObject (Debug)
-+ (void) setDebug: (int)val
-{
++ (int) setDebug: (int)val
+{
+  int   old = debug_proxy;
+
   debug_proxy = val;
+  return old;
 }
 @end
 
@@ -605,6 +611,7 @@
 
   NS_DURING
   {
+    // Testplant-MAL-09212016: Keeping our branch code...
     // If the forward invocation fails there are times this object
     // is already free'd by the time the exception handler executes...
     AUTORELEASE(RETAIN(self));

Modified: 
libs/base/branches/gnustep_testplant_branch/Source/NSDistributedNotificationCenter.m
URL: 
http://svn.gna.org/viewcvs/gnustep/libs/base/branches/gnustep_testplant_branch/Source/NSDistributedNotificationCenter.m?rev=40100&r1=40099&r2=40100&view=diff
==============================================================================
--- 
libs/base/branches/gnustep_testplant_branch/Source/NSDistributedNotificationCenter.m
        (original)
+++ 
libs/base/branches/gnustep_testplant_branch/Source/NSDistributedNotificationCenter.m
        Fri Sep 23 18:59:14 2016
@@ -735,6 +735,7 @@
                nil];
            }
 #if defined(__MINGW32__)
+    // Testplant-MAL-09212016: Changes to support logging redirect...
     NSTask *task = AUTORELEASE([NSTask new]);
     [task setStandardError:[NSFileHandle fileHandleForWritingAtPath:@"NUL"]];
     [task setStandardOutput:[NSFileHandle fileHandleForWritingAtPath:@"NUL"]];
@@ -780,12 +781,10 @@
                @"I attempted to start it at '%@'\n", cmd];
            }
        }
-#if    !GS_WITH_GC
       else
         {
           [_remote retain];
         }
-#endif
 
       c = [_remote connectionForProxy];
       [_remote setProtocolForProxy: p];

Modified: libs/base/branches/gnustep_testplant_branch/Source/NSError.m
URL: 
http://svn.gna.org/viewcvs/gnustep/libs/base/branches/gnustep_testplant_branch/Source/NSError.m?rev=40100&r1=40099&r2=40100&view=diff
==============================================================================
--- libs/base/branches/gnustep_testplant_branch/Source/NSError.m        
(original)
+++ libs/base/branches/gnustep_testplant_branch/Source/NSError.m        Fri Sep 
23 18:59:14 2016
@@ -42,6 +42,9 @@
   = @"NSLocalizedRecoverySuggestionErrorKey";
 NSString* const NSRecoveryAttempterErrorKey
   = @"NSRecoveryAttempterErrorKey";
+
+NSString* const NSURLErrorFailingURLErrorKey = @"NSErrorFailingURLKey";
+NSString* const NSURLErrorFailingURLStringErrorKey = 
@"NSErrorFailingURLStringKey";
 
 NSString* const NSMACHErrorDomain = @"NSMACHErrorDomain";
 NSString* const NSOSStatusErrorDomain = @"NSOSStatusErrorDomain";

Modified: libs/base/branches/gnustep_testplant_branch/Source/NSFileHandle.m
URL: 
http://svn.gna.org/viewcvs/gnustep/libs/base/branches/gnustep_testplant_branch/Source/NSFileHandle.m?rev=40100&r1=40099&r2=40100&view=diff
==============================================================================
--- libs/base/branches/gnustep_testplant_branch/Source/NSFileHandle.m   
(original)
+++ libs/base/branches/gnustep_testplant_branch/Source/NSFileHandle.m   Fri Sep 
23 18:59:14 2016
@@ -57,6 +57,20 @@
 static Class NSFileHandle_concrete_class = nil;
 static Class NSFileHandle_ssl_class = nil;
 
+#if     defined(HAVE_GNUTLS) && !defined(_WIN32)
+@interface      GSTLSHandle : GSFileHandle
+{
+@public
+  NSDictionary  *opts;
+  GSTLSSession  *session;
+}
+- (void) sslDisconnect;
+- (BOOL) sslHandshakeEstablished: (BOOL*)result outgoing: (BOOL)isOutgoing;
+- (NSString*) sslSetOptions: (NSDictionary*)options;
+@end
+#endif
+
+
 /**
  * <p>
  * <code>NSFileHandle</code> is a class that provides a wrapper for accessing
@@ -78,6 +92,9 @@
     {
       NSFileHandle_abstract_class = self;
       NSFileHandle_concrete_class = [GSFileHandle class];
+#if     defined(HAVE_GNUTLS) && !defined(_WIN32)
+      NSFileHandle_ssl_class = [GSTLSHandle class];
+#endif
     }
 }
 
@@ -726,26 +743,6 @@
  */
 + (Class) sslClass
 {
-  if (0 == NSFileHandle_ssl_class)
-    {
-      NSFileHandle_ssl_class = NSClassFromString(@"GSTLSHandle");
-
-      if (0 == NSFileHandle_ssl_class)
-        {
-          NSString      *path;
-          NSBundle      *bundle;
-
-          path = [[NSBundle bundleForClass: [NSObject class]] bundlePath];
-          path = [path stringByAppendingPathComponent: @"SSL.bundle"];
-
-          bundle = [NSBundle bundleWithPath: path];
-          NSFileHandle_ssl_class = [bundle principalClass];
-          if (NSFileHandle_ssl_class == 0 && bundle != nil)
-            {
-              NSLog(@"Failed to load principal class from bundle (%@)", path);
-            }
-        }
-    }
   return NSFileHandle_ssl_class;
 }
 
@@ -885,21 +882,7 @@
 
 @end
 
-#if     defined(HAVE_GNUTLS)
-
-#if    !defined(__MINGW__)
-
-@interface      GSTLSHandle : GSFileHandle
-{
-@public
-  NSDictionary  *opts;
-  GSTLSSession  *session;
-}
-- (void) sslDisconnect;
-- (BOOL) sslHandshakeEstablished: (BOOL*)result outgoing: (BOOL)isOutgoing;
-- (NSString*) sslSetOptions: (NSDictionary*)options;
-@end
-
+#if     defined(HAVE_GNUTLS) &&        !defined(_WIN32)
 
 /* Callback to allow the TLS code to pull data from the remote system.
  * If the operation fails, this sets the error number.
@@ -1082,7 +1065,6 @@
 }
 
 @end
-#endif  /* MINGW */
-
-#endif  /* HAVE_GNUTLS */
-
+
+#endif  /* defined(HAVE_GNUTLS) && !defined(_WIN32) */
+

Modified: 
libs/base/branches/gnustep_testplant_branch/Source/NSGarbageCollector.m
URL: 
http://svn.gna.org/viewcvs/gnustep/libs/base/branches/gnustep_testplant_branch/Source/NSGarbageCollector.m?rev=40100&r1=40099&r2=40100&view=diff
==============================================================================
--- libs/base/branches/gnustep_testplant_branch/Source/NSGarbageCollector.m     
(original)
+++ libs/base/branches/gnustep_testplant_branch/Source/NSGarbageCollector.m     
Fri Sep 23 18:59:14 2016
@@ -26,87 +26,48 @@
 #import "common.h"
 #import        "Foundation/NSGarbageCollector.h"
 
-static NSGarbageCollector      *collector = nil;
-
-#if __OBJC_GC__
-#include <objc/objc-auto.h>
-
-id CFRetain(id obj)
-{
-  if (collector)
-    {
-      return objc_gc_retain(obj);
-    }
-  return [obj retain];
-}
-
-void CFRelease(id obj)
-{
-  if (collector)
-    {
-      objc_gc_release(obj);
-    }
-  else
-    {
-      [obj release];
-    }
-}
-
 @implementation        NSGarbageCollector
 
 + (id) defaultCollector
 {
-  return collector;
-}
-
-+ (void) initialize
-{
-  if (objc_collecting_enabled())
-    {
-      collector = [self alloc];
-      objc_startCollectorThread();
-    }
+  return nil;
 }
 
 - (void) collectIfNeeded
 {
-  objc_collect(OBJC_COLLECT_IF_NEEDED | OBJC_FULL_COLLECTION);
+  return;
 }
 
 - (void) collectExhaustively
 {
-  objc_collect(OBJC_EXHAUSTIVE_COLLECTION);
+  return;
 }
 
 - (void) disable
 {
-  objc_gc_disable();
+  return;
 }
 
 - (void) disableCollectorForPointer: (void *)ptr
 {
-  CFRetain(ptr);
+  return;
 }
 
 - (void) enable
 {
-  objc_gc_enable();
+  return;
 }
 
 - (void) enableCollectorForPointer: (void *)ptr
 {
-  CFRelease(ptr);
+  return;
 }
 
 - (id) init
 {
-  if (self != collector)
-    {
-      [self release];
-      self = collector;
+      [self dealloc];
+  return nil;
     }
-  return self;
-}
 
 - (BOOL) isCollecting
 {
@@ -115,8 +76,8 @@
 
 - (BOOL) isEnabled
 {
-       return objc_collectingEnabled();
-}
+      return NO;
+    }
 
 - (NSZone*) zone
 {
@@ -124,130 +85,3 @@
 }
 @end
 
-#else
-
-static unsigned                        disabled = 0;
-#if    GS_WITH_GC
-
-#include <gc/gc.h>
-
-#import        "Foundation/NSLock.h"
-#import        "Foundation/NSHashTable.h"
-static NSLock          *lock = nil;
-static NSHashTable     *uncollectable = 0;
-#endif
-
-@implementation        NSGarbageCollector
-
-+ (id) defaultCollector
-{
-  return collector;
-}
-
-#if    GS_WITH_GC
-+ (void) initialize
-{
-  collector = [self alloc];
-  lock = [NSLock new];
-}
-#endif
-
-- (void) collectIfNeeded
-{
-#if    GS_WITH_GC
-  GC_collect_a_little();
-#endif
-  return;
-}
-
-- (void) collectExhaustively
-{
-#if    GS_WITH_GC
-  GC_gcollect();
-#endif
-  return;
-}
-
-- (void) disable
-{
-#if    GS_WITH_GC
-  [lock lock];
-  GC_disable();
-  disabled++;
-  [lock unlock];
-#endif
-  return;
-}
-
-- (void) disableCollectorForPointer: (void *)ptr
-{
-#if    GS_WITH_GC
-  [lock lock];
-  if (uncollectable == 0)
-    {
-      uncollectable = NSCreateHashTable(NSOwnedPointerHashCallBacks, 0);
-    }
-  NSHashInsertIfAbsent(uncollectable, ptr);
-  [lock unlock];
-#endif
-  return;
-}
-
-- (void) enable
-{
-#if    GS_WITH_GC
-  [lock lock];
-  if (disabled)
-    {
-      GC_enable();
-      disabled--;
-    }
-  [lock unlock];
-#endif
-  return;
-}
-
-- (void) enableCollectorForPointer: (void *)ptr
-{
-#if    GS_WITH_GC
-  [lock lock];
-  if (uncollectable != 0)
-    {
-      NSHashRemove(uncollectable, ptr);
-    }
-  [lock unlock];
-#endif
-  return;
-}
-
-- (id) init
-{
-  if (self != collector)
-    {
-      [self dealloc];
-      self = nil;
-    }
-  return self;
-}
-
-- (BOOL) isCollecting
-{
-  return NO;
-}
-
-- (BOOL) isEnabled
-{
-  if (disabled)
-    {
-      return NO;
-    }
-  return YES;
-}
-
-- (NSZone*) zone
-{
-  return NSDefaultMallocZone();
-}
-@end
-
-#endif // __OBJC_GC__

Modified: libs/base/branches/gnustep_testplant_branch/Source/NSHashTable.m
URL: 
http://svn.gna.org/viewcvs/gnustep/libs/base/branches/gnustep_testplant_branch/Source/NSHashTable.m?rev=40100&r1=40099&r2=40100&view=diff
==============================================================================
--- libs/base/branches/gnustep_testplant_branch/Source/NSHashTable.m    
(original)
+++ libs/base/branches/gnustep_testplant_branch/Source/NSHashTable.m    Fri Sep 
23 18:59:14 2016
@@ -90,9 +90,7 @@
 
   k = [[NSPointerFunctions alloc] initWithOptions: options];
   o = [self initWithPointerFunctions: k capacity: initialCapacity];
-#if    !GS_WITH_GC
   [k release];
-#endif
   return o;
 }
 

Modified: libs/base/branches/gnustep_testplant_branch/Source/NSHost.m
URL: 
http://svn.gna.org/viewcvs/gnustep/libs/base/branches/gnustep_testplant_branch/Source/NSHost.m?rev=40100&r1=40099&r2=40100&view=diff
==============================================================================
--- libs/base/branches/gnustep_testplant_branch/Source/NSHost.m (original)
+++ libs/base/branches/gnustep_testplant_branch/Source/NSHost.m Fri Sep 23 
18:59:14 2016
@@ -38,16 +38,18 @@
 #import "Foundation/NSSet.h"
 #import "Foundation/NSCoder.h"
 
-#if defined(__MINGW__)
+#if defined(_WIN32)
 #include <winsock2.h>
 #include <ws2tcpip.h>
+extern const char *inet_ntop(int, const void *, char *, size_t);
+extern int inet_pton(int , const char *, void *);
 #else
 #include <netdb.h>
 #include <sys/param.h>
 #include <sys/socket.h>
 #include <netinet/in.h>
 #include <arpa/inet.h>
-#endif /* !__MINGW__*/
+#endif /* !_WIN32*/
 
 #ifndef        INADDR_NONE
 #define        INADDR_NONE     -1


_______________________________________________
Gnustep-cvs mailing list
[email protected]
https://mail.gna.org/listinfo/gnustep-cvs

Reply via email to