]> granicus.if.org Git - nethack/commitdiff
be more consistent with CROSS_TO_target macro names for cross-compiles
authornhmall <nhmall@nethack.org>
Thu, 8 Oct 2020 17:49:24 +0000 (13:49 -0400)
committernhmall <nhmall@nethack.org>
Thu, 8 Oct 2020 17:49:24 +0000 (13:49 -0400)
-DCROSS_TO_MSDOS msdos cross-compile (djgpp cross-compiler)
-DCROSS_TO_AMIGA Amiga cross-compile
-DCROSS_TO_WASM wasm cross-compile (emscripten)

16 files changed:
include/extern.h
include/pcconf.h
outdated/include/amiconf.h
outdated/sys/amiga/amidos.c
outdated/sys/amiga/amigst.c
outdated/sys/amiga/amiwind.c
outdated/sys/amiga/winamenu.c
outdated/sys/amiga/winami.c
outdated/sys/amiga/winchar.c
outdated/sys/amiga/winfuncs.c
outdated/sys/amiga/winkey.c
outdated/sys/amiga/winreq.c
outdated/sys/amiga/winstr.c
sys/share/pcmain.c
sys/share/pcsys.c
sys/unix/hints/include/cross-pre.2020

index 0689c4d9f88493bdfc755cc6ae91eea044d3d5db..52b28f61686334e7a469f8eed7cf5867f88d7d6e 100644 (file)
@@ -2150,7 +2150,7 @@ E void NDECL(deliver_splev_message);
 /* ### random.c ### */
 
 #if defined(RANDOM) && !defined(__GO32__) /* djgpp has its own random */
-#ifndef AMIGA_CROSS
+#ifndef CROSS_TO_AMIGA
 E void FDECL(srandom, (unsigned));
 E char *FDECL(initstate, (unsigned, char *, int));
 E char *FDECL(setstate, (char *));
index 86ce2efe7d79308ed08b1648b2e84af474a386d3..5e0445eba7e418224df10d113ab3b220cb1b209d 100644 (file)
@@ -35,7 +35,7 @@
 
 /*#define OVERLAY */ /* Manual overlay definition (MSC 6.0ax only) */
 
-#ifndef AMIGA_CROSS
+#ifndef CROSS_TO_AMIGA
 #define SHELL /* via exec of COMMAND.COM */
 #endif
 
@@ -90,7 +90,7 @@
 #define ANSI_DEFAULT
 #endif
 
-#ifndef AMIGA_CROSS
+#ifndef CROSS_TO_AMIGA
 #define RANDOM /* have Berkeley random(3) */
 #endif
 
 #include <process.h> /* Provides prototypes of exit(), spawn()      */
 #endif
 
-#ifdef AMIGA_CROSS
+#ifdef CROSS_TO_AMIGA
 #include <spawn.h>
 #endif
 
index 5215515d88647ab06eb8c7f7c595b206d15c2cd5..477c9248a727d45acfb31986a6d90cc390c54b24 100644 (file)
@@ -14,7 +14,7 @@
 
 #include <time.h> /* get time_t defined before use! */
 
-#ifdef AMIGA_CROSS
+#ifdef CROSS_TO_AMIGA
 #include <stdlib.h>
 #include <string.h>
 #endif
@@ -56,7 +56,7 @@ typedef long off_t;
 #define DLBFILE2 "nhsdat" /* sound library */
 #endif
 
-#ifndef AMIGA_CROSS
+#ifndef CROSS_TO_AMIGA
 #define FILENAME_CMP stricmp /* case insensitive */
 #else
 #define FILENAME_CMP strcmpi /* case insensitive */
@@ -76,7 +76,7 @@ typedef long off_t;
 #define MFLOPPY /* You'll probably want this; provides assistance \
                  * for typical personal computer configurations   \
                  */
-#ifndef AMIGA_CROSS
+#ifndef CROSS_TO_AMIGA
 #define RANDOM
 #endif
 
