Made linux-dependent-code unix-dependent
!Checks for _LINUX_ being defined are not checks for _WIN32 being not defined !Makefile does not touch /usr/bin anymore
This commit is contained in:
parent
35f15eb06c
commit
89c01b98f0
2 changed files with 5 additions and 4 deletions
4
Makefile
4
Makefile
|
@ -21,9 +21,9 @@ $(EXECUTABLE): $(OBJECTS)
|
||||||
.c.o:
|
.c.o:
|
||||||
$(CC) -c $(CFLAGS) $< -o $@
|
$(CC) -c $(CFLAGS) $< -o $@
|
||||||
install:
|
install:
|
||||||
cp -v $(EXECUTABLE) /usr/bin
|
cp -v $(EXECUTABLE) /usr/local/bin
|
||||||
#FIXME It ALWAYS copies dispel to /usr/bin, regardless of OS
|
#FIXME It ALWAYS copies dispel to /usr/bin, regardless of OS
|
||||||
uninstall:
|
uninstall:
|
||||||
rm -rf /usr/bin/$(EXECUTABLE)
|
rm -rf /usr/local/bin/$(EXECUTABLE)
|
||||||
clean:
|
clean:
|
||||||
rm *.o ${EXECUTABLE}
|
rm *.o ${EXECUTABLE}
|
||||||
|
|
5
main.c
5
main.c
|
@ -11,7 +11,7 @@
|
||||||
#ifdef __APPLE__
|
#ifdef __APPLE__
|
||||||
#include <sys/uio.h>
|
#include <sys/uio.h>
|
||||||
#else
|
#else
|
||||||
#ifdef __linux__
|
#ifndef _WIN32
|
||||||
#include <sys/io.h>
|
#include <sys/io.h>
|
||||||
#else
|
#else
|
||||||
#include <io.h>
|
#include <io.h>
|
||||||
|
@ -279,7 +279,7 @@ int main(int argc, char *argv[])
|
||||||
}
|
}
|
||||||
|
|
||||||
// Read the file into memory
|
// Read the file into memory
|
||||||
#if defined(__APPLE__) || defined(__linux__)
|
#if !defined(_WIN32)
|
||||||
fseek(fin, 0L, SEEK_END); //Apple and linux code
|
fseek(fin, 0L, SEEK_END); //Apple and linux code
|
||||||
len = ftell(fin);
|
len = ftell(fin);
|
||||||
fseek(fin, 0L, SEEK_SET);
|
fseek(fin, 0L, SEEK_SET);
|
||||||
|
@ -328,6 +328,7 @@ int main(int argc, char *argv[])
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Unmangle the address options
|
// Unmangle the address options
|
||||||
|
|
||||||
pos = start;
|
pos = start;
|
||||||
|
|
Loading…
Reference in a new issue