diff --git a/Makefile b/Makefile index 70ec0dd..c7fb974 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -CC = gcc +CC = cc VERSION = 1.2.1 CFLAGS = -g -O2 LIBS = -lz diff --git a/config.log b/config.log index 257be9b..a453980 100644 --- a/config.log +++ b/config.log @@ -10,33 +10,31 @@ generated by GNU Autoconf 2.69. Invocation command line was ## Platform. ## ## --------- ## -hostname = openbsd.colum.site +hostname = freebsd uname -m = i386 -uname -r = 5.9 -uname -s = OpenBSD -uname -v = GENERIC#1561 +uname -r = 10.3-RELEASE +uname -s = FreeBSD +uname -v = FreeBSD 10.3-RELEASE #0 r297264: Fri Mar 25 03:51:29 UTC 2016 root@releng1.nyi.freebsd.org:/usr/obj/usr/src/sys/GENERIC /usr/bin/uname -p = i386 /bin/uname -X = unknown /bin/arch = unknown -/usr/bin/arch -k = OpenBSD.i386 +/usr/bin/arch -k = unknown /usr/convex/getsysinfo = unknown /usr/bin/hostinfo = unknown /bin/machine = unknown /usr/bin/oslevel = unknown /bin/universe = unknown -PATH: /home/colum/bin -PATH: /bin PATH: /sbin -PATH: /usr/bin +PATH: /bin PATH: /usr/sbin -PATH: /usr/X11R6/bin -PATH: /usr/local/bin -PATH: /usr/local/sbin +PATH: /usr/bin PATH: /usr/games -PATH: . +PATH: /usr/local/sbin +PATH: /usr/local/bin +PATH: /root/bin ## ----------- ## @@ -44,60 +42,60 @@ PATH: . ## ----------- ## configure:1958: checking for gcc -configure:1974: found /usr/bin/gcc -configure:1985: result: gcc +configure:1988: result: no +configure:2051: checking for cc +configure:2072: found /usr/bin/cc +configure:2095: result: cc configure:2214: checking for C compiler version -configure:2223: gcc --version >&5 -gcc (GCC) 4.2.1 20070719 -Copyright (C) 2007 Free Software Foundation, Inc. -This is free software; see the source for copying conditions. There is NO -warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - +configure:2223: cc --version >&5 +FreeBSD clang version 3.4.1 (tags/RELEASE_34/dot1-final 208032) 20140512 +Target: i386-unknown-freebsd10.3 +Thread model: posix configure:2234: $? = 0 -configure:2223: gcc -v >&5 -Reading specs from /usr/lib/gcc-lib/i386-unknown-openbsd5.9/4.2.1/specs -Target: i386-unknown-openbsd5.9 -Configured with: OpenBSD/i386 system compiler +configure:2223: cc -v >&5 +FreeBSD clang version 3.4.1 (tags/RELEASE_34/dot1-final 208032) 20140512 +Target: i386-unknown-freebsd10.3 Thread model: posix -gcc version 4.2.1 20070719 +Selected GCC installation: configure:2234: $? = 0 -configure:2223: gcc -V >&5 -gcc: '-V' option must have argument +configure:2223: cc -V >&5 +cc: error: argument to '-V' is missing (expected 1 value) +cc: error: no input files configure:2234: $? = 1 -configure:2223: gcc -qversion >&5 -gcc: unrecognized option '-qversion' -gcc: no input files +configure:2223: cc -qversion >&5 +cc: error: unknown argument: '-qversion' +cc: error: no input files configure:2234: $? = 1 configure:2254: checking whether the C compiler works -configure:2276: gcc conftest.c >&5 +configure:2276: cc conftest.c >&5 configure:2280: $? = 0 configure:2328: result: yes configure:2331: checking for C compiler default output file name configure:2333: result: a.out configure:2339: checking for suffix of executables -configure:2346: gcc -o conftest conftest.c >&5 +configure:2346: cc -o conftest conftest.c >&5 configure:2350: $? = 0 configure:2372: result: configure:2394: checking whether we are cross compiling -configure:2402: gcc -o conftest conftest.c >&5 +configure:2402: cc -o conftest conftest.c >&5 configure:2406: $? = 0 configure:2413: ./conftest configure:2417: $? = 0 configure:2432: result: no configure:2437: checking for suffix of object files -configure:2459: gcc -c conftest.c >&5 +configure:2459: cc -c conftest.c >&5 configure:2463: $? = 0 configure:2484: result: o configure:2488: checking whether we are using the GNU C compiler -configure:2507: gcc -c conftest.c >&5 +configure:2507: cc -c conftest.c >&5 configure:2507: $? = 0 configure:2516: result: yes -configure:2525: checking whether gcc accepts -g -configure:2545: gcc -c -g conftest.c >&5 +configure:2525: checking whether cc accepts -g +configure:2545: cc -c -g conftest.c >&5 configure:2545: $? = 0 configure:2586: result: yes -configure:2603: checking for gcc option to accept ISO C89 -configure:2666: gcc -c -g -O2 conftest.c >&5 +configure:2603: checking for cc option to accept ISO C89 +configure:2666: cc -c -g -O2 conftest.c >&5 configure:2666: $? = 0 configure:2679: result: none needed configure:2705: checking whether make sets $(MAKE) @@ -105,10 +103,13 @@ configure:2727: result: yes configure:2750: checking for a BSD-compatible install configure:2818: result: /usr/bin/install -c configure:2835: checking how to run the C preprocessor -configure:2866: gcc -E conftest.c +configure:2866: cc -E conftest.c configure:2866: $? = 0 -configure:2880: gcc -E conftest.c -conftest.c:9:28: error: ac_nonexistent.h: No such file or directory +configure:2880: cc -E conftest.c +conftest.c:9:10: fatal error: 'ac_nonexistent.h' file not found +#include + ^ +1 error generated. configure:2880: $? = 1 configure: failed program was: | /* confdefs.h */ @@ -120,11 +121,14 @@ configure: failed program was: | #define PACKAGE_URL "" | /* end confdefs.h. */ | #include -configure:2905: result: gcc -E -configure:2925: gcc -E conftest.c +configure:2905: result: cc -E +configure:2925: cc -E conftest.c configure:2925: $? = 0 -configure:2939: gcc -E conftest.c -conftest.c:9:28: error: ac_nonexistent.h: No such file or directory +configure:2939: cc -E conftest.c +conftest.c:9:10: fatal error: 'ac_nonexistent.h' file not found +#include + ^ +1 error generated. configure:2939: $? = 1 configure: failed program was: | /* confdefs.h */ @@ -141,15 +145,15 @@ configure:3026: result: /usr/bin/grep configure:3031: checking for egrep configure:3093: result: /usr/bin/grep -E configure:3098: checking for ANSI C header files -configure:3118: gcc -c -g -O2 conftest.c >&5 +configure:3118: cc -c -g -O2 conftest.c >&5 configure:3118: $? = 0 -configure:3191: gcc -o conftest -g -O2 conftest.c >&5 +configure:3191: cc -o conftest -g -O2 conftest.c >&5 configure:3191: $? = 0 configure:3191: ./conftest configure:3191: $? = 0 configure:3202: result: yes configure:3211: checking for deflate in -lz -configure:3236: gcc -o conftest -g -O2 conftest.c -lz >&5 +configure:3236: cc -o conftest -g -O2 conftest.c -lz >&5 configure:3236: $? = 0 configure:3245: result: yes configure:3527: creating ./config.status @@ -167,10 +171,10 @@ generated by GNU Autoconf 2.69. Invocation command line was CONFIG_COMMANDS = $ ./config.status -on openbsd.colum.site +on freebsd config.status:729: creating Makefile -configure:4604: === configuring in libUseful-2.4 (/home/colum/Movgrab/libUseful-2.4) +configure:4604: === configuring in libUseful-2.4 (/root/Movgrab/libUseful-2.4) configure:4667: running /bin/sh ./configure --disable-option-checking '--prefix=/usr/local' --cache-file=/dev/null --srcdir=. ## ---------------- ## @@ -178,33 +182,33 @@ configure:4667: running /bin/sh ./configure --disable-option-checking '--prefix= ## ---------------- ## ac_cv_c_compiler_gnu=yes -ac_cv_env_CC_set= -ac_cv_env_CC_value= -ac_cv_env_CFLAGS_set= -ac_cv_env_CFLAGS_value= -ac_cv_env_CPPFLAGS_set= -ac_cv_env_CPPFLAGS_value= -ac_cv_env_CPP_set= -ac_cv_env_CPP_value= -ac_cv_env_LDFLAGS_set= -ac_cv_env_LDFLAGS_value= -ac_cv_env_LIBS_set= -ac_cv_env_LIBS_value= -ac_cv_env_build_alias_set= -ac_cv_env_build_alias_value= -ac_cv_env_host_alias_set= -ac_cv_env_host_alias_value= -ac_cv_env_target_alias_set= -ac_cv_env_target_alias_value= +ac_cv_env_CC_set='' +ac_cv_env_CC_value='' +ac_cv_env_CFLAGS_set='' +ac_cv_env_CFLAGS_value='' +ac_cv_env_CPPFLAGS_set='' +ac_cv_env_CPPFLAGS_value='' +ac_cv_env_CPP_set='' +ac_cv_env_CPP_value='' +ac_cv_env_LDFLAGS_set='' +ac_cv_env_LDFLAGS_value='' +ac_cv_env_LIBS_set='' +ac_cv_env_LIBS_value='' +ac_cv_env_build_alias_set='' +ac_cv_env_build_alias_value='' +ac_cv_env_host_alias_set='' +ac_cv_env_host_alias_value='' +ac_cv_env_target_alias_set='' +ac_cv_env_target_alias_value='' ac_cv_header_stdc=yes ac_cv_lib_z_deflate=yes ac_cv_objext=o ac_cv_path_EGREP='/usr/bin/grep -E' ac_cv_path_GREP=/usr/bin/grep ac_cv_path_install='/usr/bin/install -c' -ac_cv_prog_CPP='gcc -E' -ac_cv_prog_ac_ct_CC=gcc -ac_cv_prog_cc_c89= +ac_cv_prog_CC=cc +ac_cv_prog_CPP='cc -E' +ac_cv_prog_cc_c89='' ac_cv_prog_cc_g=yes ac_cv_prog_make_make_set=yes @@ -212,9 +216,9 @@ ac_cv_prog_make_make_set=yes ## Output variables. ## ## ----------------- ## -CC='gcc' +CC='cc' CFLAGS='-g -O2' -CPP='gcc -E' +CPP='cc -E' CPPFLAGS='' DEFS='-DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DSTDC_HEADERS=1 -DHAVE_LIBZ=1 -D_LARGEFILE64_SOURCE=1 -D_FILE_OFFSET_BITS=64' ECHO_C='' @@ -241,7 +245,7 @@ PATH_SEPARATOR=':' SET_MAKE='' SHELL='/bin/sh' VERSION='1.2.1' -ac_ct_CC='gcc' +ac_ct_CC='' bindir='${exec_prefix}/bin' build_alias='' datadir='${datarootdir}' diff --git a/config.status b/config.status index c324a17..76057ee 100755 --- a/config.status +++ b/config.status @@ -427,7 +427,7 @@ Copyright (C) 2012 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." -ac_pwd='/home/colum/Movgrab' +ac_pwd='/root/Movgrab' srcdir='.' INSTALL='/usr/bin/install -c' test -n "$AWK" || AWK=awk @@ -586,18 +586,18 @@ S["LTLIBOBJS"]="" S["LIBOBJS"]="" S["EGREP"]="/usr/bin/grep -E" S["GREP"]="/usr/bin/grep" -S["CPP"]="gcc -E" +S["CPP"]="cc -E" S["INSTALL_DATA"]="${INSTALL} -m 644" S["INSTALL_SCRIPT"]="${INSTALL}" S["INSTALL_PROGRAM"]="${INSTALL}" S["SET_MAKE"]="" S["OBJEXT"]="o" S["EXEEXT"]="" -S["ac_ct_CC"]="gcc" +S["ac_ct_CC"]="" S["CPPFLAGS"]="" S["LDFLAGS"]="" S["CFLAGS"]="-g -O2" -S["CC"]="gcc" +S["CC"]="cc" S["subdirs"]=" libUseful-2.4" S["VERSION"]="1.2.1" S["target_alias"]="" diff --git a/libUseful-2.4/Log.c b/libUseful-2.4/Log.c index f78a3fc..92b65a8 100644 --- a/libUseful-2.4/Log.c +++ b/libUseful-2.4/Log.c @@ -199,7 +199,7 @@ int LogFileInternalWrite(TLogFile *LF, STREAM *S, int Flags, const char *Str) if (ParentPID==0) ParentPID=getpid(); if (LF) S=LogFileInternalDoRotate(LF); - if (! S) return; + if (! S) return(FALSE); gettimeofday(&Now,NULL); if (Flags & LOGFILE_TIMESTAMP) diff --git a/libUseful-2.4/Makefile b/libUseful-2.4/Makefile index 5fd167a..44a82c8 100644 --- a/libUseful-2.4/Makefile +++ b/libUseful-2.4/Makefile @@ -1,8 +1,8 @@ -CC = gcc +CC = cc VERSION = 0.0.1 CFLAGS = -g -O2 LIBS = -FLAGS=$(LDFLAGS) $(CPPFLAGS) $(CFLAGS) -fPIC -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_MADVISE -DHAVE_MADVISE_NOFORK -DHAVE_MADVISE_DONTDUMP -DHAVE_MLOCK +FLAGS=$(LDFLAGS) $(CPPFLAGS) $(CFLAGS) -fPIC -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_OSS=1 -DHAVE_MADVISE -DHAVE_MADVISE_NOFORK -DHAVE_MADVISE_DONTDUMP -DHAVE_MLOCK prefix=/usr/local OBJ=string.o list.o socket.o unix_socket.o file.o tar.o ansi.o FileSystem.o GeneralFunctions.o DataProcessing.o EncryptedFiles.o ConnectManager.o sound.o pty.o Log.o http.o inet.o expect.o base64.o crc32.o md5c.o sha1.o sha2.o whirlpool.o jh_ref.o Hash.o Compression.o oauth.o libsettings.o Vars.o MathExpr.o Time.o Markup.o SpawnPrograms.o Tokenizer.o PatternMatch.o ParseURL.o ConnectionChain.o openssl.o proctitle.o securemem.o diff --git a/libUseful-2.4/file.c b/libUseful-2.4/file.c index 986b1b7..4d65cd8 100644 --- a/libUseful-2.4/file.c +++ b/libUseful-2.4/file.c @@ -624,8 +624,11 @@ if ( #ifdef POSIX_FADV_DONTNEED if (S->Flags & STREAM_NOCACHE) { + //if we've got fdatasync as well as fadvise we can do this + #ifdef fdatasync fdatasync(S->out_fd); posix_fadvise(S->out_fd, 0,0,POSIX_FADV_DONTNEED); + #endif } #endif