PROGNAME = rln
LIBS =
+# Figure out which system we're compiling for, and set the appropriate variables
+
+OSTYPE := $(shell uname -a)
+
+ifeq "$(findstring Msys,$(OSTYPE))" "Msys" # Win32
+
+OSDEFINE := WIN32
+
+else # ???
+
+OSDEFINE := __GCCUNIX__
+
+endif
+
+
# Change this to -DWIN32 for Windows :-)
-CFLAGS = -g -I. -D__GCCUNIX__
+#CFLAGS = -g -I. -D__GCCUNIX__
#CFLAGS = -g -I. -DWIN32
+CFLAGS = -g -I. -D$(OSDEFINE)
SRCS = rln.c
// Reached maximum file handles
if (hd == NHANDLES)
{
- if (flush_handles()) return 1;
+ if (flush_handles())
+ return 1;
}
// Attempt to open input file
unsigned symtype = 0;
fsize = FSIZE(handle); // Get size of include file
- dsize = (fsize+secalign) & ~secalign; // Round up to a alignment boundary
+ dsize = (fsize + secalign) & ~secalign; // Round up to a alignment boundary
sym1len = strlen(sym1) + 1; // Get sym1 length + null termination
sym2len = strlen(sym2) + 1; // Get sym2 length + null termination
}
// Read in binary data
- if (read(handle, ptr+32, fsize) != fsize)
+ if (read(handle, ptr + 32, fsize) != fsize)
{
printf("File read error on %s\n", fname);
close(handle);