From 7cb5c53f162ca70480d98147962772ffbf171c18 Mon Sep 17 00:00:00 2001 From: sezero Date: Wed, 21 Dec 2016 01:25:21 +0300 Subject: [PATCH 1/3] made os2 makefile to work both under native os/2 and under linux cross-compiler environments. --- os2/Makefile.os2 | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/os2/Makefile.os2 b/os2/Makefile.os2 index 05ba15d..b135911 100644 --- a/os2/Makefile.os2 +++ b/os2/Makefile.os2 @@ -3,10 +3,15 @@ # wmake -f Makefile.os2 CC=wcc386 -INCLUDES=-I..\os2 -I..\src CPPFLAGS=-DHAVE_SIGNAL_H -DHAVE_SYS_TIME_H CPPFLAGS+= -DSOUND_OS2DART +!ifndef __UNIX__ CPPFLAGS+= -DVERSION="4.2.0" +INCLUDES=-I..\os2 -I..\src +!else +CPPFLAGS+= -DVERSION=\"4.2.0\" +INCLUDES=-I../os2 -I../src +!endif # for an exe using libxmp.dll: link to libxmp.lib # for a statically linked exe: link to xmp_static.lib LIBS=libxmp.lib mmpm2.lib @@ -29,9 +34,19 @@ all: $(AOUT) $(AOUT): $(OBJ) wlink N $(AOUT) SYS OS2V2 LIBR {$(LIBS)} F {$(OBJ)} -clean: - FOR %F IN ( $(AOUT) $(OBJ) $(EXTRA_OBJ) ) DO IF EXIST %F ERASE %F - -.c: ..\src .c.obj: $(COMPILE) -fo=$^@ $< + +!ifndef __UNIX__ +.c: ..\src +distclean: clean .symbolic + @if exist $(AOUT) del $(AOUT) +clean: .symbolic + @if exist *.obj del *.obj +!else +.c: ../src +distclean: clean .symbolic + rm -f $(AOUT) +clean: .symbolic + rm -f *.obj +!endif From bc9f2d28fb2f24ae7780c2864ef917d1451e16c5 Mon Sep 17 00:00:00 2001 From: sezero Date: Wed, 21 Dec 2016 01:28:26 +0300 Subject: [PATCH 2/3] sound_dart.c: removed unused char *token; was possibly a remnant from times when those parm??? macros weren't introduced. --- src/sound_dart.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/sound_dart.c b/src/sound_dart.c index 6bb6e26..6deb703 100644 --- a/src/sound_dart.c +++ b/src/sound_dart.c @@ -76,7 +76,6 @@ static int init(struct options *options) int flags; int i; MCI_AMP_OPEN_PARMS AmpOpenParms; - char *token; parm_init(parm); chkparm1("sharing", sharing = *token); From d8cf55086ed09446ac009164a638f2d39e431602 Mon Sep 17 00:00:00 2001 From: sezero Date: Wed, 21 Dec 2016 01:29:22 +0300 Subject: [PATCH 3/3] minor correction to os/2 usleep() --- os2/usleep.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/os2/usleep.c b/os2/usleep.c index f0e8a2b..0947c1e 100644 --- a/os2/usleep.c +++ b/os2/usleep.c @@ -2,5 +2,5 @@ #include void usleep (unsigned long usec) { - DosSleep(usec ? (usec/1000l) : 1l); + DosSleep((usec >= 1000)? (usec / 1000) : 1); }