linux will compile again. O_BINARY does only exist in the windows world.

master
Steffen Pohle 2 years ago
parent 5c05d1b7f9
commit bc11438ee3

1
.gitignore vendored

@ -8,4 +8,5 @@ simpleskycam
*~
U2SM200C-AST_Cfg_A.bin
U2SM200C-AST_Cfg_SAVE.bin
gmon.out

@ -7,7 +7,7 @@
VERSION = 0.0.1
APP = simpleskycam
include Makefile.config
-include Makefile.config
-include Makefile.rules
OBJECTS := $(OBJECTS) gui.oo main.oo error.oo debug.oo \
@ -47,15 +47,24 @@ endif
ifeq ($(TARGET),)
noconfig: configlinux help
noconfig: defaultconfig help
endif
all: Makefile.rules $(TARGET)
defaultconfig:
ifeq ($(MAKEFILE_CONFIG),)
echo "MAKEFILE_CONFIG = 1" > Makefile.config
echo "" >> Makefile.config
echo "USE_SVBONY = 1" >> Makefile.config
echo "USE_DNG = 1" >> Makefile.config
echo "USE_SER = 1" >> Makefile.config
echo "" >> Makefile.config
echo "DEBUG_ANGLES = 0" >> Makefile.config
echo "DEBUG_POSCTL = 0" >> Makefile.config
endif
help:
echo "set up configuration"
echo " make configlinux to generate the linix build"
@ -148,6 +157,9 @@ $(TARGET): $(OBJECTS)
.cc.oo : $(INCLUDES)
$(CPP) -o $@ -c $(CPPFLAGS) $<
cleanall: clean
rm -rf Makefile.config
clean:
rm -f *.o *.oo *.c~ *.h~ *.cc~ *.ui~ $(APP) Makefile~
rm -rf config.h
@ -159,7 +171,7 @@ clean:
rm -rf U2SM200C-AST_Cfg_SAVE.bin
rm -rf SimpleSkyCam-$(VERSION)
dist: clean
dist: cleanall
rm -rf $(DISTNAME)
mkdir $(DISTNAME)
cp Makefile* $(DISTNAME)

@ -1,12 +0,0 @@
#
# configurations should be made in here.
# set one of these variables to 0 to disable the function.
#
USE_SVBONY = 1
USE_DNG = 1
USE_SER = 1
DEBUG_ANGLES = 0
DEBUG_POSCTL = 0

@ -121,7 +121,11 @@ int VideoDev_Dumpfile::Open() {
}
filesize = s.st_size;
#ifdef BUILD_WINDOWS
if ((fd = open(fname.c_str(), O_RDONLY | O_BINARY)) == -1) {
#else
if ((fd = open(fname.c_str(), O_RDONLY)) == -1) {
#endif
printf ("%s:%d could not open file '%s' error:%s\n", __FILE__, __LINE__, fname.c_str(), strerror(errno));
return VDEV_STATUS_ERROR;
}

Loading…
Cancel
Save