See patch.
>From 80a1a1b8552b51b0d4acc18e6756d5da5d8350dd Mon Sep 17 00:00:00 2001
From: Pascal Stumpf <pascal.stu...@cubes.de>
Date: Sat, 11 Aug 2012 14:01:14 +0200
Subject: [PATCH] OpenBSD patches for dtpdmd and dtprintinfo.

Casts, #ifdefs, SIGCLD ...
---
 cde/programs/dtpdmd/manager.c                      |    2 +-
 cde/programs/dtprintinfo/UI/DtApp.C                |   12 ++++++------
 cde/programs/dtprintinfo/UI/DtPrinterIcon.C        |    2 +-
 cde/programs/dtprintinfo/UI/DtPrinterIcon.h        |    2 +-
 cde/programs/dtprintinfo/libUI/BaseUI.h            |    2 +-
 cde/programs/dtprintinfo/objects/BaseObj.h         |    2 +-
 .../dtprintinfo/objects/PrintObj/ParseJobs.C       |    4 ++--
 cde/programs/dtprintinfo/util/Invoke.C             |    2 ++
 8 files changed, 15 insertions(+), 13 deletions(-)

diff --git a/cde/programs/dtpdmd/manager.c b/cde/programs/dtpdmd/manager.c
index 55af045..1893f5d 100644
--- a/cde/programs/dtpdmd/manager.c
+++ b/cde/programs/dtpdmd/manager.c
@@ -425,7 +425,7 @@ void mgr_launch_pdm( XpPdmServiceRec *rec )
        sigemptyset(&svec.sa_mask);
        svec.sa_flags   = 0;
        svec.sa_handler = SIG_DFL;
