makedefs temp files issue with mingw

The unlink call wasn't operating the same on a makedefs built
on mingw, and dat/mdXXXX files were being left behind post-build.

Provide an alternative way of doing the temporary files if
MD_USE_TMPFILE_S is defined during the compile of makedefs.c
This commit is contained in:
nhmall
2022-12-12 12:53:51 -05:00
parent 092068495b
commit 9e91064659
2 changed files with 33 additions and 9 deletions

View File

@@ -103,6 +103,11 @@ extern void interject(int);
*/
#ifdef __MINGW32__
#define MD_USE_TMPFILE_S
#if !defined(__cplusplus)
extern errno_t tmpfile_s(FILE * restrict * restrict streamptr);
#endif
#
#ifdef strncasecmp
#undef strncasecmp
#endif
@@ -115,6 +120,7 @@ extern void interject(int);
#endif
#ifdef _MSC_VER
#define MD_USE_TMPFILE_S
#define HAS_STDINT
#if (_MSC_VER > 1000)
/* Visual C 8 warning elimination */