Skip to content

Commit

Permalink
0.5.2 (20040102)
Browse files Browse the repository at this point in the history
- Fixed API bug: <slack/lib.h> didn't include <slack/coproc.h>
- Fixed bug: -lm wasn't in `libslack-config --libs` on Solaris
- Changed daemon_path_is_safe() to give an explanation when unsafe
- Fixed bug: reset agent state to IDLE when interrupted (bte at kamash.com)
- Trim unquoted leading spaces from property values (with bte at kamash.com)
- Also trim only unquoted trailing spaces from property names
- Added tools/migrate-properties utility (preserves old propfile behaviour)
- Fixed bug: ownership partially lost in map_resize (with bte at kamash.com)
- Fixed bug: mem_resize was broken since libslack-0.4 (bte at kamash.com)
- Fixed DOC bug: stated the importance of including <slack/lib.h> first
- Added sections to libslack(3) features list (coproc+pty, low level api)
- Fixed bug: if select() failed (unlikely), coproc wasn't closed properly
- Fixed bug: when tty_raw() failed (unlikely), it returned the wrong value
- Added many examples to the manpages (there are now 91 runnable examples)
- Added tools/check-examples to verify that all examples work
- Fixed bug: str_fgetline() returned empty string rather than null on eof
- Fixed bug: cstrstr() didn't always work due to a typo
- Added sections to libslack(3) features list (documentation, testing)
- Added intel solaris8 binary package
- Ported to Mac OS X (Darwin) 10.3.2
- Added make osx osx-daemon osx-slack (macosx binary packages)
- Dropped support for K&R clients (suggested by skaller at ozemail.com.au)
- Added hsort_closure(3) (suggested by skaller at maxtal.com.au)
- Added make slack.swig (generate a SWIG input file for libslack)
  • Loading branch information
raforg committed Jan 1, 2004
1 parent 8e70789 commit a5e65f0
Show file tree
Hide file tree
Showing 78 changed files with 5,076 additions and 1,759 deletions.
12 changes: 9 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#
# libslack - http://libslack.org/
#
# Copyright (C) 1999-2001 raf <[email protected]>
# Copyright (C) 1999-2004 raf <[email protected]>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
Expand All @@ -19,7 +19,7 @@
# or visit http://www.gnu.org/copyleft/gpl.html
#

# 20020916 raf <[email protected]>
# 20040102 raf <[email protected]>

CC := gcc
# CC := cc
Expand Down Expand Up @@ -71,6 +71,7 @@ deb: $(DEB_TARGETS)
sol: $(SOL_TARGETS)
obsd: $(OBSD_TARGETS)
fbsd: $(FBSD_TARGETS)
osx: $(OSX_TARGETS)

.PHONY: help help-macros depend clean clobber distclean

Expand Down Expand Up @@ -98,6 +99,9 @@ help::
echo " sol -- makes binary solaris package"; \
echo " obsd -- makes binary openbsd package"; \
echo " fbsd -- makes binary freebsd package"; \
echo " osx -- makes binary macosx package"; \
echo; \
echo " slack.swig -- makes SWIG input file for libslack"; \
echo

help-macros::
Expand Down Expand Up @@ -129,7 +133,9 @@ help-macros::
echo "RPM_TARGETS = $(RPM_TARGETS)"; \
echo "DEB_TARGETS = $(DEB_TARGETS)"; \
echo "SOL_TARGETS = $(SOL_TARGETS)"; \
echo "BSD_TARGETS = $(BSD_TARGETS)"; \
echo "OBSD_TARGETS = $(OBSD_TARGETS)"; \
echo "FBSD_TARGETS = $(FBSD_TARGETS)"; \
echo "OSX_TARGETS = $(OSX_TARGETS)"; \
echo

tags: $(TAG_FILES)
Expand Down
150 changes: 115 additions & 35 deletions README
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ DESCRIPTION
~~~~~~~~~~~
Libslack is a library of general utilities designed to make UNIX/C programming
a bit easier on the eye. It is a seemingly random collection of modules and
functions that I find commonly useful.
functions that I find commonly useful.

It's a small library with lots of functionality, accurately documented and
thoroughly tested. Good library naming conventions are not rigorously observed
Expand Down Expand Up @@ -46,19 +46,16 @@ INSTALL
~~~~~~~
Currently, this is only known to work on the following systems:

Linux-2.2/2.4 (Redhat 6.x/7.x, Debian 2.2r6/3.0r0)
Solaris 2.6/8
OpenBSD 2.9/3.1
FreeBSD 4.5
Linux 2.2/2.4 (intel, Redhat 6.x/7.x, Debian 2.2r6/3.0r0)
Solaris 2.6/8 (sparc, intel)
OpenBSD 2.9/3.1 (intel)
FreeBSD 4.5 (intel)
Mac OS X (Darwin) 10.3.2 (G4)

