[Nagiosplug-checkins] CVS: nagiosplug/plugins common.h.in,1.2,1.3 utils.c,1.8,1.9 utils.h.in,1.5,1.6
Karl DeBisschop
kdebisschop at users.sourceforge.net
Thu Nov 7 23:21:02 CET 2002
- Previous message: [Nagiosplug-checkins] CVS: nagiosplug/plugins check_http.c,1.9,1.10 check_load.c,1.3,1.4 check_ping.c,1.6,1.7 check_procs.c,1.3,1.4 check_smtp.c,1.7,1.8 check_tcp.c,1.6,1.7
- Next message: [Nagiosplug-checkins] CVS: nagiosplug acconfig.h,1.4,1.5 configure.in,1.21,1.22
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/nagiosplug/nagiosplug/plugins
In directory usw-pr-cvs1:/tmp/cvs-serv12419/plugins
Modified Files:
common.h.in utils.c utils.h.in
Log Message:
patches required to build on solaris with asprintf and gettimeofday
Index: common.h.in
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/common.h.in,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** common.h.in 18 Jun 2002 01:06:16 -0000 1.2
--- common.h.in 8 Nov 2002 07:20:05 -0000 1.3
***************
*** 88,91 ****
--- 88,107 ----
#endif
+ #ifndef HAVE_ASPRINTF
+ int asprintf(char **strp, const char *fmt, ...);
+ #endif
+
+ #ifndef HAVE_VASPRINTF
+ /* int vasprintf(char **strp, const char *fmt, va_list ap); */
+ #endif
+
+ #ifndef HAVE_SNPRINTF
+ int snprintf(char *str, size_t size, const char *format, ...);
+ #endif
+
+ #ifndef HAVE_VSNPRINTF
+ int vsnprintf(char *str, size_t size, const char *format, va_list ap);
+ #endif
+
/*
*
Index: utils.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/utils.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -r1.8 -r1.9
*** utils.c 21 Oct 2002 04:05:48 -0000 1.8
--- utils.c 8 Nov 2002 07:20:05 -0000 1.9
***************
*** 45,48 ****
--- 45,50 ----
int is_option (char *str);
+ double delta_time (struct timeval tv);
+
void strip (char *);
char *strscpy (char *dest, const char *src);
***************
*** 316,319 ****
--- 318,331 ----
+ #ifndef HAVE_GETTIMEOFDAY
+ int
+ gettimeofday (struct timeval *tv, struct timezone *tz)
+ {
+ tv->tv_usec = 0;
+ tv->tv_sec = (long) time ((time_t) 0);
+ }
+ #endif
+
+
double
***************
*** 321,326 ****
{
struct timeval now;
- struct timezone tz;
- double et;
gettimeofday (&now, NULL);
--- 333,336 ----
***************
*** 367,372 ****
strscpy (char *dest, const char *src)
{
- size_t len;
-
if (src == NULL)
return NULL;
--- 377,380 ----
Index: utils.h.in
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/utils.h.in,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -r1.5 -r1.6
*** utils.h.in 18 Oct 2002 03:46:43 -0000 1.5
--- utils.h.in 8 Nov 2002 07:20:05 -0000 1.6
***************
*** 47,60 ****
/* generalized timer that will do milliseconds if available */
! #ifndef HAVE_GETTIMEOFDAY
struct timeval {
long tv_sec; /* seconds */
long tv_usec; /* microseconds */
};
! #define gettimeofday (tvp,tz) {\
! tvp->tv_usec=0;\
! tvp->tv_sec=(long)time();\
! }
#endif
--- 47,59 ----
/* generalized timer that will do milliseconds if available */
! #ifndef HAVE_STRUCT_TIMEVAL
struct timeval {
long tv_sec; /* seconds */
long tv_usec; /* microseconds */
};
+ #endif
! #ifndef HAVE_GETTIMEOFDAY
! int gettimeofday(struct timeval *tv, struct timezone *tz);
#endif
- Previous message: [Nagiosplug-checkins] CVS: nagiosplug/plugins check_http.c,1.9,1.10 check_load.c,1.3,1.4 check_ping.c,1.6,1.7 check_procs.c,1.3,1.4 check_smtp.c,1.7,1.8 check_tcp.c,1.6,1.7
- Next message: [Nagiosplug-checkins] CVS: nagiosplug acconfig.h,1.4,1.5 configure.in,1.21,1.22
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Commits
mailing list