@@ -149,7 +149,7 @@ extern char *FDECL(gets, (char *));
 
 #define TEXTCOLOR /* Use colored monsters and objects */
 #define HACKFONT  /* Use special hack.font */
-#ifndef AMIGA_CROSS   /* issues with prototype and spawnl */
+#ifndef CROSS_TO_AMIGA   /* issues with prototype and spawnl */
 #define SHELL  /* Have a shell escape command (!) */
 #endif
 #define MAIL      /* Get mail at unexpected occasions */
index 4f24130083eaec65bdf8dd7d28a30160bf741687..402e295350e89fc18f60347060aee54f170afb04 100644 (file)
@@ -29,7 +29,7 @@
 #endif
 
 /* Prototypes */
-#ifndef AMIGA_CROSS
+#ifndef CROSS_TO_AMIGA
 #include "NH:sys/amiga/amiwind.p"
 #include "NH:sys/amiga/winami.p"
 #include "NH:sys/amiga/amidos.p"
index 64cdc2f0eaf525c3638a006f29a1721b0257a19a..8f6a74f64219b5d31f785af019a919a274e55ccf 100644 (file)
@@ -36,7 +36,7 @@
 #include <functions.h>
 #endif
 
-#ifndef AMIGA_CROSS
+#ifndef CROSS_TO_AMIGA
 #include "NH:sys/amiga/winami.p"
 #include "NH:sys/amiga/amiwind.p"
 #include "NH:sys/amiga/amidos.p"
index 9654fb5d99273fbaaa4c9e7c0ece2ea539f83f0a..456b727c9f723892905d44d0c47e860c095ada8b 100644 (file)
@@ -3,7 +3,7 @@
 /*    Copyright (c) Kenneth Lorber, Bethesda, Maryland 1993,1996  */
 /* NetHack may be freely redistributed.  See license for details. */
 
-#ifndef AMIGA_CROSS
+#ifndef CROSS_TO_AMIGA
 #include "NH:sys/amiga/windefs.h"
 #include "NH:sys/amiga/winext.h"
 #include "NH:sys/amiga/winproto.h"
@@ -26,7 +26,7 @@ static int BufferGetchar(void);
 static void ProcessMessage(register struct IntuiMessage *message);
 
 #define BufferQueueChar(ch) (KbdBuffer[KbdBuffered++] = (ch))
-#ifndef AMIGA_CROSS
+#ifndef CROSS_TO_AMIGA
 struct Library *ConsoleDevice;
 #else
 struct Device *
@@ -36,7 +36,7 @@ struct Device *
        ConsoleDevice;
 #endif
 
-#ifndef AMIGA_CROSS
+#ifndef CROSS_TO_AMIGA
 #include "NH:sys/amiga/amimenu.c"
 #else
 #include "amimenu.c"
index cf1d7537678f4595343ed3c2e5b342504db79faf..4762bc8a4985a601d3bbdd91f67f5c11918f6d28 100644 (file)
@@ -3,7 +3,7 @@
  */
 /* NetHack may be freely redistributed.  See license for details. */
 
-#ifndef AMIGA_CROSS
+#ifndef CROSS_TO_AMIGA
 #include "NH:sys/amiga/windefs.h"
 #include "NH:sys/amiga/winext.h"
 #include "NH:sys/amiga/winproto.h"
index 0a9bd29513ae9bd53dcb458498bd3a259e9af9ce..3e743fb3855884cd650166bc49ecc5c81e281fea 100644 (file)
@@ -3,7 +3,7 @@
  */
 /* NetHack may be freely redistributed.  See license for details. */
 
-#ifndef AMIGA_CROSS
+#ifndef CROSS_TO_AMIGA
 #include "NH:sys/amiga/windefs.h"
 #include "NH:sys/amiga/winext.h"
 #include "NH:sys/amiga/winproto.h"
@@ -15,7 +15,7 @@
 
 #include "dlb.h"
 
-#ifdef AMIGA_CROSS
+#ifdef CROSS_TO_AMIGA
 #define strnicmp strncmpi
 #endif
 