Compiling on Solaris 2.6 requires running conf/solaris6-cc (If you have the
Sun WorkShop C compiler) or conf/solaris6-gcc (If you have gcc) in the source
directory. If you have Solaris 8, run the conf/solaris8-[g]cc scripts
instead. Compiling on OpenBSD requires running conf/openbsd. Compiling on
FreeBSD requires running conf/freebsd. It is ready to compile on Linux as
distributed so it is not necessary to run conf/linux.
For these systems, just run the "config" script in the source directory. It
will run the appropriate script in the "conf" directory for the current host.

There isn't a real configure script yet so you will no doubt encounter
Note: There isn't a real configure script yet so you will no doubt encounter
problems on other systems. An ISO C and POSIX/XPG4 environment will help
greatly. If your system doesn't have snprintf(3), GNU getopt_long(3),
vsscanf(3), strcasecmp(3), strncasecmp(3), strlcpy(3) or strlcat(3),
Expand Down Expand Up @@ -87,17 +84,17 @@ First, uninstall any previous version:

libslack-config --uninstall

Or:
or:

cd /usr/local/src/libslack-0.5
cd /usr/local/src/libslack-0.5.1
make uninstall

To build and test:

tar xzf libslack-0.5.1.tar.gz
cd libslack-0.5.1
conf/<your-system> # i.e. linux, solaris[68]-[g]cc, openbsd, freebsd
make # must be gnu make
tar xzf libslack-0.5.2.tar.gz
cd libslack-0.5.2
./config # iff linux, solaris, openbsd, freebsd or macosx
make # must be gnu make
make test

To install libslack and its manpages (into /usr/local by default):
Expand Down Expand Up @@ -127,24 +124,34 @@ BINARY PACKAGES
~~~~~~~~~~~~~~~
To install from the RPM binary package (into /usr by default):

rpm -i libslack-0.5.1-1.i386.rpm
rpm -i libslack-0.5.2-1.i386.rpm

To install from the RPM binary package into somewhere other than /usr:

rpm --prefix=/usr/local -i libslack-0.5.1-1.i386.rpm

To install from the (relocatable) Solaris8 binary package (into /opt/libslack):

gunzip libslack-0.5.1.sun4u.pkg.gz
pkgadd -d libslack-0.5.1.sun4u.pkg
rpm --prefix=/usr/local -i libslack-0.5.2-1.i386.rpm

Install from the OpenBSD binary package (into /usr/local):

pkg_add libslack-0.5.1-obsd-i386.tar.gz
pkg_add libslack-0.5.2-obsd-i386.tar.gz

Install from the FreeBSD binary package (into /usr/local):

pkg_add libslack-0.5.1-fbsd-i386.tar.gz
pkg_add libslack-0.5.2-fbsd-i386.tar.gz

Install from the Mac OS X binary package (into /usr/local):

cd /usr/local
tar xzf /usr/local/src/daemon-0.6.2-osx-powerpc.tar.gz

To install from the (relocatable) Solaris8 binary package (into /opt/libslack):

gunzip libslack-0.5.2.sun4u.pkg.gz
pkgadd -d libslack-0.5.2.sun4u.pkg

or:

gunzip libslack-0.5.2.i86pc.pkg.gz
pkgadd -d libslack-0.5.2.i86pc.pkg

REQUIREMENTS
~~~~~~~~~~~~
Expand All @@ -159,6 +166,30 @@ Requires libpthread. See INSTALL.

PLATFORM NOTES
~~~~~~~~~~~~~~
Redhat9
~~~~~~~
Redhat 9 has some very disturbing bugs that affect libslack client
applications. If a program that links against libpthread calls fork(), and
the child process calls abort(), the parent process will also be killed. In
other words, Redhat9 behaves as though the two processes are merely two
threads in the same program. This was noticed when executing the tests for
the daemon and err modules. Calling the dump() function in a child process
killed the test program as well.

The other disturbing bug turned up in the tests for the net module. When
executing the net_expect() and net_send() functions, with the test program
being the server and a child process being the client, data written by the
server/parent process to the socket descriptor connected to the client/child
process never made it to the client. It appears as terminal output instead
and the client times out waiting for it. All other tests involving the
client/server functions worked as expected. It makes no sense.

I don't think that there is anything I can do to work around these bugs.
Please correct me if I am wrong.

Note: I have found one Redhat9 system where everything worked properly but
two others where they did not. You might get lucky.

