jim 97/01/20 15:55:13
Modified: src conf.h util_snprintf.c
Log:
fix -Wall warning about ap_snprintf() and allow for
HAVE_SNPRINT use in conf.h
Revision Changes Path
1.71 +11 -0 apache/src/conf.h
Index: conf.h
===================================================================
RCS file: /export/home/cvs/apache/src/conf.h,v
retrieving revision 1.70
retrieving revision 1.71
diff -C3 -r1.70 -r1.71
*** conf.h 1997/01/18 19:17:21 1.70
--- conf.h 1997/01/20 23:55:10 1.71
***************
*** 480,485 ****
--- 480,496 ----
*/
#include <sys/types.h>
+ /*
+ * We use snprintf() to avoid overflows, but we include
+ * our own version (ap_snprintf). Allow for people to use their
+ * snprintf() if they want
+ */
+ #ifdef HAVE_SNPRINTF
+ #define ap_snprintf snprintf
+ #define ap_vsnprintf vsnprintf
+ #else
+ int ap_snprintf(char *buf, size_t len, const char *format,...);
+ #endif
#if !defined(NEXT) && !defined(CONVEXOS)
#include <dirent.h>
1.4 +2 -4 apache/src/util_snprintf.c
Index: util_snprintf.c
===================================================================
RCS file: /export/home/cvs/apache/src/util_snprintf.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -C3 -r1.3 -r1.4
*** util_snprintf.c 1997/01/19 23:46:25 1.3
--- util_snprintf.c 1997/01/20 23:55:11 1.4
***************
*** 53,63 ****
* <[EMAIL PROTECTED]> for xinetd.
*/
! #ifdef HAVE_SNPRINTF
! #define ap_snprintf snprintf
! #define ap_vsnprintf vsnprintf
! #else
#include <stdio.h>
#include <ctype.h>
--- 53,61 ----
* <[EMAIL PROTECTED]> for xinetd.
*/
! #include "conf.h"
! #ifndef HAVE_SNPRINTF
#include <stdio.h>
#include <ctype.h>