pike.git / src / modules / HTTPLoop / util.c

version» Context lines:

pike.git/src/modules/HTTPLoop/util.c:5:   */      #include <global.h>      #include "config.h"      #include <threads.h>   #include <fdlib.h>      #ifdef _REENTRANT - #include <stdlib.h> +    #include <errno.h> - #ifdef HAVE_UNISTD_H - #include <unistd.h> - #endif - #include <sys/types.h> +    #ifdef HAVE_SYS_SOCKET_H   #include <sys/socket.h>   #endif   #ifdef HAVE_NETINET_IN_H   #include <netinet/in.h>   #endif   #ifdef HAVE_ARPA_INET_H   #include <arpa/inet.h>   #endif      #include "pike_netlib.h"   #include "accept_and_parse.h"   #include "util.h"         int aap_get_time(void)   {    static int t = 0;    static int last_time; -  if(!(t++%10)) last_time = TIME(0); +  if(!(t++%10)) last_time = time(0);    return last_time;   }      ptrdiff_t aap_swrite(int to, char *buf, size_t towrite)   {    ptrdiff_t res=0;    ptrdiff_t sent = 0;    while(towrite)    {    while((res = fd_write(to, buf, towrite)) < 0)