From 4d64941bd26bd9c0fea77e12cebbceecc4b241c2 Mon Sep 17 00:00:00 2001 From: Andrew Johnson Date: Fri, 15 Nov 2013 17:24:33 -0600 Subject: [PATCH] libCom: truncateFile size arg should be unsigned long It gets compared against LONG_MAX and cast to a long, so now we have architectures where int != long we must distinguish them --- src/libCom/misc/truncateFile.c | 2 +- src/libCom/osi/epicsStdio.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libCom/misc/truncateFile.c b/src/libCom/misc/truncateFile.c index 9ff2455ec..ccb1450c2 100644 --- a/src/libCom/misc/truncateFile.c +++ b/src/libCom/misc/truncateFile.c @@ -25,7 +25,7 @@ * truncate to specified size (we dont use truncate() * because it is not portable) */ -epicsShareFunc enum TF_RETURN truncateFile (const char *pFileName, unsigned size) +epicsShareFunc enum TF_RETURN truncateFile (const char *pFileName, unsigned long size) { char tmpName[256>L_tmpnam?256:L_tmpnam]; long filePos; diff --git a/src/libCom/osi/epicsStdio.h b/src/libCom/osi/epicsStdio.h index d05a6912a..172d5cf87 100644 --- a/src/libCom/osi/epicsStdio.h +++ b/src/libCom/osi/epicsStdio.h @@ -66,7 +66,7 @@ epicsShareFunc int epicsShareAPI epicsVsnprintf( * TF_ERROR if the file could not be truncated. */ enum TF_RETURN {TF_OK=0, TF_ERROR=1}; -epicsShareFunc enum TF_RETURN truncateFile ( const char *pFileName, unsigned size ); +epicsShareFunc enum TF_RETURN truncateFile ( const char *pFileName, unsigned long size ); /* The following are for redirecting stdin,stdout,stderr */ epicsShareFunc FILE * epicsShareAPI epicsGetStdin(void);