Index: /trunk/psLib/src/sys/psLogMsg.c
===================================================================
--- /trunk/psLib/src/sys/psLogMsg.c	(revision 7568)
+++ /trunk/psLib/src/sys/psLogMsg.c	(revision 7569)
@@ -11,6 +11,6 @@
  *  @author GLG, MHPCC
  *
- *  @version $Revision: 1.54 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2006-06-15 00:14:49 $
+ *  @version $Revision: 1.55 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2006-06-15 00:17:32 $
  *
  *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -42,5 +42,5 @@
 #define MAX_LOG_LINE_LENGTH 256
 
-static int logFD = 2;                   // Log file descriptor
+static int logFD = STDERR_FILENO;       // Log file descriptor
 static psS32 globalLogLevel = PS_LOG_INFO; // log all messages at this or above
 static psBool logTime = true;     // Flag to include time info
@@ -87,10 +87,10 @@
 bool psLogSetDestination(int fd)
 {
-    if (fd <= -1) {
+    if (fd < 0) {
         return false;
     }
 
     // Close the current FD if it's not stdout, stderr.
-    if (logFD > 2) {
+    if (logFD > STDERR_FILENO) {
         close(logFD);
     }
@@ -186,8 +186,8 @@
     // Special destinations: stdout, stderr
     if (strcmp(dest, "stdout") == 0) {
-        return 1;
+        return STDOUT_FILENO;
     }
     if (strcmp(dest, "stderr") == 0) {
-        return 2;
+        return STDERR_FILENO;
     }
 
@@ -250,5 +250,5 @@
     // If it's an abort, we always want to see the message
     if (logFD == 0 && level == PS_LOG_ABORT) {
-        logFD = 2;
+        logFD = STDERR_FILENO;
     }
     // If logging is off, or if the level is too high, return immediately.
@@ -352,8 +352,8 @@
     if (level == PS_LOG_ABORT) {
         switch (logFD) {
-        case 1:
+        case STDOUT_FILENO:
             fflush(stdout);
             break;
-        case 2:
+        case STDERR_FILENO:
             fflush(stderr);
             break;
