Skip to content

add FreeBSD, NetBSD and OpenBSD support #173

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion build.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

set -e

Expand Down
2 changes: 1 addition & 1 deletion mkfiles/gcc.mak
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ CFLAGS1 = -Os -Wall -Werror -Wno-pointer-to-int-cast -Wno-incompatible-pointer-t
.SUFFIXES: .c .asm .com .exe .obj
ifeq ($(UTILS_BUILD),1)
.c.exe:
gcc -x c -Og -g -Wall -DGCC -D__GETOPT_H -I../suppl $< -o $@
gcc -x c -Og -g -Wall -DTARGET_USE_GCC_IA16 -D__GETOPT_H -I../suppl $< -o $@
else ifeq ($(COMPACT_MODEL),1)
.c.obj .c.exe:
@echo ------------------------------------------------------
Expand Down
8 changes: 7 additions & 1 deletion mkfiles/watcom.mak
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,13 @@ CFLAGS1 = -os-s-wx
$(CL) -ms -I$(WATCOM)$(DIRSEP)h $< -fm -fe=$@ -I..$(DIRSEP)suppl
! endif
! else ifdef __OSX__
clang -x c -Og -g -Wall -Wno-pragma-pack -DGCC -D__GETOPT_H -I../suppl $< -o $@
clang -x c -Og -g -Wall -Wno-pragma-pack -D__GETOPT_H -I../suppl $< -o $@
! else ifdef __FREEBSD__
clang -x c -Og -g -Wall -Wno-pragma-pack -D__GETOPT_H -I../suppl $< -o $@
! else ifdef __OPENBSD__
clang -x c -Og -g -Wall -Wno-pragma-pack -D__GETOPT_H -I../suppl $< -o $@
! else ifdef __NETBSD__
gcc -x c -Og -g -Wall -Wno-pragma-pack -D__GETOPT_H -I../suppl $< -o $@
! else
$(CL386) -I$(WATCOM)$(DIRSEP)h $< -fm -fe=$@ -I..$(DIRSEP)suppl
! endif
Expand Down
6 changes: 3 additions & 3 deletions tools/ptchsize.c
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ int main(int argc, char **argv)
}

if(argc == 2
#ifndef GCC
#ifndef TARGET_USE_GCC_IA16
|| ival.heapPos == ~0
#endif
) {
Expand Down Expand Up @@ -275,7 +275,7 @@ int main(int argc, char **argv)
, argv[1], tosize);
/* Watcom already has extraMin minimal and dynamically adjusts its MCB*/
if(tosize) {
#ifdef GCC
#ifdef TARGET_USE_GCC_IA16
/* need to adjust SP */
unsigned startbss = 0x10000 - exe.extraMax * 16;
exe.fSP = startbss + ival.extraSpace * 16 + tosize;
Expand All @@ -293,7 +293,7 @@ int main(int argc, char **argv)
return 77;
}

#ifndef GCC
#ifndef TARGET_USE_GCC_IA16
if(fseek(freecom, ival.heapPos, SEEK_SET) != 0) {
printf("Failed to seek to heap size offset in %s\n", argv[1]);
return 42;
Expand Down
2 changes: 1 addition & 1 deletion utils/mkinfres.c
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ int addImageDisplacement(const char * const fnam
*extraSpace += (stacksize+15)/16;
}
fclose(f);
#ifdef GCC
#ifdef TARGET_USE_GCC_IA16
stacksize = 4*1024;
*extraSpace += stacksize / 16;
#else
Expand Down