1/* size.c 2 Get the size in bytes of a file. */ 3 4#include "uucp.h" 5 6#include "uudefs.h" 7#include "sysdep.h" 8#include "system.h" 9 10#include <errno.h> 11 12long 13csysdep_size (zfile) 14 const char *zfile; 15{ 16 struct stat s; 17 18 if (stat ((char *) zfile, &s) < 0) 19 { 20 if (errno == ENOENT) 21 return -1; 22 ulog (LOG_ERROR, "stat (%s): %s", zfile, strerror (errno)); 23 return -2; 24 } 25 26 return s.st_size; 27} 28