No ANSI prototype for malloc() caused
the returned pointer to be truncated
to 32 bits.
---
cde/lib/DtSvc/DtUtil2/DtGetMessage.c | 1 +
cde/lib/DtSvc/DtUtil2/MsgLog.c | 2 +-
cde/programs/dtexec/Main.c | 19 +++++++++++--------
3 files changed, 13 insertions(+), 9 deletions(-)
diff --git a/cde/lib/DtSvc/DtUtil2/DtGetMessage.c
b/cde/lib/DtSvc/DtUtil2/DtGetMessage.c
index 527a348..b1fe32c 100644
--- a/cde/lib/DtSvc/DtUtil2/DtGetMessage.c
+++ b/cde/lib/DtSvc/DtUtil2/DtGetMessage.c
@@ -40,6 +40,7 @@
#ifndef NO_MESSAGE_CATALOG
#include <stdio.h>
+#include <stdlib.h>
#include <string.h>
#include <nl_types.h>
#include "DtSvcLock.h"
diff --git a/cde/lib/DtSvc/DtUtil2/MsgLog.c b/cde/lib/DtSvc/DtUtil2/MsgLog.c
index 8d3dd82..0aa48d1 100644
--- a/cde/lib/DtSvc/DtUtil2/MsgLog.c
+++ b/cde/lib/DtSvc/DtUtil2/MsgLog.c
@@ -145,7 +145,7 @@ static char * get_file_name (
va_list args;
file = malloc(MAXPATHLEN+1);
- if (! file) return;
+ if (! file) return NULL;
Va_start (args, format);
diff --git a/cde/programs/dtexec/Main.c b/cde/programs/dtexec/Main.c
index 3c359f0..71f77ee 100644
--- a/cde/programs/dtexec/Main.c
+++ b/cde/programs/dtexec/Main.c
@@ -59,6 +59,9 @@
#include "osdep.h" /* select(2) mask width and bit manipulation macros */
#include <Tt/tt_c.h>
#include <locale.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <string.h>
#include <Dt/MsgLog.h>
@@ -320,7 +323,7 @@ Help(
*****************************************************************************/
static void
-#if defined(__aix) || defined (__osf__)
+#if defined(__aix) || defined (__osf__) || defined(__FreeBSD__)
PanicSignal(int s)
#else
PanicSignal(void)
@@ -357,7 +360,7 @@ PanicSignal(void)
*****************************************************************************/
static void
-#if defined(__aix) || defined (__osf__)
+#if defined(__aix) || defined (__osf__) || defined(__FreeBSD__)
IgnoreSignal(int i)
#else
IgnoreSignal(void)
@@ -399,7 +402,7 @@ IgnoreSignal(void)
*****************************************************************************/
static void
-#if defined(__aix) || defined (__osf__)
+#if defined(__aix) || defined (__osf__) || defined(__FreeBSD__)
UrgentSignal(int i)
#else
UrgentSignal(void)
@@ -450,7 +453,7 @@ UrgentSignal(void)
*
*****************************************************************************/
static void
-#if defined(__aix) || defined (__osf__)
+#if defined(__aix) || defined (__osf__) || defined(__FreeBSD__)
SigCld(int i)
#else
SigCld(void)
@@ -769,7 +772,7 @@ ParseCommandLine(
#endif /* _DTEXEC_NLS16 */
if (tick2)
- *tick2 = NULL;
+ *tick2 = 0;
#ifdef _DTEXEC_NLS16
tick1 = (char *) Dt_strrchr( dtSvcProcIdG, '_' );
@@ -778,8 +781,8 @@ ParseCommandLine(
#endif /* _DTEXEC_NLS16 */
if ( tick1 && tick2 ) {
- *tick1 = NULL;
- *tick2 = NULL;
+ *tick1 = 0;
+ *tick2 = 0;
dtSvcInvIdG = atoi((char *) (tick1 + 1));
dtSvcChildIdG = atoi((char *) (tick2 + 1));
@@ -1520,7 +1523,7 @@ main (
* a SIGCLD, give up and exit.
*/
if (rediscoverUrgentSigG > ((1000/SHORT_SELECT_TIMEOUT)*5) ) {
-#if defined(__aix) || defined (__osf__)
+#if defined(__aix) || defined (__osf__) || defined(__FreeBSD__)
PanicSignal(0);
#else
PanicSignal();
--
1.7.9.2
------------------------------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/cdesktopenv-devel