Linux
~~~~~
Linux 2.2 always returns 0.0.0.0 on getsockopt(IP_MULTICAST_IF) so
Expand Down Expand Up @@ -204,10 +235,35 @@ FreeBSD
Has the same UNIX domain datagram socket problem as Solaris.
Can't lock fifos so fifo_open() can't guarantee a unique reader.

Mac OS X
~~~~~~~~
Probably has the same UNIX domain datagram problem as Solaris.

SWIG
~~~~
SWIG generates wrappers to make C/C++ libraries accessible to various other
languages. The supported languages include Guile, Java, Perl, PHP, Python,
Ruby, Tcl and more.

To generate the SWIG input file for libslack, install libslack and then
(from the libslack source directory):

make slack.swig

Use this SWIG file to generate wrappers for the languages of your choice.

Note: The C code that SWIG generates (slack_wrap.c) will contain a line that
includes lib.h. This include *must* be moved to the top of the file. This is
necessary to set up the system headers properly. It will *not* compile
unless you do this.

And don't forget to use `libslack-config --cflags` when compiling it and
`libslack-config --libs` when linking it.

COPYING
~~~~~~~
libslack - A UNIX/C library of general utilities for programmers with Slack
Copyright (C) 1999-2002 raf <[email protected]>
Copyright (C) 1999-2004 raf <[email protected]>

This library is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
Expand Down Expand Up @@ -239,7 +295,7 @@ All rights reserved.
documentation and/or other materials provided with the distribution.
3. The name of the author may not be used to endorse or promote products
derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
Expand Down Expand Up @@ -413,7 +469,7 @@ HISTORY
- Added strlcpy(), strlcat(), strcasecmp() and strncasecmp() to str module
- Renamed conf/solaris to solaris-gcc and added solaris-cc for sun workshop
- Added support for root and user pidfiles in separate directories
- Added make rpm rpm-daemon rpm-slack (with Edward Avis [email protected])
- Added make rpm rpm-daemon rpm-slack (with Edward Avis [email protected])
- Added installation of manpages for each function (link to module manpage)
- Added libslack(3) overview manpage
- Added list_break(), map_break()
Expand Down Expand Up @@ -543,22 +599,46 @@ HISTORY
- Added libslack-config --upgrade option
- Added lame ./config script that just calls existing lame conf/* scripts

0.5.2 (20040102)
- Fixed API bug: <slack/lib.h> didn't include <slack/coproc.h>
- Fixed bug: -lm wasn't in `libslack-config --libs` on Solaris
- Changed daemon_path_is_safe() to give an explanation when unsafe
- Fixed bug: reset agent state to IDLE when interrupted ([email protected])
- Trim unquoted leading spaces from property values (with [email protected])
- Also trim only unquoted trailing spaces from property names
- Added tools/migrate-properties utility (preserves old propfile behaviour)
- Fixed bug: ownership partially lost in map_resize (with [email protected])
- Fixed bug: mem_resize was broken since libslack-0.4 ([email protected])
- Fixed DOC bug: stated the importance of including <slack/lib.h> first
- Added sections to libslack(3) features list (coproc+pty, low level api)
- Fixed bug: if select() failed (unlikely), coproc wasn't closed properly
- Fixed bug: when tty_raw() failed (unlikely), it returned the wrong value
- Added many examples to the manpages (there are now 91 runnable examples)
- Added tools/check-examples to verify that all examples work
- Fixed bug: str_fgetline() returned empty string rather than null on eof
- Fixed bug: cstrstr() didn't always work due to a typo
- Added sections to libslack(3) features list (documentation, testing)
- Added intel solaris8 binary package
- Ported to Mac OS X (Darwin) 10.3.2
- Added make osx osx-daemon osx-slack (macosx binary packages)
- Dropped support for K&R clients (suggested by [email protected])
- Added hsort_closure(3) (suggested by [email protected])
- Added make slack.swig (generate a SWIG input file for libslack)

TODO
~~~~
- Port to Mac OS X (again), NetBSD, Cygwin[?]
- Port to NetBSD, Cygwin[?]
- Decouple memory type and allocation strategy from List/Map/String code
- Check out/incorporate Kiem-Phong Vo's error handling architecture [?]
- Use autoconf and libtool (then add devel/static/dynamic packages)
- Add sub libraries (str/list/map, daemon/net/agent, mtdisc, memdisc) [?]
- Add debian source package creation for libslack (after libtool)
- Make sure net module interoperates with openssl
- Add scan/print money/numbers/dates/times according to a locale [?]
- Add bitstring module
- Add bitstring module [?]
- Write Scalable Makefiles paper
- Write fast/slow lane paper (requires access to a gigabit network)
- Add more examples to the manpages

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
URL: http://libslack.org/
Date: 20020916
Date: 20040102
Author: raf <[email protected]>
Loading

0 comments on commit a5e65f0

Please sign in to comment.