Author: rfm
Date: Fri Jul  3 09:32:18 2015
New Revision: 38741

URL: http://svn.gna.org/viewcvs/gnustep?rev=38741&view=rev
Log:
fix some sizes

Modified:
    libs/ec/trunk/EcProcess.m
    libs/ec/trunk/README.SNMP

Modified: libs/ec/trunk/EcProcess.m
URL: 
http://svn.gna.org/viewcvs/gnustep/libs/ec/trunk/EcProcess.m?rev=38741&r1=38740&r2=38741&view=diff
==============================================================================
--- libs/ec/trunk/EcProcess.m   (original)
+++ libs/ec/trunk/EcProcess.m   Fri Jul  3 09:32:18 2015
@@ -519,8 +519,8 @@
 }
 
 #define        DEFMEMALLOWED   50
-static uint64_t                memMaximum = 0;
-static uint64_t                memAllowed = DEFMEMALLOWED;
+static NSUInteger       memMaximum = 0;
+static NSUInteger      memAllowed = DEFMEMALLOWED;
 static NSUInteger      memLast = 0;
 static NSUInteger      memPeak = 0;
 static NSUInteger      memSlot = 0;
@@ -1257,13 +1257,13 @@
   descriptorsMaximum = [cmdDefs integerForKey: @"DescriptorsMaximum"];
 #endif
 
-  memAllowed = (uint64_t)[cmdDefs integerForKey: @"MemoryAllowed"];
+  memAllowed = (NSUInteger)[cmdDefs integerForKey: @"MemoryAllowed"];
   if (0 == memAllowed || memAllowed > 100000)
     {
       memAllowed = DEFMEMALLOWED;      // Fifty megabytes default
     }
 
-  memMaximum = (uint64_t)[cmdDefs integerForKey: @"MemoryMaximum"];
+  memMaximum = (NSUInteger)[cmdDefs integerForKey: @"MemoryMaximum"];
   if (memMaximum > 100000)
     {
       memMaximum = 0;                  // Disabled
@@ -2366,7 +2366,7 @@
           /* If we have a defined maximum memory usage for the process,
            * we should shut down with a non-zero status to get a restart.
            */
-          if (memMaximum > 0 && memPeak > memMaximum * 1024 * 1024)
+          if (memMaximum > 0 && memSize > (memMaximum * 1024 * 1024))
             {
               if (NO == cmdIsQuitting)
                 {
@@ -2899,7 +2899,7 @@
 
               for (index = 1; index < count; index++)
                 {
-                  uint64_t      addr;
+                  NSUInteger    addr;
                   NSString      *arg = [msg objectAtIndex: index];
 
                   if ([arg caseInsensitiveCompare: _(@"all")]
@@ -2915,7 +2915,7 @@
                           [alarmDestination alarm: alarm];
                         }
                     }
-                  else if (1 == sscanf([arg UTF8String], "%" PRIx64, &addr))
+                  else if (1 == sscanf([arg UTF8String], "%" PRIxPTR, &addr))
                     {
                       NSUInteger       i;
 
@@ -2923,7 +2923,7 @@
                       for (i = 0; i < alarmCount; i++)
                         {
                           alarm = [a objectAtIndex: i];
-                          if ((uint64_t)(uintptr_t)alarm == addr)
+                          if ((NSUInteger)alarm == addr)
                             {
                               break;
                             }
@@ -3413,11 +3413,11 @@
         " (current), %"PRIuPTR" (exempt)\n",
         memPeak, memLast, [self ecNotLeaked]];
       [self cmdPrintf:
-        @"Memory error reporting after usage: %"PRIu64"MB\n", memAllowed];
+        @"Memory error reporting after usage: %"PRIuPTR"MB\n", memAllowed];
       if (memMaximum > 0)
         {
           [self cmdPrintf:
-            @"Memory usage exceeded shutdown after: %"PRIu64"MB\n", 
memMaximum];
+            @"Memory usage exceeded shutdown after: %"PRIuPTR"MB\n", 
memMaximum];
         }
     }
 }

Modified: libs/ec/trunk/README.SNMP
URL: 
http://svn.gna.org/viewcvs/gnustep/libs/ec/trunk/README.SNMP?rev=38741&r1=38740&r2=38741&view=diff
==============================================================================
--- libs/ec/trunk/README.SNMP   (original)
+++ libs/ec/trunk/README.SNMP   Fri Jul  3 09:32:18 2015
@@ -11,10 +11,12 @@
    If you are using your own MIB, replace all ocurrances below of
    GNUSTEP-MIB.txt with the name of your own MIB file.
 
-1. install GNUSTEP-MIB.txt in /usr/share/snmp/mibs and/or ~/.snmp/mibs
-   depending on whether this is a system-wide installation or one for a
-   single user/account.
-
+1. install GNUSTEP-MIB.txt in /usr/share/snmp/mibs or wherever net-snmp
+   keeps its MIBs on your system.  This manual installation is required
+   for a system-wide installation, but if you only want to have access
+   to the MIB yourself, the default installation process will have put
+   the MIB in your local directory(~/.snmp/mibs) which is correct for
+   net-snmp on most systems.
 
 2. For diagnosing problems in snmpd,
    edit '/etc/sysconfig/snmpd' to contain:


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

Reply via email to