Use #ifdef XP_MACOSX as a shorthand for #if defined(XP_MACOSX).
authorwtchang%redhat.com
Sat, 06 Aug 2005 00:11:34 +0000
changeset 3429 7817af1f67ce2212c0871d10f2b4c2abf7a02a72
parent 3428 9a7b5fd6eb9b52417e7af2e74fcfb8995f3f5a8f
child 3430 d00d221c4746016fae50be3efb1a2179b5a61c7c
push idunknown
push userunknown
push dateunknown
Use #ifdef XP_MACOSX as a shorthand for #if defined(XP_MACOSX).
pr/src/linking/prlink.c
--- a/pr/src/linking/prlink.c
+++ b/pr/src/linking/prlink.c
@@ -35,17 +35,17 @@
 #include "primpl.h"
 
 #include <string.h>
 
 #ifdef XP_BEOS
 #include <image.h>
 #endif
 
-#if defined(XP_MACOSX)
+#ifdef XP_MACOSX
 #include <CodeFragments.h>
 #include <TextUtils.h>
 #include <Types.h>
 #include <Aliases.h>
 #include <CFURL.h>
 #include <CFBundle.h>
 #include <CFString.h>
 #include <CFDictionary.h>
@@ -168,17 +168,17 @@ struct PRLibrary {
 #ifdef XP_PC
 #ifdef XP_OS2
     HMODULE                     dlh;
 #else
     HINSTANCE                   dlh;
 #endif
 #endif
 
-#if defined(XP_MACOSX)
+#ifdef XP_MACOSX
     CFragConnectionID           connection;
     CFBundleRef                 bundle;
     Ptr                         main;
     CFMutableDictionaryRef      wrappers;
     const struct mach_header*   image;
 #endif
 
 #ifdef XP_UNIX
@@ -592,17 +592,17 @@ pr_LoadMachDyldModule(const char *name)
                 h = NULL;
             }
         }
     }
     return h;
 }
 #endif
 
-#if defined(XP_MACOSX)
+#ifdef XP_MACOSX
 
 static void* TV2FP(CFMutableDictionaryRef dict, const char* name, void *tvp)
 {
     static uint32 glue[6] = { 0x3D800000, 0x618C0000, 0x800C0000, 0x804C0004, 0x7C0903A6, 0x4E800420 };
     uint32* newGlue = NULL;
 
     if (tvp != NULL) {
         CFStringRef nameRef = CFStringCreateWithCString(NULL, name, kCFStringEncodingASCII);
@@ -737,17 +737,17 @@ pr_LoadViaDyld(const char *name, PRLibra
         /*
          * TODO: If NSAddImage fails, use NSLinkEditError to retrieve
          * error information.
          */
     }
     return (lm->dlh != NULL || lm->image != NULL) ? PR_SUCCESS : PR_FAILURE;
 }
 
-#endif /* defined(XP_MACOSX) */
+#endif /* XP_MACOSX */
 
 /*
 ** Dynamically load a library. Only load libraries once, so scan the load
 ** map first.
 */
 static PRLibrary*
 pr_LoadLibraryByPathname(const char *name, PRIntn flags)
 {
@@ -801,17 +801,17 @@ pr_LoadLibraryByPathname(const char *nam
     }
     lm->name = strdup(name);
     lm->dlh = h;
     lm->next = pr_loadmap;
     pr_loadmap = lm;
     }
 #endif /* WIN32 || WIN16 */
 
-#if defined(XP_MACOSX)
+#ifdef XP_MACOSX
     {
     int     i;
     PRStatus status;
 
     static const macLibraryLoadProc loadProcs[] = {
         pr_LoadViaDyld, pr_LoadCFBundle, pr_LoadViaCFM
     };
 
@@ -1044,17 +1044,17 @@ PR_UnloadLibrary(PRLibrary *lib)
 #endif /* XP_UNIX */
 #ifdef XP_PC
     if (lib->dlh) {
         FreeLibrary((HINSTANCE)(lib->dlh));
         lib->dlh = (HINSTANCE)NULL;
     }
 #endif  /* XP_PC */
 
-#if defined(XP_MACOSX)
+#ifdef XP_MACOSX
     /* Close the connection */
     if (lib->connection)
         CloseConnection(&(lib->connection));
     if (lib->bundle)
         CFRelease(lib->bundle);
     if (lib->wrappers)
         CFRelease(lib->wrappers);
     /* No way to unload an image (lib->image) */
@@ -1143,17 +1143,17 @@ pr_FindSymbolInLib(PRLibrary *lm, const 
     }
 #endif
 #endif  /* XP_OS2 */
 
 #if defined(WIN32) || defined(WIN16)
     f = GetProcAddress(lm->dlh, name);
 #endif  /* WIN32 || WIN16 */
 
-#if defined(XP_MACOSX)
+#ifdef XP_MACOSX
     if (lm->bundle) {
         CFStringRef nameRef = CFStringCreateWithCString(NULL, name + 1, kCFStringEncodingASCII);
         if (nameRef) {
             f = CFBundleGetFunctionPointerForName(lm->bundle, nameRef);
             CFRelease(nameRef);
         }
     }
     if (lm->connection) {