Update of /cvsroot/fink/3rdparty/apt/apt-pkg/deb
In directory sc8-pr-cvs17:/tmp/cvs-serv3767/3rdparty/apt/apt-pkg/deb

Modified Files:
        debsystem.cc 
Log Message:
update FSF street address per their website


Index: debsystem.cc
===================================================================
RCS file: /cvsroot/fink/3rdparty/apt/apt-pkg/deb/debsystem.cc,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- debsystem.cc        5 May 2006 05:15:00 -0000       1.6
+++ debsystem.cc        16 Oct 2007 18:09:31 -0000      1.7
@@ -53,14 +53,7 @@
 
 static void finkinit()
 {
-  Boolean status;
-  SInt32 errorCode;
-  CFURLRef fileURL = NULL;
-  CFDataRef resourceData = NULL;
-  CFPropertyListRef propertyList = NULL;
-  CFStringRef string;
-  static char buffer[256];     // This is static, to ensure the buffer stays 
around
-
+  char *osxver;
   static struct utsname ver;   // This is static, to ensure the buffer stays 
around
   
   /* Determine system version */
@@ -70,6 +63,27 @@
   }
 
   /* Check whether this is Mac OS X, and which version of it */
+  osxver = read_macosx_version;
+  /* Finally link the buffer into the macosx_version struct. */
+  if(strlen(osxver))
+      macosx_version.version = osxver;
+}
+
+/* returns a pointer to a string containing the Mac OS X version   */
+/* string (for example, "10.3.9"). The string is a static buffer,  */
+/* so you should not change it or free() it. If the version string */
+/* could not be determined, the string will be null, not a NULL    */
+/* pointer.                                                        */
+static char * read_macosx_version() 
+  Boolean status;
+  CFURLRef fileURL = NULL;
+  SInt32 errorCode;
+  CFDataRef resourceData = NULL;
+  CFPropertyListRef propertyList = NULL;
+  CFStringRef string;
+  static char buffer[256];     // This is static, to ensure the buffer stays 
around
+
+  strcpy(buffer, "");
 
   fileURL = CFURLCreateWithFileSystemPath( NULL,       
                CFSTR("/System/Library/CoreServices/SystemVersion.plist"),
@@ -113,9 +127,6 @@
   if (!status)
     goto BAIL;
   
-  /* Finally link the buffer into the macosx_version struct. */
-  macosx_version.version = buffer;
-  
 BAIL:
   // Release all of the CF objects we're responsible for.
   if (fileURL)
@@ -124,6 +135,8 @@
     CFRelease(resourceData);
   if (propertyList)
     CFRelease(propertyList);
+
+  return(buffer);
 }
 
 void initDebSystem()


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Fink-commits mailing list
Fink-commits@lists.sourceforge.net
http://news.gmane.org/gmane.os.apple.fink.cvs

Reply via email to