index 020b721edd8a245bb4e2d0536f0ea174b8ca9f8a..9fb0508dc69bf9d45cd373420af96e601f2bf41b 100644 (file)
 #ifdef TESTING
 #include "hack.h"
 #else
-#ifndef AMIGA_CROSS
+#ifndef CROSS_TO_AMIGA
 #include "NH:src/tile.c"
 #else
 #include "../src/tile.c"
 #endif
 #endif
 
-#ifndef AMIGA_CROSS
+#ifndef CROSS_TO_AMIGA
 #include "NH:win/share/tile.h"
 #include "NH:sys/amiga/windefs.h"
 #include "NH:sys/amiga/winext.h"
index 130d66cc9c3fbb6315f92ab39132771862a353f5..dfbae4312884fc01d5607fcd6b2daf139848e652 100644 (file)
@@ -3,7 +3,7 @@
  */
 /* NetHack may be freely redistributed.  See license for details. */
 
-#ifndef AMIGA_CROSS
+#ifndef CROSS_TO_AMIGA
 #include "NH:sys/amiga/windefs.h"
 #include "NH:sys/amiga/winext.h"
 #include "NH:sys/amiga/winproto.h"
@@ -17,7 +17,7 @@
 #include "date.h"
 
 extern struct TagItem scrntags[];
-#ifndef AMIGA_CROSS
+#ifndef CROSS_TO_AMIGA
 extern struct Library *ConsoleDevice;
 #else
 extern struct Device *
@@ -792,7 +792,7 @@ amii_create_nhwindow(type) register int type;
         }
 
        ConsoleDevice =
