|
POSIX_CXX
POSIX/C++ stuff.
IntroductionThe POSIX/C++ working group aims at providing a C++ binding for the system interfaces specified in POSIX. This project hosts source code for bindings proposed for standardization by members of the ccppbrasil.org group and is maintained by Pedro LamarĂ£o. ProjectsPOSIX/C++ Device LibraryThe POSIX/C++ Device Library contains the definition for concept Device and other associated concepts, the definition for a class file, as well as experimental adapters for runtime polymorphism and buffering. The source code for this project can be found in this Subversion repository. The 1.0.x branch contains version 1. It corresponds, together with the Network library below, to the latest POSIX/C++ I/O paper, found in this mail. The trunk contains version 2. It is currently under development. Although there is inline documentation as code comments, the papers published in the mailing list are the best documentation on the library. HackingCurrently, this project provides a Makefile and an Eclipse CDT project. To build this project, GCC 4.4.0 or newer is required. The Makefile will use the "g++-4.4" compiler as default foi convenience, so you can install GCC 4.4.0 in a custom prefix and define this symbolic link in $HOME/bin or some other convenient place. The make target check runs a test suite, but you might need to set LD_LIBRARY_PATH in order to find required libraries, such as GCC's libraries if installed in a custom prefix. Our suggested setup is a workspace-style directory layout where the cxx_device project directory is a sibling to your own project directories, such as a sandbox project for experiments. We place the following script in this workspace directory to ease running programs: #!/bin/bash LD_LIBRARY_PATH=cxx_device/src $@ POSIX/C++ Network LibraryNote: this code line has been closed after being merged into the Devices Library. The POSIX/C++ Network Library contains facilities for creating sockets and translating from symbolic to network addresses and back. The source code for this project can be found in this Subversion repository. Version 1 corresponds to the first design paper sent to the working group and sits in the 1.0.x branch. The mail, and a link to the paper, can be found here. Version 2 corresponds to the second design paper sent to the working group and sits in the 2.0.x branch. The mail, and a link to the paper, can be found here. The trunk contains version 3. It corresponds, together with the Device library above, to the latest POSIX/C++ I/O paper, found in this mail. Although there is inline documentation as code comments, the papers published in the mailing list are the best documentation on the library. HackingCurrently, this project provides a Makefile and an Eclipse CDT project. To build this project, GCC 4.4.0 or newer is required. The Makefile will use the "g++-4.4" compiler as default foi convenience, so you can install GCC 4.4.0 in a custom prefix and define this symbolic link in $HOME/bin or some other convenient place. Also, the default preprocessor flags will look for cxx_device's headers according to our suggested workspace layout, see below. The make target check runs a test suite, but you might need to set LD_LIBRARY_PATH in order to find required libraries, such as GCC's libraries if installed in a custom prefix, and the cxx_device library. Our suggested setup is a workspace-style directory layout where the cxx_network project directory is a sibling to the cxx_device and your own project directories, such as a sandbox project for experiments. We place the following script in this workspace directory to ease running programs: #!/bin/bash LD_LIBRARY_PATH=cxx_device/src:cxx_network/src $@ POSIX/C++ Data StructuresThe POSIX/C++ Data Structures sub-project aims at making familiar data structures, such as iovec and stat, easier to use with the addition of constructors and operator overloads. Our reference implementation is a modification of the GNU libc source code distributed by the Fedora Project as part of the Fedora 10 system, more specifically the glibc-2.9-3.src.rpm package. The source code for this project can be found in our Subversion repository, here. No paper about this work has been published at this time. HackingTo configure the source code, follow these steps: ]$ mkdir i486-redhat-linux-obj ]$ cd i486-redhat-linux_obj ]$ CC=gcc-4-4 CFLAGS='-march=i486 -mtune=generic -mno-tls-direct-seg-refs \ -fasynchronous-unwind-tables -g -O3' ../configure --prefix=/opt/cxx_libx \ --enable-add-ons=nptl,rtkaio,c_stubs,libidn --without-cvs --enable-kernel=2.6.9 \ --with-headers=/usr/include --enable-bind-now --with-tls --with-__thread \ --build i486-redhat-linux --host i486-redhat-linux --disable-profile This is aproximately what the spec file for Fedora 10 will do to compile this package. Because we are not introducing new symbols and all new definitions are inline, the compiled library doesn't seem to matter much, only the new headers; also, there shouldn't be problems running programs dynamically linked with the system's version instead of the custom one. |
Sign in to add a comment