From b2c5c74b7954279e8cc15790e168a1d4283b4e63 Mon Sep 17 00:00:00 2001 From: "Matthias P. Braendli" Date: Mon, 11 Dec 2017 15:25:05 +0100 Subject: Simplify porting.{h,c} --- src/porting.c | 13 ------------- src/porting.h | 20 +------------------- 2 files changed, 1 insertion(+), 32 deletions(-) (limited to 'src') diff --git a/src/porting.c b/src/porting.c index 79523e5..f7421b0 100644 --- a/src/porting.c +++ b/src/porting.c @@ -21,19 +21,6 @@ #include "porting.h" - -#ifndef HAVE_GETTIMEOFDAY -#include -int gettimeofday(struct timeval* t, void* timezone) -{ - struct timeb timebuffer; - ftime(&timebuffer); - t->tv_sec=timebuffer.time; - t->tv_usec=1000*timebuffer.millitm; - return 0; -} -#endif - #ifdef _WIN32 unsigned int _CRT_fmode = _O_BINARY; #endif diff --git a/src/porting.h b/src/porting.h index 2ac9b90..1799ba7 100644 --- a/src/porting.h +++ b/src/porting.h @@ -19,25 +19,12 @@ along with ODR-DabMod. If not, see . */ -#ifndef PORTING_H -#define PORTING_H +#pragma once #ifdef HAVE_CONFIG_H # include #endif -#ifndef HAVE_BZERO -# define bzero(s, n) memset(s, 0, n) -#endif - -#ifndef HAVE_GETTIMEOFDAY -#include -#ifdef __cplusplus -extern "C" -#endif -int gettimeofday(struct timeval* t, void* timezone); -#endif - #ifdef _WIN32 #include // For setting default opening mode with fopen as binary, for all files @@ -45,8 +32,3 @@ int gettimeofday(struct timeval* t, void* timezone); extern unsigned int _CRT_fmode; #endif -#ifndef HAVE_KILL -# define kill(a, b) raise(b) -#endif - -#endif // PORTING_H -- cgit v1.2.3