diff -ur nx-x11-1.4.0-r3/work/nxcomp/BlockCacheSet.cpp nx-x11-1.4.0-fixed/work/nxcomp/BlockCacheSet.cpp --- nx-x11-1.4.0-r3/work/nxcomp/BlockCacheSet.cpp 2004-08-10 04:57:14.000000000 -0400 +++ nx-x11-1.4.0-fixed/work/nxcomp/BlockCacheSet.cpp 2005-02-05 03:04:15.000000000 -0500 @@ -15,7 +15,9 @@ /* */ /**************************************************************************/ -#include +#include +using namespace std; + #include "BlockCacheSet.h" diff -ur nx-x11-1.4.0-r3/work/nxcomp/Jpeg.cpp nx-x11-1.4.0-fixed/work/nxcomp/Jpeg.cpp --- nx-x11-1.4.0-r3/work/nxcomp/Jpeg.cpp 2004-08-10 04:56:00.000000000 -0400 +++ nx-x11-1.4.0-fixed/work/nxcomp/Jpeg.cpp 2005-02-05 03:04:15.000000000 -0500 @@ -452,7 +452,7 @@ // next line. // - (char *) pixelPtr += RoundUp4(w * 2) - w * 2; + *(char **) &pixelPtr += RoundUp4(w * 2) - w * 2; dy++; } @@ -562,7 +562,7 @@ pixelPtr += 3; } - (char *) pixelPtr += RoundUp4(w * 3) - w * 3; + *(char **) &pixelPtr += RoundUp4(w * 3) - w * 3; dy++; } diff -ur nx-x11-1.4.0-r3/work/nxcomp/Loop.cpp nx-x11-1.4.0-fixed/work/nxcomp/Loop.cpp --- nx-x11-1.4.0-r3/work/nxcomp/Loop.cpp 2004-11-22 16:52:38.000000000 -0500 +++ nx-x11-1.4.0-fixed/work/nxcomp/Loop.cpp 2005-02-05 03:04:15.000000000 -0500 @@ -32,7 +32,9 @@ #include #endif -#include +#include +using namespace std; + #include #include diff -ur nx-x11-1.4.0-r3/work/nxcomp/Makefile.in nx-x11-1.4.0-fixed/work/nxcomp/Makefile.in --- nx-x11-1.4.0-r3/work/nxcomp/Makefile.in 2004-08-21 13:14:39.000000000 -0400 +++ nx-x11-1.4.0-fixed/work/nxcomp/Makefile.in 2005-02-05 03:41:17.000000000 -0500 @@ -12,7 +12,7 @@ CXX = @CXX@ CXXFLAGS = @CXXFLAGS@ @X_CFLAGS@ @DEFS@ \ - -Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes + -Wall -Wpointer-arith CXXINCLUDES = CXXDEFINES = diff -ur nx-x11-1.4.0-r3/work/nxcomp/Message.cpp nx-x11-1.4.0-fixed/work/nxcomp/Message.cpp --- nx-x11-1.4.0-r3/work/nxcomp/Message.cpp 2004-08-22 08:20:51.000000000 -0400 +++ nx-x11-1.4.0-fixed/work/nxcomp/Message.cpp 2005-02-05 03:04:15.000000000 -0500 @@ -16,7 +16,9 @@ /**************************************************************************/ #include -#include +#include +using namespace std; + #include #include diff -ur nx-x11-1.4.0-r3/work/nxcomp/Misc.cpp nx-x11-1.4.0-fixed/work/nxcomp/Misc.cpp --- nx-x11-1.4.0-r3/work/nxcomp/Misc.cpp 2004-08-22 12:04:37.000000000 -0400 +++ nx-x11-1.4.0-fixed/work/nxcomp/Misc.cpp 2005-02-05 04:19:01.000000000 -0500 @@ -15,7 +15,9 @@ /* */ /**************************************************************************/ -#include +#include +using namespace std; + #include #include #include diff -ur nx-x11-1.4.0-r3/work/nxcomp/Misc.h nx-x11-1.4.0-fixed/work/nxcomp/Misc.h --- nx-x11-1.4.0-r3/work/nxcomp/Misc.h 2004-08-22 12:04:33.000000000 -0400 +++ nx-x11-1.4.0-fixed/work/nxcomp/Misc.h 2005-02-05 03:04:15.000000000 -0500 @@ -18,7 +18,8 @@ #ifndef Misc_H #define Misc_H -#include +#include +using namespace std; #include #include diff -ur nx-x11-1.4.0-r3/work/nxcomp/Png.cpp nx-x11-1.4.0-fixed/work/nxcomp/Png.cpp --- nx-x11-1.4.0-r3/work/nxcomp/Png.cpp 2004-08-10 04:55:40.000000000 -0400 +++ nx-x11-1.4.0-fixed/work/nxcomp/Png.cpp 2005-02-05 03:04:15.000000000 -0500 @@ -452,7 +452,7 @@ // next line // - (char *) pixelPtr += RoundUp4(w * 2) - w * 2; + *(char **) &pixelPtr += RoundUp4(w * 2) - w * 2; } png_destroy_read_struct(&png_ptr, &info_ptr,NULL); @@ -578,7 +578,7 @@ pixelPtr += 3; } - (char *) pixelPtr += RoundUp4(w * 3) - w * 3; + *(char **) &pixelPtr += RoundUp4(w * 3) - w * 3; } png_destroy_read_struct(&png_ptr, &info_ptr,NULL); diff -ur nx-x11-1.4.0-r3/work/nxcomp/Proxy.cpp nx-x11-1.4.0-fixed/work/nxcomp/Proxy.cpp --- nx-x11-1.4.0-r3/work/nxcomp/Proxy.cpp 2004-10-28 12:29:12.000000000 -0400 +++ nx-x11-1.4.0-fixed/work/nxcomp/Proxy.cpp 2005-02-05 03:04:15.000000000 -0500 @@ -17,7 +17,9 @@ #include #include -#include +#include +using namespace std; + #include #include diff -ur nx-x11-1.4.0-r3/work/nxcomp/Split.cpp nx-x11-1.4.0-fixed/work/nxcomp/Split.cpp --- nx-x11-1.4.0-r3/work/nxcomp/Split.cpp 2004-08-10 04:53:28.000000000 -0400 +++ nx-x11-1.4.0-fixed/work/nxcomp/Split.cpp 2005-02-05 03:04:15.000000000 -0500 @@ -15,7 +15,9 @@ /* */ /**************************************************************************/ -#include +#include +using namespace std; + #include #include #include diff -ur nx-x11-1.4.0-r3/work/nxcomp/Types.h nx-x11-1.4.0-fixed/work/nxcomp/Types.h --- nx-x11-1.4.0-r3/work/nxcomp/Types.h 2004-08-10 04:47:11.000000000 -0400 +++ nx-x11-1.4.0-fixed/work/nxcomp/Types.h 2005-02-05 03:04:15.000000000 -0500 @@ -72,68 +72,14 @@ return &*(vector < unsigned char >::begin()); } - void clear() - { - #if defined(__STL_USE_STD_ALLOCATORS) || defined(__GLIBCPP_INTERNAL_VECTOR_H) - - #if defined(__GLIBCPP_INTERNAL_VECTOR_H) - - _Destroy(_M_start, _M_finish); - - #else - - destroy(_M_start, _M_finish); - - #endif - - _M_deallocate(_M_start, _M_end_of_storage - _M_start); - - _M_start = _M_finish = _M_end_of_storage = 0; - - #else - - destroy(start, finish); - - deallocate(); - - start = finish = end_of_storage = 0; - - #endif - } + /* clear function was broken, instead use STL's working std::vector<>::clear */ }; class T_messages : public vector < Message * > { public: - void clear() - { - #if defined(__STL_USE_STD_ALLOCATORS) || defined(__GLIBCPP_INTERNAL_VECTOR_H) - - #if defined(__GLIBCPP_INTERNAL_VECTOR_H) - - _Destroy(_M_start, _M_finish); - - #else - - destroy(_M_start, _M_finish); - - #endif - - _M_deallocate(_M_start, _M_end_of_storage - _M_start); - - _M_start = _M_finish = _M_end_of_storage = 0; - - #else - - destroy(start, finish); - - deallocate(); - - start = finish = end_of_storage = 0; - - #endif - } + /* clear function was broken, instead use STL's working std::vector<>::clear */ }; struct T_less diff -ur nx-x11-1.4.0-r3/work/nxcomp/configure nx-x11-1.4.0-fixed/work/nxcomp/configure --- nx-x11-1.4.0-r3/work/nxcomp/configure 2003-12-19 09:14:19.000000000 -0500 +++ nx-x11-1.4.0-fixed/work/nxcomp/configure 2005-02-05 03:54:56.000000000 -0500 @@ -2539,42 +2539,6 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - -echo "$as_me:$LINENO: checking whether compiler needs -Wno-deprecated" >&5 -echo $ECHO_N "checking whether compiler needs -Wno-deprecated... $ECHO_C" >&6 -gcc_version=`${CC} --version | grep 'gcc (GCC) 3.' | head -n 1` -case "${gcc_version}" in - gcc*) - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 - CXXFLAGS="$CXXFLAGS -Wno-deprecated" - CPPFLAGS="$CPPFLAGS -Wno-deprecated" - ;; - - *) - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 - ;; -esac - -echo "$as_me:$LINENO: checking whether compiler accepts -Wmissing-declarations and -Wnested-externs" >&5 -echo $ECHO_N "checking whether compiler accepts -Wmissing-declarations and -Wnested-externs... $ECHO_C" >&6 -gcc_version=`${CC} --version | grep 'gcc (GCC) 3.3.' | head -n 1` -case "${gcc_version}" in - gcc*) - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 - ;; - - *) - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 - CXXFLAGS="$CXXFLAGS -Wmissing-declarations -Wnested-externs" - CPPFLAGS="$CPPFLAGS -Wmissing-declarations -Wnested-externs" - ;; -esac - - ac_aux_dir= for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do if test -f $ac_dir/install-sh; then diff -ur nx-x11-1.4.0-r3/work/nxcomp/configure.in nx-x11-1.4.0-fixed/work/nxcomp/configure.in --- nx-x11-1.4.0-r3/work/nxcomp/configure.in 2003-12-19 09:13:58.000000000 -0500 +++ nx-x11-1.4.0-fixed/work/nxcomp/configure.in 2005-02-05 03:43:52.000000000 -0500 @@ -51,37 +51,6 @@ AC_PROG_CC AC_LANG_CPLUSPLUS -dnl Check whether option -Wno-deprecated -dnl is needed by GCC compiler. - -AC_MSG_CHECKING([whether compiler needs -Wno-deprecated]) -gcc_version=`${CC} --version | grep 'gcc (GCC) 3.' | head -n 1` -case "${gcc_version}" in - gcc*) - AC_MSG_RESULT([yes]) - CXXFLAGS="$CXXFLAGS -Wno-deprecated" - CPPFLAGS="$CPPFLAGS -Wno-deprecated" - ;; - - *) - AC_MSG_RESULT([no]) - ;; -esac - -AC_MSG_CHECKING([whether compiler accepts -Wmissing-declarations and -Wnested-externs]) -gcc_version=`${CC} --version | grep 'gcc (GCC) 3.3.' | head -n 1` -case "${gcc_version}" in - gcc*) - AC_MSG_RESULT([no]) - ;; - - *) - AC_MSG_RESULT([yes]) - CXXFLAGS="$CXXFLAGS -Wmissing-declarations -Wnested-externs" - CPPFLAGS="$CPPFLAGS -Wmissing-declarations -Wnested-externs" - ;; -esac - dnl Check for BSD compatible install. AC_PROG_INSTALL