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:
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user