brian 96/11/03 13:13:01
Modified: support rotatelogs.c Log: More missing header files, printf warning fixed. Revision Changes Path 1.5 +3 -1 apache/support/rotatelogs.c Index: rotatelogs.c =================================================================== RCS file: /export/home/cvs/apache/support/rotatelogs.c,v retrieving revision 1.4 retrieving revision 1.5 diff -C3 -r1.4 -r1.5 *** rotatelogs.c 1996/11/03 21:02:33 1.4 --- rotatelogs.c 1996/11/03 21:13:00 1.5 *************** *** 12,20 **** --- 12,22 ---- #define MAX_PATH 1024 #include <stdio.h> + #include <stdlib.h> #include <time.h> #include <errno.h> #include <fcntl.h> + #include <unistd.h> void main(int argc,char **argv) { *************** *** 64,70 **** if(nLogFD < 0) { time_t tLogStart=(time(NULL)/tRotation)*tRotation; ! sprintf(buf2,"%s.%d",szLogRoot,tLogStart); tLogEnd=tLogStart+tRotation; nLogFD=open(buf2,O_WRONLY|O_CREAT|O_APPEND,0666); if(nLogFD < 0) --- 66,72 ---- if(nLogFD < 0) { time_t tLogStart=(time(NULL)/tRotation)*tRotation; ! sprintf(buf2,"%s.%d",szLogRoot,(int)tLogStart); tLogEnd=tLogStart+tRotation; nLogFD=open(buf2,O_WRONLY|O_CREAT|O_APPEND,0666); if(nLogFD < 0)