Am Wed, 12 Oct 2022 16:50:40 -0400 schrieb Paul Smith <psm...@gnu.org>:
> On Wed, 2022-10-12 at 22:18 +0200, Juan Manuel Guerrero wrote: > > Here is a small patch to get the current make code compiled and > > running on MSDOS/FreeDOS using DJGPP. I assume that for such minor > > changes no paper work is required. > > Correct. But, note that the FSF considers contributions cumulative, so > over time if the contributions add up to more significant changes, > paperwork would be needed. > > > Thank you for keep the DJGPP specific code available. > > Thanks for the patch Juan! Sorry, I have noted that the patch has been malformed by the mail program so I submit the same a second time. Excuse the inconveniences. 2022-10-12 Juan M. Guerrero <juan.guerr...@gmx.de> * builddos.bat: Changes required to support building with DJGPP 2.05. * src/configh.dos.template: Changes required to support building with DJGPP 2.05. diff --git a/builddos.bat b/builddos.bat index d4ff8a63..d54953e9 100644 --- a/builddos.bat +++ b/builddos.bat @@ -49,14 +49,14 @@ gcc -c -I./src -I%XSRC%/src -I./lib -I%XSRC%/lib -DHAVE_CONFIG_H -O2 -g %XSRC%/s gcc -c -I./src -I%XSRC%/src -I./lib -I%XSRC%/lib -DHAVE_CONFIG_H -O2 -g %XSRC%/src/dir.c -o dir.o gcc -c -I./src -I%XSRC%/src -I./lib -I%XSRC%/lib -DHAVE_CONFIG_H -O2 -g %XSRC%/src/file.c -o file.o gcc -c -I./src -I%XSRC%/src -I./lib -I%XSRC%/lib -DHAVE_CONFIG_H -O2 -g %XSRC%/src/misc.c -o misc.o -gcc -c -I./src -I%XSRC%/src -I./lib -I%XSRC%/lib -DHAVE_CONFIG_H -O2 -g %XSRC%/src/main.c -o main.o -gcc -c -I./src -I%XSRC%/src -I./lib -I%XSRC%/lib -DHAVE_CONFIG_H -DINCLUDEDIR=\"c:/djgpp/include\" -O2 -g %XSRC%/src/read.c -o read.o -gcc -c -I./src -I%XSRC%/src -I./lib -I%XSRC%/lib -DHAVE_CONFIG_H -DLIBDIR=\"c:/djgpp/lib\" -O2 -g %XSRC%/src/remake.c -o remake.o +gcc -c -I./src -I%XSRC%/src -I./lib -I%XSRC%/lib -DHAVE_CONFIG_H -DLOCALEDIR=\"/dev/env/DJDIR/share/locale\" -O2 -g %XSRC%/src/main.c -o main.o +gcc -c -I./src -I%XSRC%/src -I./lib -I%XSRC%/lib -DHAVE_CONFIG_H -DINCLUDEDIR=\"/dev/env/DJDIR/include\" -O2 -g %XSRC%/src/read.c -o read.o +gcc -c -I./src -I%XSRC%/src -I./lib -I%XSRC%/lib -DHAVE_CONFIG_H -DLIBDIR=\"/dev/env/DJDIR/lib\" -O2 -g %XSRC%/src/remake.c -o remake.o gcc -c -I./src -I%XSRC%/src -I./lib -I%XSRC%/lib -DHAVE_CONFIG_H -O2 -g %XSRC%/src/rule.c -o rule.o gcc -c -I./src -I%XSRC%/src -I./lib -I%XSRC%/lib -DHAVE_CONFIG_H -O2 -g %XSRC%/src/implicit.c -o implicit.o gcc -c -I./src -I%XSRC%/src -I./lib -I%XSRC%/lib -DHAVE_CONFIG_H -O2 -g %XSRC%/src/default.c -o default.o gcc -c -I./src -I%XSRC%/src -I./lib -I%XSRC%/lib -DHAVE_CONFIG_H -O2 -g %XSRC%/src/variable.c -o variable.o -gcc -c -I./src -I%XSRC%/src -I./lib -I%XSRC%/lib -DHAVE_CONFIG_H -O2 -g %XSRC%/src/expand.c -o eyxpand.o +gcc -c -I./src -I%XSRC%/src -I./lib -I%XSRC%/lib -DHAVE_CONFIG_H -O2 -g %XSRC%/src/expand.c -o expand.o gcc -c -I./src -I%XSRC%/src -I./lib -I%XSRC%/lib -DHAVE_CONFIG_H -O2 -g %XSRC%/src/function.c -o function.o gcc -c -I./src -I%XSRC%/src -I./lib -I%XSRC%/lib -DHAVE_CONFIG_H -O2 -g %XSRC%/src/vpath.c -o vpath.o gcc -c -I./src -I%XSRC%/src -I./lib -I%XSRC%/lib -DHAVE_CONFIG_H -O2 -g %XSRC%/src/hash.c -o hash.o @@ -69,15 +69,16 @@ gcc -c -I./src -I%XSRC%/src -I./lib -I%XSRC%/lib -DHAVE_CONFIG_H -O2 -g %XSRC%/s gcc -c -I./src -I%XSRC%/src -I./lib -I%XSRC%/lib -DHAVE_CONFIG_H -O2 -g %XSRC%/src/getopt.c -o getopt.o gcc -c -I./src -I%XSRC%/src -I./lib -I%XSRC%/lib -DHAVE_CONFIG_H -O2 -g %XSRC%/src/getopt1.c -o getopt1.o gcc -c -I./src -I%XSRC%/src -I./lib -I%XSRC%/lib -DHAVE_CONFIG_H -O2 -g %XSRC%/src/shuffle.c -o shuffle.o +gcc -c -I./src -I%XSRC%/src -I./lib -I%XSRC%/lib -DHAVE_CONFIG_H -O2 -g %XSRC%/src/load.c -o load.o gcc -c -I./src -I%XSRC%/src -I./lib -I%XSRC%/lib -DHAVE_CONFIG_H -O2 -g %XSRC%/lib/glob.c -o lib/glob.o gcc -c -I./src -I%XSRC%/src -I./lib -I%XSRC%/lib -DHAVE_CONFIG_H -O2 -g %XSRC%/lib/fnmatch.c -o lib/fnmatch.o @echo off echo commands.o > respf.$$$ -for %%f in (job output dir file misc main read remake rule implicit default variable) do echo %%f.o >> respf.$$$ +for %%f in (job output dir file misc main read remake rule implicit default variable load) do echo %%f.o >> respf.$$$ for %%f in (expand function vpath hash strcache version ar arscan signame remote-stub getopt getopt1 shuffle) do echo %%f.o >> respf.$$$ for %%f in (lib\glob lib\fnmatch) do echo %%f.o >> respf.$$$ -rem gcc -c -I./src -I%XSRC% -I./lib -I%XSRC%/lib -DHAVE_CONFIG_H -O2 -g %XSRC%/guile.c -o guile.o -rem echo guile.o >> respf.$$$ +gcc -c -I./src -I%XSRC%/src -I./lib -I%XSRC%/lib -DHAVE_CONFIG_H -O2 -g %XSRC%/src/guile.c -o guile.o +echo guile.o >> respf.$$$ @echo Linking... @echo on gcc -o make.exe @respf.$$$ @@ -85,7 +86,7 @@ gcc -o make.exe @respf.$$$ if not exist make.exe echo Make.exe build failed... if exist make.exe echo make.exe is now built! if exist make.exe del respf.$$$ -if exist make.exe copy /Y Basic.mk Makefile +if exist make.exe copy /Y %XSRC%\Basic.mk Makefile goto End :SmallEnv diff --git a/src/configh.dos.template b/src/configh.dos.template index 3f0f6e0a..8e1466b2 100644 --- a/src/configh.dos.template +++ b/src/configh.dos.template @@ -97,7 +97,7 @@ this program. If not, see <http://www.gnu.org/licenses/>. */ #define PACKAGE_VERSION "%VERSION%" /* Output sync support */ -#define NO_OUTPUT_SYNC +#define NO_OUTPUT_SYNC 1 /* Version number of package */ #define VERSION "%VERSION%" @@ -116,8 +116,13 @@ this program. If not, see <http://www.gnu.org/licenses/>. */ #define intmax_t long long /* Define to `int' if <sys/types.h> does not define. */ +#if __DJGPP__ == 2 && __DJGPP_MINOR__ < 5 #define ssize_t int +#endif /* Define to 'unsigned long' or 'unsigned long long' if <inttypes.h> doesn't define. */ #define uintmax_t unsigned long long + +/* Define to 1 if you have the `strtoll' function. */ +#define HAVE_STRTOLL 1