-       (void) sigaction(SIGCLD, &svec, (struct sigaction *) NULL);
+       (void) sigaction(SIGCHLD, &svec, (struct sigaction *) NULL);
 
        for (i=3; i < FOPEN_MAX; i++) {
            if ((i != rec->message_pipe[1]) && 
diff --git a/cde/programs/dtprintinfo/UI/DtApp.C 
b/cde/programs/dtprintinfo/UI/DtApp.C
index 94bc423..a93fbda 100644
--- a/cde/programs/dtprintinfo/UI/DtApp.C
+++ b/cde/programs/dtprintinfo/UI/DtApp.C
@@ -324,16 +324,16 @@ void DtApp::SaveYourSelf()
 
    save_state = true;
 
-   char *value = window->setPrefD->ShowOnlyMyJobs() ? "1" : "0";
+   char *value = window->setPrefD->ShowOnlyMyJobs() ? (char *)"1" : (char 
*)"0";
    Save("ShowOnlyMine", value);
 
-   value = window->setPrefD->ShowStatusLine() ? "1" : "0";
+   value = window->setPrefD->ShowStatusLine() ? (char *)"1" : (char *)"0";
    Save("ShowMessageLine", value);
 
-   value = window->setPrefD->ShowDetailsLabel() ? "1" : "0";
+   value = window->setPrefD->ShowDetailsLabel() ? (char *)"1" : (char *)"0";
    Save("ShowDetailsLabel", value);
 
-   value = window->setPrefD->ShowStatusFlags() ? "1" : "0";
+   value = window->setPrefD->ShowStatusFlags() ? (char *)"1" : (char *)"0";
    Save("ShowProblemFlag", value);
 
    char interval[9];
@@ -357,10 +357,10 @@ void DtApp::SaveYourSelf()
       queues = (DtPrinterIcon **) window->container->Children();
       for (i = 0; i < window->container->NumChildren(); i++)
        {
-        value = queues[i]->Visible() ? "1" : "0";
+        value = queues[i]->Visible() ? (char *)"1" : (char *)"0";
         sprintf(attribute, "%s.Visible", queues[i]->QueueObj()->Name());
         Save(attribute, value);
-        value = queues[i]->Open() ? "1" : "0";
+        value = queues[i]->Open() ? (char *)"1" : (char *)"0";
         sprintf(attribute, "%s.Open", queues[i]->QueueObj()->Name());
         Save(attribute, value);
        }
diff --git a/cde/programs/dtprintinfo/UI/DtPrinterIcon.C 
b/cde/programs/dtprintinfo/UI/DtPrinterIcon.C
index a0e593d..b2a9785 100644
--- a/cde/programs/dtprintinfo/UI/DtPrinterIcon.C
+++ b/cde/programs/dtprintinfo/UI/DtPrinterIcon.C
@@ -174,7 +174,7 @@ char *DtPrinterIcon::Description()
 
    sprintf(buf, "%s_Print", queue->Name());
    char *desc = DtActionDescription(buf);
-   return (desc ? desc : "");
+   return (desc ? desc : (char *)"");
 }
 
 void DtPrinterIcon::PrintQueueUp(boolean _flag)
diff --git a/cde/programs/dtprintinfo/UI/DtPrinterIcon.h 
b/cde/programs/dtprintinfo/UI/DtPrinterIcon.h
index 82780c3..e5d5b4c 100644
--- a/cde/programs/dtprintinfo/UI/DtPrinterIcon.h
+++ b/cde/programs/dtprintinfo/UI/DtPrinterIcon.h
@@ -59,7 +59,7 @@ class DtPrinterContainer : public Container
       : Container(category, parent, name, SCROLLED_HORIZONTAL_ROW_COLUMN) { }
    ~DtPrinterContainer() { delete dnd; }
 
-   boolean DtPrinterContainer::SetVisiblity(boolean flag)
+   boolean SetVisiblity(boolean flag)
     {
       Container::SetVisiblity(flag);
       dnd->UpdateActivity(flag);
diff --git a/cde/programs/dtprintinfo/libUI/BaseUI.h 
b/cde/programs/dtprintinfo/libUI/BaseUI.h
index f02c903..0a83a9f 100644
--- a/cde/programs/dtprintinfo/libUI/BaseUI.h
+++ b/cde/programs/dtprintinfo/libUI/BaseUI.h
@@ -40,7 +40,7 @@
   #define boolean boolean_t
   #define true B_TRUE
   #define false B_FALSE
-#elif defined(linux)
+#elif defined(linux) || defined(CSRG_BASED)
   #define false 0
   #define true 0
   #define boolean int
diff --git a/cde/programs/dtprintinfo/objects/BaseObj.h 
b/cde/programs/dtprintinfo/objects/BaseObj.h
index 1b7a6e3..7925eec 100644
--- a/cde/programs/dtprintinfo/objects/BaseObj.h
+++ b/cde/programs/dtprintinfo/objects/BaseObj.h
@@ -41,7 +41,7 @@
   #define boolean boolean_t
   #define true B_TRUE
   #define false B_FALSE
-#elif defined(linux)
+#elif defined(linux) || defined(CSRG_BASED)
   #define false 0
   #define true 0
   #define boolean int
diff --git a/cde/programs/dtprintinfo/objects/PrintObj/ParseJobs.C 
b/cde/programs/dtprintinfo/objects/PrintObj/ParseJobs.C
index 71c756b..7a32fdf 100644
--- a/cde/programs/dtprintinfo/objects/PrintObj/ParseJobs.C
+++ b/cde/programs/dtprintinfo/objects/PrintObj/ParseJobs.C
@@ -774,7 +774,7 @@ void LocalPrintJobs(char *printer, char **return_job_list, 
int *return_n_jobs)
 }
 #endif // HP LOCAL PARSER
 
-#if defined(__osf__) || defined(linux)
+#if defined(__osf__) || defined(linux) || defined(CSRG_BASED)
 //
 // DEC/OSF1 PARSER - Output from "lpstat -o<printer>
 //
@@ -870,7 +870,7 @@ void LocalPrintJobs(char *printer, char **return_job_list, 
int *return_n_jobs)
 #if defined(__osf__)
    sprintf(buf, "lpstat -o%s", printer);
 #endif
-#if defined(linux)
+#if defined(linux) || defined(CSRG_BASED)
    sprintf(buf, "lpq -P%s", printer);
 #endif
 
diff --git a/cde/programs/dtprintinfo/util/Invoke.C 
b/cde/programs/dtprintinfo/util/Invoke.C
index 590adb7..838009f 100644
--- a/cde/programs/dtprintinfo/util/Invoke.C
+++ b/cde/programs/dtprintinfo/util/Invoke.C
@@ -38,7 +38,9 @@
 #include <sys/wait.h>
 #include <string.h>
 #include <errno.h>
+#if !defined(CSRG_BASED)
 #include <values.h>
+#endif
 #ifdef _AIX
 #include <strings.h>           /* need to get bzero defined */
 #endif /* _AIX */
-- 
1.7.6

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
cdesktopenv-devel mailing list
cdesktopenv-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cdesktopenv-devel

Reply via email to