Index: /trunk/psLib/src/sys/psMemory.h
===================================================================
--- /trunk/psLib/src/sys/psMemory.h	(revision 460)
+++ /trunk/psLib/src/sys/psMemory.h	(revision 461)
@@ -14,6 +14,6 @@
  *  @author Robert Lupton, Princeton University
  *
- *  @version $Revision: 1.4 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-04-19 20:19:22 $
+ *  @version $Revision: 1.5 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2004-04-20 01:41:09 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -159,8 +159,12 @@
  */
 #ifndef PS_ALLOW_MALLOC
-#define malloc(S)       #pragma error Use of malloc is not allowed.  Use psAlloc instead.
-#define realloc(P,S)    #pragma error Use of realloc is not allowed.  Use psRealloc instead.
-#define calloc(S)       #pragma error Use of calloc is not allowed.  Use psAlloc instead.
-#define free(P)         #pragma error Use of free is not allowed.  Use psFree instead.
+#ifdef __GNUC__
+#pragma GCC poison malloc realloc calloc free
+#else
+#define malloc(S)       _Pragma("error Use of malloc is not allowed.  Use psAlloc instead.")
+#define realloc(P,S)    _Pragma("error Use of realloc is not allowed.  Use psRealloc instead.")
+#define calloc(S)       _Pragma("error Use of calloc is not allowed.  Use psAlloc instead.")
+#define free(P)         _Pragma("error Use of free is not allowed.  Use psFree instead.")
+#endif
 #endif
 
Index: /trunk/psLib/src/sysUtils/psMemory.h
===================================================================
--- /trunk/psLib/src/sysUtils/psMemory.h	(revision 460)
+++ /trunk/psLib/src/sysUtils/psMemory.h	(revision 461)
@@ -14,6 +14,6 @@
  *  @author Robert Lupton, Princeton University
  *
- *  @version $Revision: 1.4 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-04-19 20:19:22 $
+ *  @version $Revision: 1.5 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2004-04-20 01:41:09 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -159,8 +159,12 @@
  */
 #ifndef PS_ALLOW_MALLOC
-#define malloc(S)       #pragma error Use of malloc is not allowed.  Use psAlloc instead.
-#define realloc(P,S)    #pragma error Use of realloc is not allowed.  Use psRealloc instead.
-#define calloc(S)       #pragma error Use of calloc is not allowed.  Use psAlloc instead.
-#define free(P)         #pragma error Use of free is not allowed.  Use psFree instead.
+#ifdef __GNUC__
+#pragma GCC poison malloc realloc calloc free
+#else
+#define malloc(S)       _Pragma("error Use of malloc is not allowed.  Use psAlloc instead.")
+#define realloc(P,S)    _Pragma("error Use of realloc is not allowed.  Use psRealloc instead.")
+#define calloc(S)       _Pragma("error Use of calloc is not allowed.  Use psAlloc instead.")
+#define free(P)         _Pragma("error Use of free is not allowed.  Use psFree instead.")
+#endif
 #endif
 
