~lastrosade/jsthttpd

cff1f394af2c107dcb909f93aa79531759cf68ce — Anthony G. Basile 9 years ago 4585f38
Restructure includes of <time.h> and <sys/time.h>

CLOCK_MONOTONIC is inherited from <bits/time.h> via <time.h>.
This was missing from src/timers.c which inherits a local header
"timers.h".  Including <time.h> in "timers.h" fixes the problem
but makes the inclusion of <time.h> and <sys/time.h> redundant
int libhttpd.c and thttpd.c.
4 files changed, 1 insertions(+), 6 deletions(-)

M src/libhttpd.c
M src/thttpd.c
M src/timers.c
M src/timers.h
M src/libhttpd.c => src/libhttpd.c +0 -1
@@ 42,7 42,6 @@
#include <ctype.h>
#include <errno.h>
#include <fcntl.h>
#include <time.h>
#ifdef HAVE_MEMORY_H
#include <memory.h>
#endif /* HAVE_MEMORY_H */

M src/thttpd.c => src/thttpd.c +0 -4
@@ 31,7 31,6 @@
//system headers
#include <sys/param.h>
#include <sys/types.h>
#include <sys/time.h>
#include <sys/stat.h>
#include <sys/wait.h>
#include <sys/uio.h>


@@ 49,9 48,6 @@
#include <stdlib.h>
#include <string.h>
#include <syslog.h>
#ifdef TIME_WITH_SYS_TIME
#include <time.h>
#endif
#include <unistd.h>

//local headers

M src/timers.c => src/timers.c +0 -1
@@ 47,7 47,6 @@ ClientData JunkClientData;
#undef HAVE_LIBRT_MONO
#if defined(HAVE_LIBRT) && defined(CLOCK_MONOTONIC)
#define HAVE_LIBRT_MONO
#include <time.h>
static int use_monotonic = 0;		/* monotonic clock runtime availability flag */
static struct timeval tv_diff;		/* system time - monotonic difference at start */
#endif

M src/timers.h => src/timers.h +1 -0
@@ 29,6 29,7 @@
#define _TIMERS_H_

#include <sys/time.h>
#include <time.h>

#ifndef INFTIM
#define INFTIM -1