]> code.delx.au - gnu-emacs/blobdiff - src/xrdb.c
[TARGET_API_MAC_CARBON] (mac_do_receive_drag): Don't
[gnu-emacs] / src / xrdb.c
index 822fb6e26246c47596430191a3c42ae88067aa37..4c9f3c60b3585380d9fe4c8779b563fec4369dcf 100644 (file)
@@ -1,6 +1,6 @@
 /* Deal with the X Resource Manager.
    Copyright (C) 1990, 1993, 1994, 2000, 2001, 2002, 2003, 2004,
-                 2005 Free Software Foundation, Inc.
+                 2005, 2006, 2007 Free Software Foundation, Inc.
 
 This file is part of GNU Emacs.
 
@@ -88,6 +88,10 @@ extern char *get_system_name ();
 /* Make sure not to #include anything after these definitions.  Let's
    not step on anyone's prototypes.  */
 #ifdef emacs
+/* darwin.h may have already defined these.  */
+#undef malloc
+#undef realloc
+#undef free
 #define malloc xmalloc
 #define realloc xrealloc
 #define free xfree
@@ -311,7 +315,7 @@ gethomedir ()
     }
 
   if (ptr == NULL)
-    return "/";
+    return xstrdup ("/");
 
   copy = (char *) malloc (strlen (ptr) + 2);
   strcpy (copy, ptr);