From 56ca0f6239612781df09800036692da50d27646e Mon Sep 17 00:00:00 2001 From: Starg Date: Sat, 30 Dec 2017 19:01:24 +0900 Subject: [PATCH] Fix for mingw64, part 2 --- interface/w32g_i.c | 14 -------------- interface/w32g_pref.c | 1 - timidity/calcnewt.c | 12 ------------ utils/tmdy_getopt.h | 6 +++--- 4 files changed, 3 insertions(+), 30 deletions(-) diff --git a/interface/w32g_i.c b/interface/w32g_i.c index 00a0f45f..8060be47 100644 --- a/interface/w32g_i.c +++ b/interface/w32g_i.c @@ -33,21 +33,7 @@ #undef RC_NONE #include // #include -#if defined(__CYGWIN32__) || defined(__MINGW32__) -#ifndef HAVE_NEW_MMSYSTEM -#include -#ifndef TPM_TOPALIGN -#define TPM_TOPALIGN 0x0000L /* for old version of cygwin */ -#endif -#define TIME_ONESHOT 0 -#define TIME_PERIODIC 1 -int WINAPI timeSetEvent(UINT uDelay, UINT uResolution, - void *fptc, DWORD dwUser, UINT fuEvent); -int WINAPI timeKillEvent(UINT uTimerID); -#endif -#else #include -#endif /* __CYGWIN32__ */ #include #ifndef NO_STRING_H diff --git a/interface/w32g_pref.c b/interface/w32g_pref.c index 7a3bdbc7..f57c4029 100644 --- a/interface/w32g_pref.c +++ b/interface/w32g_pref.c @@ -134,7 +134,6 @@ static int DlgOpenOutputDir(char *Dirname, HWND hwnd); static int vorbisCofigDialog(void); static int gogoCofigDialog(void); -static int flacConfigDialog(void); static int w32_reset_exe_directory(void) { diff --git a/timidity/calcnewt.c b/timidity/calcnewt.c index cc4c3c63..dc200e3b 100644 --- a/timidity/calcnewt.c +++ b/timidity/calcnewt.c @@ -9,7 +9,6 @@ int main(int argc, const char *argv[]) int i, j, n = 57; double sign = 0; -#ifdef _MSC_VER FILE *fp; if (argc != 2) @@ -23,7 +22,6 @@ int main(int argc, const char *argv[]) fprintf(stderr, "cannot open file:%s\n", argv[1]); return 2; } -#endif newt_coeffs[0][0] = 1; for (i = 0; i <= n; i++) { @@ -48,19 +46,9 @@ int main(int argc, const char *argv[]) for (j = 0, sign = pow((double)-1, i); j <= i; j++, sign *= -1) newt_coeffs[i][j] *= sign; ///r -#ifdef _MSC_VER for (i = 0; i <= n; i++) for (j = 0; j <= n; j++) fprintf(fp, "(double)%32.32g,\n", newt_coeffs[i][j]); fclose(fp); -#else - for (i = 0; i <= n; i++) { - printf("{\n"); - for (j = 0; j <= n; j++) { - printf("%32.32g,\n", newt_coeffs[i][j]); - } - printf("},\n"); - } -#endif return 0; } diff --git a/utils/tmdy_getopt.h b/utils/tmdy_getopt.h index 12dc54c9..13ec861b 100644 --- a/utils/tmdy_getopt.h +++ b/utils/tmdy_getopt.h @@ -62,7 +62,7 @@ extern int opterr; extern int optopt; #ifndef UTILS_GETOPT_PRIVATE -extern int getopt(int __argc, char * const *__argv, const char *__shortopts); +extern int getopt(int argc, char * const *argv, const char *__shortopts); #endif /* !UTILS_GETOPT_PRIVATE */ #endif /* */ @@ -150,10 +150,10 @@ struct option arguments to the option '\0'. This behavior is specific to the GNU `getopt'. */ -extern int getopt_long(int __argc, char * const *__argv, +extern int getopt_long(int argc, char * const *argv, const char *__shortopts, const struct option *__longopts, int *__longind); -extern int getopt_long_only(int __argc, char * const *__argv, +extern int getopt_long_only(int argc, char * const *argv, const char *__shortopts, const struct option *__longopts, int *__longind); #endif /* !UTILS_GETOPT_PRIVATE */ -- 2.11.0