# The UDS Collection

## Release Notes

back to main page

#### Version 0.9.5

Version 0.9.5 is the new stable release.
It contains the following user-visible changes:

- UDS provides the Backtrace() function (defined in uds/btrace.hh) which generates a backtrace at runtime. If the executable contains debugging information, the backtrace includes source files, line numbers, and function names. Very useful for debugging. The Backtrace() function is used by the UDS exception classes and replace the 'thrower address' feature. See the reference for more information.
- The socket api has been redesigned. There is now one class for each protocol. Support for UDP sockets and X.25 sockets (Sangoma Wanpipe cards under Linux only) were added.
  Note: The new socket classes are incompatible with the old SocketStream class (which has been removed).
- Example program 10 has been rewritten and demonstrates the use of the TCPSocket class. Example programs 12 - 14 were added. See the README file in the test directory of the source distribution for brief descriptions.
- A set of m4 macros was added which make it easy to add configure-switches to your project which control UDS default settings. This task which was (and is) covered in Configuring UDS is simplified greatly.<bt> Note: read this section if you are upgrading from an older version of UDS, and update your udsdeff.cc.
  There are also several other useful m4 macros.
- The --with[out]-libudsthread configure option was added. libudsthread is built by default unless libpthread was not found.
- It is now possible to make a ProcStream kill the child process when the stream is closed. Particularly useful if the child process waits (forever) for new input.
- Subsequent runtime initializations of UDS (by placing an uds::Init instance on the stack) are now allowed. A reference count is maintained internally.
- Minor bugfixes in the family of BRead functions. BRead functions were added which take a file descriptor instead of an input stream. All BRead functions return now the number of bytes read. Useful if the 'wait' flag was not set. See the reference for more details.
- The FileInfo class, a simple wrapper which provides the same information as stat() does, was added. See the reference for details.
- It is now possible to change UDS flags at runtime. The uds::flags constant is not constant anymore. This topic is covered in Configuring UDS.
  Note:If you used to set the flags manually using something like
  `const uds::uds_flags_t uds::flags = uds::leak_check`,
  don't forget to remove the `const`.

#### Version 0.9.4

Version 0.9.4 is the new stable release.
It contains the following user-visible changes:

- The uds::Init class was added which initializes the UDS libray. You should place one instance in your main function. See any of the example programs that come with the source distribution. Right now this class serves only one purpose: If the instance was not created, it is assumed that an exception might not be caught in case of a fatal error. Therefore an error message is printed to stderr before the exception is thrown.
- It is now possible to get direct access to the diagnose object that comes with every UDS exception. This is especially useful to retrieve error codes (like errno). Look here.
- The Exception::AddInfo methods were renamed to Exception::Info.
- Exception::AppMsg was added which provides just a convenient way to append a short message to the info string. If the last character of the message to be appended is not a newline, it is automatically added.
- The VarConv template function was added which takes a string and converts it to another type. Have a look at the reference.
- SocketStream::Read was removed. It is replaced by more generic BRead() functions which are now defined in uds/sys_util.hh. BWrite() functions were added as well. Have a look at the reference for more information.
- The VecDelete() and VecNullDelete() template functions (eg for use in STL algorithms) were added to uds/stl_ext.hh.

Due to problems with the dot tool some of the nice diagrams are currently not available in the reference. I will make a new reference available as soon as the problems are fixed.

#### Version 0.9.3

Version 0.9.3 is the new stable release.
It contains the following user-visible changes:

- Added ProcStream class. It is a replacement for popen(), but more flexible. Since a pair of anonymous unix-domain sockets is used instead of pipes both read and write operations are supported. Furthermore it is possible to specify the environment of the child process. As required by POSIX.2 for popen(), Streams from other ProcStream instances that remain open in the parent process are closed in the new child process.
- The thread-safe version with the posix thread classes is only built if the pthread library was found.
- Added a function to the timeval wrapper class that converts the time to a 64 bit integer (microseconds since the epoch). Added functions that return the current system time as TimeVal (Time) and 64 bit integer (Time_int64).
- The SocketStream class is now usable since Connect() methods are provided. The UnixDomainSocket() and InetSocket() functions were moved to socket.hh.
- Added a fd_set wrapper class and ReadLine() functions to sys_util.hh.
- Thread::Instance was renamed to Thread::Self and returns a GC_Ptr.
- The old TmpFileName functions were replaced. There are now two TmpFile() functions that return a file descriptor (like mkstemp) and two TmpFileName() functions that return a temporary file name. However, unlike previous TmpFileName() functions they create a file as TmpFile() does to avoid a race condition, and close the file before the name is returned.
- Added StringVar template function that converts its argument to a string.
- It is now possible to pass options to Wait() (like the 3rd argument to waitpid).
- The pseudo-random number generators were redesigned. The ERand class was removed. The functions to generate random seeds (TimeSeed, RandomSeed, and URandomSeed) are not member-functions anymore.

#### Version 0.9.2

Next to a few minor internal improvements version 0.9.2 has several user visible changes:

- Wrapper classes for Posix Threads were added. They are Thread, ThreadAttr, Mutex, CondVar, Semaphore, MutexLock, and CMutexLock. see Threads, Mutexes, Semaphores.
- When you compile UDS, two libraries are created. libuds (the 'normal' version) and libudsthread, a threadsafe version. Threads are not supported in libuds. You have to link against libpthread and compile your code with -D_REENTRANT if you want to use libudsthread.
- Generic 'Action' classes were added. Those classes 'store' function calls and are defined in uds/action.hh. See Action, FinalAction, and VRemember, and test/example9.cc for one of the more obscure hello world programs ;-)
- A class for socket streams has been added. See Socket Stream class

#### Version 0.9.1

This release contains a few minor bugfixes / changes:

- Added FileDes, FileAccess, NamedSocket (untested!), SetIntersection, and CkStdCall convenience functions. Have a look at the reference for descriptions.
- Added a new constructor to classes generated by _uds_ExceptionClass and _uds_ExceptionClassF to avoid implicit vonversion from const char* to bool. The same with TmpFileName.
- The random number generators can now be initialized automatically with calls to RandomSeed (uses /dev/random), URandomSeed (uses /dev/urandom), and TimeSeed (uses system time). Have a look at the reference.

#### Version 0.9.0

This is the first release of the UDS collection.
No release notes for today.