ref: f3394f46b4d322bc746540c16122a5f69585927c
parent: e3df758897b30efdfd803a6212012904e220580d
author: Anthony J. Bentley <[email protected]>
date: Tue Sep 23 23:17:33 EDT 2014
Fix MinGW target.
--- a/Makefile
+++ b/Makefile
@@ -93,7 +93,8 @@
# install instructions instead.
mingw:
$Qenv PATH=/usr/local/mingw32/bin:/bin:/usr/bin:/usr/local/bin \
- make CC=gcc CFLAGS="-I/usr/local/mingw32/include ${CFLAGS}"
+ make CC=gcc CFLAGS="-I/usr/local/mingw32/include \
+ -D__progname=\\\"\\\" ${CFLAGS}"
$Qmv rgbasm rgbasm.exe
$Qmv rgblink rgblink.exe
$Qmv rgbfix rgbfix.exe
--- a/src/extern/err.c
+++ b/src/extern/err.c
@@ -21,12 +21,14 @@
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
-#include <err.h>
#include <stdio.h>
#include <stdarg.h>
#include <stdlib.h>
+#include "extern/err.h"
+#ifndef __MINGW32__
extern char *__progname;
+#endif
void rgbds_vwarn(const char *fmt, va_list ap)
{