-#ifndef AMIGA_CROSS
+#ifndef CROSS_TO_AMIGA
                         (struct Library *)
 #else
                        (struct Device *
index 0964f05741afa0f1c505244db25c85aba7bd61df..9534c0c6d685852a4bd0a808b2dc548ec49b9ad7 100644 (file)
@@ -2,7 +2,7 @@
 /* Copyright (c) Gregg Wonderly, Naperville, Illinois,  1991,1992,1993. */
 /* NetHack may be freely redistributed.  See license for details. */
 
-#ifndef AMIGA_CROSS
+#ifndef CROSS_TO_AMIGA
 #include "NH:sys/amiga/windefs.h"
 #include "NH:sys/amiga/winext.h"
 #include "NH:sys/amiga/winproto.h"
index fecf2b4cec77e6ab629d4072264699a5e485ef26..af4c303de0d6b76f0ad72a51bd049b97b6b66aa9 100644 (file)
@@ -2,7 +2,7 @@
 /* Copyright (c) Gregg Wonderly, Naperville, Illinois,  1991,1992,1993. */
 /* NetHack may be freely redistributed.  See license for details. */
 
-#ifndef AMIGA_CROSS
+#ifndef CROSS_TO_AMIGA
 #include "NH:sys/amiga/windefs.h"
 #include "NH:sys/amiga/winext.h"
 #include "NH:sys/amiga/winproto.h"
@@ -45,7 +45,7 @@ struct NewWindow StrWindow = {
     &String, NULL, NULL, NULL, NULL, 5, 5, 0xffff, 0xffff, CUSTOMSCREEN
 };
 
-#ifndef AMIGA_CROSS
+#ifndef CROSS_TO_AMIGA
 #include "NH:sys/amiga/colorwin.c"
 #else
 #include "colorwin.c"
@@ -58,7 +58,7 @@ struct NewWindow StrWindow = {
 #define GADOKAY 6
 #define GADCANCEL 7
 
-#ifndef AMIGA_CROSS
+#ifndef CROSS_TO_AMIGA
 #include "NH:sys/amiga/clipwin.c"
 #else
 #include "clipwin.c"
index d74e566a0674b51573779c5422374217e2400e0c..cbca9ba4b7eaf08f5a58308a26025c46544e24e1 100644 (file)
@@ -2,7 +2,7 @@
 /* Copyright (c) Gregg Wonderly, Naperville, Illinois,  1991,1992,1993. */
 /* NetHack may be freely redistributed.  See license for details. */
 
-#ifndef AMIGA_CROSS
+#ifndef CROSS_TO_AMIGA
 #include "NH:sys/amiga/windefs.h"
 #include "NH:sys/amiga/winext.h"
 #include "NH:sys/amiga/winproto.h"
index 633c1f13ab1b297f19a4875aac20d5503664e7fa..2367c84ea296399d782d777f9fd9d3b3cf79a066 100644 (file)
@@ -754,7 +754,7 @@ char *str;
 }
 #endif /* EXEPATH */
 
-#ifdef AMIGA_CROSS
+#ifdef CROSS_TO_AMIGA
 void msmsg
 VA_DECL(const char *, fmt)
 {
index c027827c46fc2759c2ca1dab2e5b797b65bb5f1c..af30e4423bd2015f9d1b656a2ab2aa34cd128743 100644 (file)
 
 #include <ctype.h>
 #include <fcntl.h>
-#if !defined(MSDOS) && !defined(WIN_CE) && !defined(AMIGA_CROSS)
+#if !defined(MSDOS) && !defined(WIN_CE) && !defined(CROSS_TO_AMIGA)
 #include <process.h>
 #endif
-#if defined(__GO32__) || defined(AMIGA_CROSS)
+#if defined(__GO32__) || defined(CROSS_TO_AMIGA)
 #define P_WAIT 0
 #define P_NOWAIT 1
 #endif
@@ -154,7 +154,7 @@ const char *str;
 #ifdef TOS
     msmsg("Hit <Return> %s.", str);
 #else
-#ifdef AMIGA_CROSS
+#ifdef CROSS_TO_AMIGA
     (void) printf("Hit <Enter> %s.", str);
 #else
     msmsg("Hit <Enter> %s.", str);
index c9bc0a51f91d239def51a852bee22e233d34e8e4..ec87da241d37164cef9dcc7846aaf28589489c5b 100644 (file)
@@ -163,7 +163,7 @@ override TARGET_AR = $(TOOLTOP1)/i586-pc-msdosdjgpp-gcc-ar
 override TARGET_STUBEDIT = ../lib/djgpp/i586-pc-msdosdjgpp/bin/stubedit
 override TARGET_CFLAGS = -c -O -I../include -I../sys/msdos -I../win/share \
        $(LUAINCL) -DDLB $(PDCURSESDEF) \
-       -DUSE_TILES -DCROSSCOMPILE -DCROSSCOMPILE_TARGET
+       -DUSE_TILES -DCROSSCOMPILE -DCROSSCOMPILE_TARGET -DCROSS_TO_MSDOS
 override TARGET_CXXFLAGS = $(TARGET_CFLAGS)
 override TARGET_LINK = $(TOOLTOP1)/i586-pc-msdosdjgpp-gcc
 override TARGET_LFLAGS=
@@ -235,9 +235,9 @@ override TARGET_STUBEDIT=
 override TARGET_CFLAGS = -c -O $(TOOLARCH) \
        -I../include -I../outdated/include \
        -I../outdated/sys/amiga -I../win/share \
-       $(LUAINCL) -DAMIGA -DAMIGA_CROSS $(PDCURSESDEF) \
-       -DUSE_TILES -DCROSSCOMPILE -DCROSSCOMPILE_TARGET \
-       -DAMIGA_VERSION_STRING=\""VER: NetHack 3.7.0 \(12.13.2020)\""
+       $(LUAINCL) -DAMIGA -DUSE_TILES $(PDCURSESDEF) \
+       -DCROSSCOMPILE -DCROSSCOMPILE_TARGET -DCROSS_TO_AMIGA \
+       -DAMIGA_VERSION_STRING=\""VER: NetHack 3.7.0\""
 override TARGET_CXXFLAGS = $(TARGET_CFLAGS)
 ifeq "$(REGEXOBJ)" "$(TARGETPFX)cppregex.o"
 override TARGET_LINK = $(TARGET_CXX)