dtsession: fix screen saver/locking on linux
[oweals/cde.git] / cde / programs / dtprintinfo / objects / BaseObj.h
index 3693d4f0ae16634bdb9bfcc83e48c2fa445b4e5a..d6df465775242a8d5e4edc87f730e9eee827cd04 100644 (file)
@@ -1,3 +1,25 @@
+/*
+ * CDE - Common Desktop Environment
+ *
+ * Copyright (c) 1993-2012, The Open Group. All rights reserved.
+ *
+ * These libraries and programs are free software; you can
+ * redistribute them and/or modify them under the terms of the GNU
+ * Lesser General Public License as published by the Free Software
+ * Foundation; either version 2 of the License, or (at your option)
+ * any later version.
+ *
+ * These libraries and programs are distributed in the hope that
+ * they will be useful, but WITHOUT ANY WARRANTY; without even the
+ * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ * PURPOSE. See the GNU Lesser General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with these libraries and programs; if not, write
+ * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
+ * Floor, Boston, MA 02110-1301 USA
+ */
 /* $TOG: BaseObj.h /main/5 1998/04/06 13:34:28 mgreess $ */
 /*                                                                      *
  * (c) Copyright 1993, 1994 Hewlett-Packard Company                     *
 
 #ifndef _BOOLEAN_
 #define _BOOLEAN_
-#if (defined(sun) && OSMAJORVERSION <= 5 && OSMINORVERSION <= 3)|| defined(USL) || defined(__uxp__)
+#if (defined(sun) && OSMAJORVERSION <= 5 && OSMINORVERSION <= 3)
   #include <sys/types.h>
   #define boolean boolean_t
   #define true B_TRUE
   #define false B_FALSE
-#elif defined(linux)
+#elif defined(sun)
+  #include <sys/types.h>
+  #define boolean boolean_t
+#if defined(__XOPEN_OR_POSIX)
+  #define true _B_TRUE
+  #define false _B_FALSE
+#else
+  #define true B_TRUE
+  #define false B_FALSE
+#endif
+#elif defined(__linux__)
   #define false 0
-  #define true 0
+  #define true 1
   #define boolean int
+#elif defined(CSRG_BASED)
+#include <stdbool.h>
+#define boolean bool
 #else
   typedef enum
   {
@@ -238,7 +273,7 @@ class BaseObj {
    // Dumps object to stdout
    void Dump(boolean verbose = false,
             int level = 0);
-   // Dumps object heirarchy to stdout
+   // Dumps object hierarchy to stdout
    void DumpHierarchy(boolean verbose = false,
                      int level = 0);