head 1.4; access; symbols pkgsrc-2015Q2:1.3.0.2 pkgsrc-2015Q2-base:1.3 pkgsrc-2015Q1:1.2.0.8 pkgsrc-2015Q1-base:1.2 pkgsrc-2014Q4:1.2.0.6 pkgsrc-2014Q4-base:1.2 pkgsrc-2014Q3:1.2.0.4 pkgsrc-2014Q3-base:1.2 pkgsrc-2014Q2:1.2.0.2 pkgsrc-2014Q2-base:1.2 pkgsrc-2014Q1:1.1.0.6 pkgsrc-2014Q1-base:1.1 pkgsrc-2013Q4:1.1.0.4 pkgsrc-2013Q4-base:1.1 pkgsrc-2013Q3:1.1.0.2 pkgsrc-2013Q3-base:1.1; locks; strict; comment @// @; 1.4 date 2015.09.02.12.37.09; author fhajny; state dead; branches; next 1.3; commitid dkBOJb620ZIZ0Gzy; 1.3 date 2015.05.19.14.12.40; author ryoon; state Exp; branches; next 1.2; commitid ywYH18eZoxi9Y3my; 1.2 date 2014.03.31.14.42.20; author fhajny; state Exp; branches; next 1.1; commitid 00Sppth0Yim6rRux; 1.1 date 2013.09.14.09.14.08; author fhajny; state Exp; branches; next ; commitid Vwqeb4sH1wbjZn5x; desc @@ 1.4 log @Update devel/rudiments to 0.53. rudiments 0.53 - exposed codetreegrammar class and updated codetree class so that successive parses/writes can use the same grammar without having to reload - added insert/appendXml(File) methods to xmldomnode to parse and insert/append xml strings or files to a node - fixed FILE->fileno detection for solaris 11.2, which doesn't have it at all - llabs() is detected and preferred to abs() - added partial xml namespace support (namespaces for tags) - added partial support for extended ascii character set to character class - added setgroups() call before setuid() call to drop extraneous groups - updated rudiments-config man page, slightly - removed outdated and unused dtd class - updated file::resolveSymbolicLink() to use directory::maxPathLength(filename) as a starting point - updated directory::getCurrentDirectory() to use MAX_PATH as a starting point - serialport/serialportprofile, modemserver/modemclient classes are disabled in the default build now - updated intro docs rudiments 0.52 - tweaked codetree's recursive break logic a bit - added compiler class - added case-insensitive methods to xmldomnode - added methods to xmldomnode that operate on descendents (as opposed to just operating on direct children) - added methods to xmldomnode for deleting, wrapping, unwrapping - fixed dynamiclib::getError() bug on windows - tweaked -Werror detection in configure script - removed rpcentry class - added file::setPermissions() methods rudiments 0.51 - added missing inline qualifiers to dynamicarray/staticarray method implementations - added test for clock_settime, datetime class uses it if other set-time functions aren't available, returns false and sets errno=ENOSYS if no set-time function is available - directory::fpathConf now falls back to MAX_PATH code if fpathconf exists but there's dirfd() or anything like it - file::createFifo returns false and sets errno=ENOSYS on platforms that don't support fifo's now - file::generateKey returns -1 and sets errno=ENOSYS on VMS now - file::createHardLink returns -1 and sets errno=ENOSYS on platforms don't support hard links now - fixed missing breaks in stdio::flush - userentry::getPassword/getRealName return NULL on VMS now - unix sockets are faked on VMS now - threadmutex is built and installed now whether or not threads are supported, but if threads are not supported, its methods are degenerate and return success - filesystem::getCurrentProperties() returns false and sets errno=ENOSYS on VMS now - implemented degenerate groupentry for VMS - fixed file::getBlockCount() crash that could occur if the filesystem's block size was reported as 0 - tweaked copy constructors and = operators in staticarray/dynamicarray classes to work with older compilers - disabled -Werror for gcc < 2.7 - filedescriptor::printf uses fprintf or fdopen/vfprintf when possible, in leiu of falling back to charstring::printf - charstring::printf tries the null device before falling back to a scratch file - the rate at which charstring::printf expands its buffer is now exponential up to 1024 bytes - added sys::getDirectorySeparator() - fixed trailing-slash-followed-by-quote issue when building windows command lines - added --enable-enosys-notify configure option for runtime notifcations when methods set ENOSYS - cleared errno before each EINTR loop - fixed sys::sync() segfault - fixed ssl tests - removed intervaltimer class - updated sys::getPhysicalPageCount/getAvailablePhysicalPageCount for Windows - added sys::getAllocationGranularity, updated code to use it instead of getPageSize, in most cases - fixed copy-constructor/=-operator bugs in dynamicarray class - added config_vs2013.h for VS 2013 - fixed several permissions-related issues for WinNT 4 - allowShortReads/useBlockingMode are set by default for stdinput now - added wrapper for atexit() - changed process::getRealUser/GroupId to getUser/GroupId to match setUser/Groupid - added process::setEffectiveUser/Group methods - fixed and documented auto-resume behavior in snooze methods - fixed detection of double-dashed command line parameters without values - removed redundant charstring::rightPad() - renamed charstring::padString() to charstring::pad() - added safePrint methods that take unsigned char arguments - fixed bytestring::findFirst() with unsigned char needle, when needle is 0 - fixed bugs in linkedlist::moveBefore/moveAfter - fixed bugs in singlylinkedlist::removeAll() - removed arg parameter from thread::setFunction(), added thread::setArgument(), and added thread::create(arg) - changed thread::create() to thread::run() - wrote lots of example code and updated the programming docs - removed unused shmfile class - fixed several LocalFree's that should have been delete[]'s @ text @$NetBSD: patch-src_charstring.cpp,v 1.3 2015/05/19 14:12:40 ryoon Exp $ Remove ambiguity (fixes build with GCC>=4.7). --- src/charstring.cpp.orig 2015-04-12 01:27:08.000000000 +0000 +++ src/charstring.cpp @@@@ -356,7 +356,7 @@@@ char *charstring::convertAmount(int64_t } negative[1]='\0'; char *amountstr=new char[length]; - int64_t amt=abs(amount); + int64_t amt=abs((int)amount); printf(amountstr,length, "$%s%lld.%02lld",negative, amt/100,amt-(amt/100*100)); @ 1.3 log @Update to 0.50 Changelog: 0.50 - added dictionary::detach and dictionary::getValue(key) added xmldom::getNullNode() improved xml printing for text nodes signalmanager::waitForSignal(NULL) works as expected now updated charstring::httpEscape not to escape legal symbols added flush() method to stdio classes added detection and support for vsnprintf_s fixed serviceentry, protocolentry and rpcentry on windows updated *entry classes for NULL and uninitialization safety implemented filesystem::initialize(fd) for Windows updated filesystem::initialize() with NULL and -1 to behave in predictable ways now, updated documentation for them too abstracted _get_osfhandle calls and added an invalid parameter callback updated filedescriptor to use bit fields for all of its flags implemented file::changeOwner() for windows removed xattrs stuff removed SSL-related ifdef's from headers and implemented degenerate SSL routines for when SSL isn't supported timezone conversion works on windows now refactored bytebuffer and stringbuffer to be extent-based fixed a subtle stringbuffer with initialcontents bug refactored stringbuffer to use bytebuffer::write/appendFormatted directly instead of charstring::parseNumber implemented dynamicarray and staticarray classes refactored build process to use nmake and be compatible with many different versions of MS Visual Studio updated vsnprintf_s calls for platforms where it's not defined added configure test for bool and true/false and definitions for platforms that don't define them updated timed semaphore waits - if seconds or nanoseconds are negative then the timed wait acts like an un-timed wait added support for getsockopt with size_t optlen parameter fixed strncasecmp on windows when str2 is longer than str1 xmlsax uses memorymap on Windows now fixed file::lockFile() and file::unlockFile() on Windows fixed charstring::printf on Solaris 2.5.1 fixed datetime::getSystemDateAndTime() for Windows without 64-bit integers fixed potential double-CloseHandle in thread class 0.49: Full changelog follows: combined passswdentry and shadowentry classes into userentry class updated file::sync() to use FlushFileBuffers directly implemented sys::sync(), reboot(), halt() and shutdown() for windows implemented various sys::getXXX() methods for windows added "detached" option to process::spawn() crash-related methods in process class catch SIGABRT, SIGFPE, SIGILL, SIGBUS, SIGIOT, SIGEMT and SIGSYS in addition to SIGSEGV now shutdown-related methods in process class catch SIGQUIT and SIGHUP in addition to SIGINT and SIGTERM now on windows, signal classes now support catching, sending/raising SIGABRT, SIGFPE, SIGILL, SIGINT, SIGSEGV and SIGTERM and sending/raising SIGKILL disabled threads outright on OSR5 fixed threads detection for solaris 2.6 codetree bails properly at end of string now fixed a break-related condition that could cause codetree to loop indefinitely added support for a beginning-of-line character to codetree added support for recursive breaks to codetree made charstring::compareIgnoringCase null-safe for platforms that don't have str(n)casecmp improved Windows support in signal classes -Wno-overloaded-virtual is now set when clang is used fixed some subtle kqueue-related bugs added sys/byteorder.h and htonll/ntohll for solaris 11 fixed endian-detection macros for solaris 10 and older added support for SIGLARM and signalmanager::alarm() on windows improved windows implementation of semaphoreset added sys::signalsInterruptSystemCalls() added process::supportsFork() @ text @d1 1 a1 1 $NetBSD: patch-src_charstring.cpp,v 1.2 2014/03/31 14:42:20 fhajny Exp $ @ 1.2 log @Update rudiments to 0.46. Changelog: 0.46 - updated filedestination::open to take a permissions parameter - added deployment projects for windows - tweaked make.batch install target to install 32-bit files under C:\Program Files (x86) - wrapped waitpid() in process class - added #define _WINSOCKAPI_ before windows.h includes to prevent redefintion of winsock defs later - fixed O_RDONLY detection on windows in file::openInternal - fixed shared memory segment sizing error on windows - fixed O_CREAT without O_EXCL bug on windows - fixed backwards loaddependencies flag in dynamiclib for windows - added file::eightDotThree - added charstring::stripSet and updated charstring::strip to return true/false if stripping occurred or not - removed stubs for unimplemented classes 0.45 - got the directory class working on windows - got the semaphoreset class working on windows - implemented passwd/groupentry::getSid and an internal id-name-sid map for windows - removed meaningless groupentry::getPassword - improved filesystem class implementation for Windows significantly - added a test for the memorymap class - got the memorymap class implementation working on Windows - got the sharedmemory class working on windows - added support for microseconds to the datetime class - build-tweaks for mingw32 - added process::spawn that maps more cleanly on windows than fork/exec - added thread class - added send/receiveSocket methods to filedescriptor class for systems like Windows that distinguish between sockets and other file descriptors - improved file class implementation for Windows - fixed a bug that caused all connect-with-timeout calls to fail - fixed a bug that caused permissions::setFilePermissions to fail on directories 0.44.1 - configure scripts attempts link for various _r functions now to catch cases where they're defined in the headers but not present in the library - tweaks for dlopen/dlsym on linux libc5 - reordered netinet/in.h and netinet/tcp.h includes for linux libc5 - configure script tweaks for OSR500 - extern "C" wrapper around sys/times.h for OSR500 - added xmldomnode::append/insertTag methods 0.44 - fixed inet_aton test to attempt link, not just compile - fixed vsnprintf test to work on arm linux - filedescriptor::printf now uses vdprintf, if available, if writes are not being buffered, and vasprintf, if available, if writes are being buffered - fixed a memory leak in filedescriptor::printf - added multiarch detection - applied Simon Martin's getenv-related patch to reset errno and allow getenv to return NULL - fixed a situation where an infinte loop could occur if getenv returned NULL and the most recent error from another system call was EINTR - added missing print() for const char *'s in linkedlistutils - tweaks for OSR505 - a few xmlsax optimization fixes - renamed *Data methods to *Value in linkedlist and dictionary classes - removed print methods and unlikely-to-be-used static methods from *entry classes - refactored the static convenience methods of the *entry classes - refactored xattr code a little to make it smaller - removed static methods from filesystem class to make it smaller - removed some static methods from file class to make it smaller - removed the clientserverfactory class - slight refactoring of linkedlist and dictionary classes - various process class fixes for Windows 0.43 - added a workaround for platforms that don't support blocking/non-blocking modes for sockets - added *printf wrappers to charstring, filedescriptor and stringbuffer classes - added test/include for sys/signal.h for platforms that need it - added support for uadmin with int vs. char 3rd argument - added snooze and retry if fork fails with EAGAIN - moved safePrint and printBits methods into the filedescriptor class - added a test and handling for fsetxattr with non-const third parameter - "hid openssl" by abstracting SSL types and moving includes into .cpp files - fixed erroneous end-of-buffer address when creating a variablebufferis with initial contents - added option to disable string cache in xmldom class - added "data" member to xmldomnode class for attaching app-specific data - improved codetree speed - fixed a "char" on ARM issue - fixed a longstanding issue where variablebuffers could get extended too much sometimes - renamed system class to sys to avoid collisions - added -Werror to configure-time tests for older systems where g++ doesn't return an error for an implicitly defined function - removed the rudiments namespace for compatibility with older compilers - replaced a bunch of unsigned long and long with [u]int(32|64)_t - removed the timezonefile class - renamed mutex class to threadmutex to avoid collisions - wrapped setsid() function - refactored and simplified dictionary and linkedlist classes - if thread detection fails it just disables threads now rather than erroring out - thread support is displayed in configure summary - refactored xmldomnnode::print() methods, added one to write to a filedescriptor - renamed memorypool methods malloc, calloc and free to allocate, allocateAndClear and deallocate to avoid collisions on platforms that define malloc and calloc using macros - fixed lots of cases where const char *'s were being deleted - renamed *serversocket to *socketserver - renamed *clientsocket to *socketclient - added 64-bit build support for Windows - refactored daemonprocess class and moved its methods into the process class @ text @d1 1 a1 1 $NetBSD: patch-src_charstring.cpp,v 1.1 2013/09/14 09:14:08 fhajny Exp $ d4 1 a4 1 --- src/charstring.cpp.orig 2014-03-07 05:54:23.000000000 +0000 d6 1 a6 1 @@@@ -349,7 +349,7 @@@@ char *charstring::convertAmount(int64_t d14 1 a14 1 (long long)(amt/100), @ 1.1 log @Update rudiments to 0.42. Changes ------------------------- 0.42 - made a "char" array in the charstring classh explicitly "signed char" for arm and similar platforms where "char" is actually "unsigned char" fixed variadic macros in codetree class for MSVC fixed rpm->rpmbuild in installation docs 0.41 - fixed a few bugs in the codetree class and improved its debug added comments to codetree class header added new search paths and default prefix for syllable initialized an uninitialized variable in clientsocket added support for syllable os 0.40 - fixed -pthread annoyance added -Werror to default build fixed various issues revealed by -Werror fixed hostentry::getAddressString() for numbers greater than 127 fixed bugs that could lead to a crash when using the hostentry class with NULL hostnames reads that error out with EAGAIN are treated as successful reads of 0 bytes now all sockets are manually set to blocking mode after creation now sockets created by accept() are set to the blocking/non-blocking mode of the socket that was accepted on fixed charstring::safeCopy to copy the NULL terminator made charstring::copy NULL-safe refactored windows make.bat script made crypt class salt NULL-safe 0.39 - filedescriptor::getPeerAddress returns NULL now for non-inet sockets added charstring::safeCopy methods made regularexpression::getSubstring* methods return const char *'s fixed a bug where xmldomnode::deleteAttribute() on a non-existent attribute name would crash added xmldomnode::getTree and xmldomnode::print methods added codetree class fixed a longstanding memory leak in dictionary::clear() 0.38 - included some contributed updates to chat, charstring and modemclient added several more wrappers to system class refactored configure/make for non-gnu make compatibility upated passFileDescriptor to dynamically allocate the control buffer for OS X 10.7 whos CMSG_LEN ultimately calls a function updated msvc build to create Release code rather than Debug by default added posix analogs (rewind, skip and read) to directory class updated filedescriptor debug so debugging of the buffering can be enabled/disabled integrated patches from Neowiz for: using -g3 if available when --enable-debug is specified testing the result of getaddrinfo for any non-zero result when checking for EINTR, not just EAI_SYSTEM, and also to reset errno between tries clientsocket to use WSAConnect and friends on windows disabling code that uses AF_UNIX sockets outright for windows inetserversocket::listen() to reuse addresses added process::exitImmediately updated error::getErrorString() to be thread safe when it uses strerror_r or strerror_s internally fixed charstring::isInteger/isNumber to return false when the string passed in is either - or . without any actual number changed longs in snooze class to uint32_t's 0.37 - updated logger to exclude : if header isn't supplied updated logger not to print double-returns after each log message added file::createPipe() fixed net-to-host and host-to-net byte order conversions for 64-bit integers on windows fixed charstring::copy that I'd broken in 0.36 fixed missing [] in a delete in filedescriptor::read() with terminator that could cause leaks and corruption fixed a leak in filedescriptor::read() with terminator that could occur when it fell through with an error, timeout or 0-byte read applied Georgiy Kirichenko's fix to the safePoll call in filedescriptor::readFileDescriptor() - swapped true/false arguments so it would wait using POLLIN added xmldomnode::getPosition() fixed display of seconds from datetime::getString() fixed optimum buffer size calculation in xmlsax fixed several dlclose()-related bugs 0.36 - various fixes for SCO and Ultrix renamed some methods to avoid collisions with macros modified methods that take or return internal structures to take or return void pointers instead added charstring::replace methods renamed all .C files to .cpp for windows added msvc project and got most classes building natively on windows 0.35 - added ( to set of chars to capitalize after added methods to control whether semaphoreset operations are retried after they have been interrupted by a signal added charstring::findFirstOrEnd added character::inSet @ text @d1 1 a1 1 $NetBSD$ d4 1 a4 1 --- src/charstring.cpp.orig 2013-08-01 02:43:39.000000000 +0000 d6 1 a6 1 @@@@ -309,7 +309,7 @@@@ char *charstring::convertAmount(int64_t d12 3 a14 3 sprintf(amountstr,"$%s%lld.%02lld",negative, (long long)(amt/100), (long long)(amt-(amt/100*100))); @