fixes for WIN32
This commit is contained in:
parent
f9ed9961df
commit
b9e63fa4b9
2
packages/tai/Makefile.in
Normal file → Executable file
2
packages/tai/Makefile.in
Normal file → Executable file
@ -48,7 +48,7 @@ pl-tai.o: $(srcdir)/pl-tai.c
|
||||
$(CC) -c $(CFLAGS) $(srcdir)/pl-tai.c -o pl-tai.o
|
||||
|
||||
@DO_SECOND_LD@pl-tai.@SO@: pl-tai.o
|
||||
@DO_SECOND_LD@ @SHLIB_LD@ -o pl-tai.@SO@ pl-tai.o libtai/libtai.a @EXTRA_LIBS_FOR_DLLS@
|
||||
@DO_SECOND_LD@ @SHLIB_LD@ -o pl-tai.@SO@ pl-tai.o libtai/libtai.a @EXTRA_LIBS_FOR_SWIDLLS@
|
||||
|
||||
install: all
|
||||
$(INSTALL_PROGRAM) $(SOBJS) $(DESTDIR)$(YAPLIBDIR)
|
||||
|
2
packages/tai/libtai/tai.h
Normal file → Executable file
2
packages/tai/libtai/tai.h
Normal file → Executable file
@ -8,7 +8,7 @@ typedef unsigned __int64 uint64_t;
|
||||
#include <inttypes.h> /* more portable than stdint.h */
|
||||
#endif
|
||||
|
||||
#ifdef __WINDOWS__
|
||||
#if defined(__WINDOWS__) && !defined(__GNUC__)
|
||||
#define LL(x) x ## i64
|
||||
#define ULL(x) x ## ui64
|
||||
#else
|
||||
|
18
packages/tai/pl-tai.c
Normal file → Executable file
18
packages/tai/pl-tai.c
Normal file → Executable file
@ -38,9 +38,23 @@ is supposed to give the POSIX standard one.
|
||||
#include <stdio.h>
|
||||
#include <ctype.h>
|
||||
|
||||
#if defined(__WINDOWS__) || defined (__CYGWIN__)
|
||||
#if defined(__WINDOWS__) || defined (__CYGWIN__) || defined (__MINGW32__)
|
||||
#define timezone _timezone
|
||||
#define HAVE_VAR_TIMEZONE
|
||||
#ifndef _POSIX
|
||||
#endif
|
||||
#define localtime_r(_Time, _Tm) ({ struct tm *___tmp_tm = \
|
||||
localtime((_Time)); \
|
||||
if (___tmp_tm) { \
|
||||
*(_Tm) = *___tmp_tm; \
|
||||
___tmp_tm = (_Tm); \
|
||||
} \
|
||||
___tmp_tm; })
|
||||
#define asctime_r(_Tm, _Buf) ({ char *___tmp_tm = asctime((_Tm)); \
|
||||
if (___tmp_tm) \
|
||||
___tmp_tm = \
|
||||
strcpy((_Buf),___tmp_tm);\
|
||||
___tmp_tm; })
|
||||
#include <time.h>
|
||||
#else
|
||||
extern char *tzname[2];
|
||||
#ifdef HAVE_VAR_TIMEZONE
|
||||
|
Reference in New Issue
Block a user