headers: crt: merge sys/timeb_s.h into sys/timeb.h

Also remove SECSYSHEAD stuff from Makefile.am and configure.ac.

Signed-off-by: Zhongteng Gui <dragon-archer@outlook.com>
Signed-off-by: LIU Hao <lh_mouse@126.com>
diff --git a/mingw-w64-headers/Makefile.am b/mingw-w64-headers/Makefile.am
index 5d9088d..f7ef5cd 100644
--- a/mingw-w64-headers/Makefile.am
+++ b/mingw-w64-headers/Makefile.am
@@ -2,7 +2,6 @@
 baseheaddir = $(includedir)
 sysheaddir = $(baseheaddir)/sys
 secheaddir = $(baseheaddir)/sec_api
-secsysheaddir = $(baseheaddir)/sec_api/sys
 glheaddir = $(baseheaddir)/GL
 khrheaddir = $(baseheaddir)/KHR
 gdiplusheaddir = $(baseheaddir)/gdiplus
@@ -13,7 +12,6 @@
 basehead_HEADERS = @BASEHEAD_LIST@
 syshead_HEADERS = @SYSHEAD_LIST@
 sechead_HEADERS = @SECHEAD_LIST@
-secsyshead_HEADERS = @SECSYSHEAD_LIST@
 glhead_HEADERS = @GLHEAD_LIST@
 khrhead_HEADERS = @KHRHEAD_LIST@
 gdiplushead_HEADERS = @GDIPLUSHEAD_LIST@
@@ -53,7 +51,6 @@
   crt/*.inl \
   crt/sys/*.h \
   crt/sec_api/*.h \
-  crt/sec_api/sys/*.h \
   ddk/include/ddk/*.h \
   tlb/*.tlb
 
diff --git a/mingw-w64-headers/configure.ac b/mingw-w64-headers/configure.ac
index e943d7c..549170d 100644
--- a/mingw-w64-headers/configure.ac
+++ b/mingw-w64-headers/configure.ac
@@ -68,7 +68,6 @@
   BASEHEAD_LIST="$BASEHEAD_LIST "$srcdir/crt/*.h" "$srcdir/crt/*.inl
   SYSHEAD_LIST=$srcdir/crt/sys/*.h
   SECHEAD_LIST=$srcdir/crt/sec_api/*.h
-  SECSYSHEAD_LIST=$srcdir/crt/sec_api/sys/*.h
 ])
 GDIPLUSHEAD_LIST=$srcdir/include/gdiplus/*.h
 WRLHEAD_LIST=$srcdir/include/wrl/*.h
@@ -85,7 +84,6 @@
 AC_SUBST([MINGWHELPERHEAD_LIST])
 AC_SUBST([SYSHEAD_LIST])
 AC_SUBST([SECHEAD_LIST])
-AC_SUBST([SECSYSHEAD_LIST])
 
 AC_MSG_CHECKING([for optional sdk headers])
 AC_ARG_ENABLE([sdk],
diff --git a/mingw-w64-headers/crt/sec_api/sys/timeb_s.h b/mingw-w64-headers/crt/sec_api/sys/timeb_s.h
deleted file mode 100644
index b878488..0000000
--- a/mingw-w64-headers/crt/sec_api/sys/timeb_s.h
+++ /dev/null
@@ -1,25 +0,0 @@
-/**
- * This file has no copyright assigned and is placed in the Public Domain.
- * This file is part of the mingw-w64 runtime package.
- * No warranty is given; refer to the file DISCLAIMER.PD within this package.
- */
-
-#ifndef _TIMEB_H_S
-#define _TIMEB_H_S
-
-#include <sys/timeb.h>
-
-_CRT_BEGIN_C_HEADER
-
-  _CRTIMP errno_t __cdecl _ftime32_s(struct __timeb32 *_Time);
-  _CRTIMP errno_t __cdecl _ftime64_s(struct __timeb64 *_Time);
-
-#ifndef _USE_32BIT_TIME_T
-#define _ftime_s _ftime64_s
-#else
-#define _ftime_s _ftime32_s
-#endif
-
-_CRT_END_C_HEADER
-
-#endif
diff --git a/mingw-w64-headers/crt/sys/timeb.h b/mingw-w64-headers/crt/sys/timeb.h
index 2bb9584..23f4133 100644
--- a/mingw-w64-headers/crt/sys/timeb.h
+++ b/mingw-w64-headers/crt/sys/timeb.h
@@ -44,6 +44,8 @@
 
   _CRTIMP void __cdecl _ftime64(struct __timeb64 *_Time);
   _CRTIMP void __cdecl _ftime32(struct __timeb32 *_Time);
+  _CRTIMP errno_t __cdecl _ftime64_s(struct __timeb64 *_Time);
+  _CRTIMP errno_t __cdecl _ftime32_s(struct __timeb32 *_Time);
 
 /*
  * To prevent ABI issues, the mingw-w64 runtime should not call the
@@ -53,9 +55,11 @@
 #ifndef _USE_32BIT_TIME_T
 #define _timeb __timeb64
 #define _ftime _ftime64
+#define _ftime_s _ftime64_s
 #else
 #define _timeb __timeb32
 #define _ftime _ftime32
+#define _ftime_s _ftime32_s
 #endif
 #endif /* _CRTBLD */
 
@@ -98,5 +102,4 @@
 
 _CRT_END_C_HEADER
 
-#include <sec_api/sys/timeb_s.h>
 #endif