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
This commit is contained in:
Andrew Johnson
2013-11-15 17:24:33 -06:00
parent 280ff742c5
commit 4d64941bd2
2 changed files with 2 additions and 2 deletions

View File

@@ -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;

View File

@@ -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);