Re-order include and try typedef

pull/12/head
Izaak Beekman 8 years ago
parent ac5721677d
commit bb45b4092d
No known key found for this signature in database
GPG Key ID: A93CE70D8021BD0F

@ -410,7 +410,7 @@ if (SERIAL_MPI)
list(APPEND PSB_base_source_C_files modules/fakempi.c)
endif()
if(WIN32)
list(APPEND PSB_base_source_C_files modules/gettimeofday.c)
list(APPEND PSB_base_source_C_files modules/gettimeofday.c modules/gettimeofday.h)
endif()
foreach(file IN LISTS PSB_base_source_C_files)
list(APPEND base_source_C_files ${CMAKE_CURRENT_LIST_DIR}/${file})

@ -1,6 +1,6 @@
#ifdef _WIN32
#include <time.h>
#include <windows.h>
#include <time.h>
#else
#include <sys/time.h>
#endif

@ -1,12 +1,12 @@
#include <stdio.h>
#include <string.h>
#ifdef _WIN32
#include <time.h>
#include <windows.h>
#include <time.h>
#include "gettimeofday.h"
#else
#include <sys/time.h>
#endif
#include <stdio.h>
#include <string.h>
#include "psb_internals.h"

@ -6,11 +6,11 @@
#define DELTA_EPOCH_IN_MICROSECS 11644473600000000ULL
#endif
struct timezone
typedef struct
{
int tz_minuteswest; /* minutes W of Greenwich */
int tz_dsttime; /* type of dst correction */
};
} timezone;
int gettimeofday(struct timeval *tv, struct timezone *tz)
{

@ -1,15 +1,15 @@
#include <time.h>
#include <windows.h>
#include <time.h>
#if defined(_MSC_VER) || defined(_MSC_EXTENSIONS)
#define DELTA_EPOCH_IN_MICROSECS 11644473600000000Ui64
#else
#define DELTA_EPOCH_IN_MICROSECS 11644473600000000ULL
#endif
struct timezone
typedef struct
{
int tz_minuteswest; /* minutes W of Greenwich */
int tz_dsttime; /* type of dst correction */
};
} timezone;
int gettimeofday(struct timeval *tv, struct timezone *tz);

Loading…
Cancel
Save