cc2-vids-changes.txt Chris Ahlstrom 05/24/2003 This document lists the changes that need to be merged into the Common C++ code base when new versions of Common C++ are downloaded and installed. src ================= date.cpp ============== void Time::setTime(char *str, size_t size) { // // ca 11/26/2002 // char *min; // FIXED: This fix is apparently already made in 1.0.10, so we don't have to do it for VIDS. // ca 11/04/2002 Datetime::Datetime(tm *dt) : Date(dt), Time(dt) {} FIXED // ca 11/04/2002 Datetime::Datetime(int year, unsigned month, unsigned day, int hour, int minute, int second) : Date(year, month, day), Time(hour, minute, second) {} FIXED // ca 11/04/2002 Datetime::Datetime() : Date(), Time() {} Not FIXED, and new functionality added. We must fix by adding the two initializers shown above. // ca 11/04/2002 #ifdef WIN32 last = /*std*/ ::strftime(buffer, 64, format, tbp); #else last = std::strftime(buffer, 64, format, tbp); #endif Not FIXED. We should try a better way to make this fix. And also DOCUMENT OUR FIX properly. digest.cpp ============== // // ca 11/26/2002 // Clean up time. // #ifdef _MSC_VER #pragma warning ( disable : 4355 ) // 'this' used in base init list #endif This code is added just before the first #include. Look into putting it into "private.h" instead. fifo.cpp ============== // // ca 05/12/2003 // This header file is incompatible with Borland C++ Builder 4. Luckily, // it is not necessary for Borland C++, either! // #ifndef __BORLANDC__ #include #endif This code is wrapped around the sys/stat.h declaration. keydata.cpp ============== // // ca 11/26/2002 // Clean up time. // #ifdef _MSC_VER #pragma warning ( disable : 4018 ) // signed/unsigned mismatch #endif unsigned Keydata::getIndex(char **data, int max) { This code is placed before the above routine. numbers.cpp ============== // // ca 11/26/2002 // Clean up time. // #ifdef _MSC_VER #pragma warning ( disable : 4244 ) // conversion from long to char #endif void Number::setValue(long value) { This code is placed before the above routine. serial.cpp ============== // // ca 11/26/2002 // Clean up time. // #ifdef _MSC_VER #pragma warning ( disable : 4355 ) // 'this' used in base init list #endif This code is added just before the first #include. Look into putting it into "private.h" instead. slog.cpp ============== // // ca 11/26/2002 // Clean up time. // #ifdef _MSC_VER #pragma warning ( disable : 4355 ) // 'this' used in base init list #endif This code is added just before the first #include. Look into putting it into "private.h" instead. socket.cpp ============== // // ca 11/26/2002 // Clean up time. // #ifdef _MSC_VER #pragma warning ( disable : 4355 ) // 'this' used in base init list #endif This code is added just before the first #include. Look into putting it into "private.h" instead. //************************************************************************** // ca 11/26/2002 // std::string doesn't handle the usage of null pointers in its // constructor. Therefore, we get bogus exceptions having nothing // to do with any real problem. So we now guarantee that there // is an informative string. //-------------------------------------------------------------------------- #ifdef COMMON_STD_EXCEPTION case Thread::throwException: { static const char * const msg = "Socket::error() thrown with null string"; // ca 11/26/2002 SockException ex = string(errs == 0 ? msg : errs); throw ex; } #endif FIXED. The authors now set a null string. Our fix is better, but we should just accept their fix. thread.cpp ============== // // ca 05/12/2003 // Only the Borland compiler catches that there is no identifier for // the typedef. So we insert one just to satisfy that compiler. // typedef enum { THREAD_TYPE_NORMAL=0, THREAD_TYPE_MAIN, THREAD_TYPE_POSIX, THREAD_TYPE_DUMMY } __BC_THREAD_TYPE; // ca 05/12/2003 FIXED. However, it is fixed in the following way, and we should edit our code if need be: typedef enum ThreadType { threadTypeNormal=0, threadTypeMain, threadTypePosix, threadTypeDummy } ThreadType; include ================= socket.h ============== // // ca 05/15/2003 // Visual C++ /W4 cleanup; commented unused parameters void setPeer(const InetHostAddress & /*ia*/ , tpport_t /*port*/ ) {}; Added the commenting shown. // // ca 05/15/2003 // Visual C++ /W4 cleanup; commented unused parameters virtual bool onAccept(const InetHostAddress & /*ia*/, tpport_t /*port*/ ) {return true;}; Added the commenting shown. // // ca 05/15/2003 // Visual C++ /W4 cleanup; commented unused parameters inline InetHostAddress getSender(tpport_t * /*port*/ ) const {return InetHostAddress();}; Added the commenting shown. // // ca 05/15/2003 // Visual C++ /W4 cleanup; commented unused parameters virtual void onUpdate(unsigned char /*buf*/ ) {return;}; Added the commenting shown. // // ca 05/15/2003 // Visual C++ /W4 cleanup; commented unused parameters virtual void onCallback(SocketPort * /*port*/ ) {return;}; Added the commenting shown.