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:
|
||||
$(CC) -c $(CFLAGS) $< -o $@
|
||||
install:
|
||||
cp -v $(EXECUTABLE) /usr/bin
|
||||
cp -v $(EXECUTABLE) /usr/local/bin
|
||||
#FIXME It ALWAYS copies dispel to /usr/bin, regardless of OS
|
||||
uninstall:
|
||||
rm -rf /usr/bin/$(EXECUTABLE)
|
||||
rm -rf /usr/local/bin/$(EXECUTABLE)
|
||||
clean:
|
||||
rm *.o ${EXECUTABLE}
|
||||
|
|
5
main.c
5
main.c
|
@ -11,7 +11,7 @@
|
|||
#ifdef __APPLE__
|
||||
#include <sys/uio.h>
|
||||
#else
|
||||
#ifdef __linux__
|
||||
#ifndef _WIN32
|
||||
#include <sys/io.h>
|
||||
#else
|
||||
#include <io.h>
|
||||
|
@ -279,7 +279,7 @@ int main(int argc, char *argv[])
|
|||
}
|
||||
|
||||
// Read the file into memory
|
||||
#if defined(__APPLE__) || defined(__linux__)
|
||||
#if !defined(_WIN32)
|
||||
fseek(fin, 0L, SEEK_END); //Apple and linux code
|
||||
len = ftell(fin);
|
||||
fseek(fin, 0L, SEEK_SET);
|
||||
|
@ -328,6 +328,7 @@ int main(int argc, char *argv[])
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
// Unmangle the address options
|
||||
|
||||
pos = start;
|
||||
|
|
Loading…
Reference in a new issue