Skip to content

Commit

Permalink
0.4 (20010215)
Browse files Browse the repository at this point in the history
- Fixed memory usage bugs
- Changed net server/client functions to use service name else port number
- Fixed security bug: daemon_file_is_safe() wasn't following symlinks (doh!)
- Renamed daemon_file_is_safe() to daemon_path_is_safe()
- Added daemon_absolute_path() to daemon module
- Added memory pool functions to mem module
- Fixed bug: optional option arguments were handled in dodgy C
- Made supplied snprintf() POSIX compliant (was using getpagesize())
- Removed conf module (Added daemon_parse_config() to daemon module)
- Removed net_chat(), rfc822_localtime(), rfc822_gmtime() (not useful enough)
- Added secure memory/pool functions to mem module
- Fixed Makefile bug: $(CCFLAGS) for daemon and libslack weren't separate
- Added fgetline() to fifo module (reads a line with any line ending)
- Added str_fgetline() to str module (like fgetline but handles any length)
- Renamed fifo module to fio
- Fixed Makefile bug: wasn't uninstalling everything properly
- Changed net_send() to take a timeout argument like next_expect() does
- 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 ed at membled.com)
- Added installation of manpages for each function (link to module manpage)
- Added libslack(3) overview manpage
- Added list_break(), map_break()
- Renamed assert() to check() for obvious reasons
- Renamed re funcs in str module: s/regex/regexpr/g
- Added thread module and made everything MT-Safe or MT-Disciplined
- Added relative index/range semantics to string functions
- Added make deb deb-daemon deb-slack (debian binary packages)
- Added make pkg pkg-daemon pkg-slack (solaris binary packages)
- Added setsockopt(SO_REUSEADDR) for net servers
- Changed net server/client API to allow optional setsockopt(RCVBUF/SNDBUF)
- Added REFERENCES section to README file
- Stopped net_expect/net_send from interfering with SIGALRM/alarm/setitimer
- Added read_timeout(), write_timeout() and rw_timeout() to fio module
- Changed net_read() and net_write() to take a timeout argument
- Added '?' field size specifier to unpack() (for packet length fields)
- Added libslack-config administration utility
- Renamed sockaddr typedef to sockaddr_t
- Changed net_client to take a timeout parameter
- Fixed fd leak in error handling code in net server/client functions
- Fixed bug: str_regsub() didn't handle empty string matches at all
- Changed str_regexpr_split() to take cflags and eflags arguments
- Changed all *_destroy macros to functions that take address of pointer
- Changed mem_resize macro so client must explicitly provide address of mem
- Changed all *_destroy_t typedefs to *_release_t
- Added make [un]install-{daemon|slack}-html (not part of make [un]install)
- Temporarily removed snprintf module (not MT-Safe, not essential)
- Merged lognames module into msg module
- Merged opt module into prog module
- Renamed _* functions in err module to *f (not ANSI compliant)
- Removed MANIFEST
  • Loading branch information
raforg committed Feb 15, 2001
1 parent 1cc230f commit 6d0e9d6
Show file tree
Hide file tree
Showing 59 changed files with 14,032 additions and 6,736 deletions.
53 changes: 0 additions & 53 deletions MANIFEST

This file was deleted.

142 changes: 71 additions & 71 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#
# libslack - http://libslack.org/
#
# Copyright (C) 1999, 2000 raf <[email protected]>
# Copyright (C) 1999-2001 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,123 +19,123 @@
# or visit http://www.gnu.org/copyleft/gpl.html
#

# 20000902 raf <[email protected]>
# 20010215 raf <[email protected]>

CC := gcc
# CC := cc
TEST := /usr/bin/test
PREFIX := /usr/local
APP_INSDIR := $(PREFIX)/bin
LIB_INSDIR := $(PREFIX)/lib
MAN_INSDIR := $(PREFIX)/man
HDR_INSDIR := $(PREFIX)/include
DATA_INSDIR := $(PREFIX)/share
APP_MANSECT := 1
LIB_MANSECT := 3
APP_MANDIR := $(MAN_INSDIR)/man$(APP_MANSECT)
APP_CATDIR := $(MAN_INSDIR)/cat$(APP_MANSECT)
LIB_MANDIR := $(MAN_INSDIR)/man$(LIB_MANSECT)
LIB_CATDIR := $(MAN_INSDIR)/cat$(LIB_MANSECT)
APP_MANSECTNAME := User Commands
LIB_MANSECTNAME := C Library Functions - libslack

CCFLAGS += -O2 -Wall -pedantic
CCFLAGS += -O2
CCFLAGS += -Wall -pedantic

CLEAN_FILES += tags core Makefile.bak .makefile.bak MANIFEST pod2html-*
# CCFLAGS += -O

CLEAN_FILES += tags core Makefile.bak .makefile.bak pod2html-*

SLACK_IS_ROOT := 1
SLACK_SRCDIR := .
SLACK_INCDIRS := .
SLACK_LIBDIRS := .
include $(SLACK_SRCDIR)/macros.mk

.PHONY: all ready test man html install uninstall
.PHONY: all ready test man html install uninstall dist rpm deb pkg

all: ready $(ALL_TARGETS)
ready: $(READY_TARGETS)
test: ready $(TEST_TARGETS)
test: all $(TEST_TARGETS)
man: $(MAN_TARGETS)
html: $(HTML_TARGETS)
install: $(INSTALL_TARGETS)
install: all $(INSTALL_TARGETS)
uninstall: $(UNINSTALL_TARGETS)
dist: $(DIST_TARGETS)
rpm: $(RPM_TARGETS)
deb: $(DEB_TARGETS)
pkg: $(PKG_TARGETS)

.PHONY: help help-macros depend dep clean clobber distclean dist
.PHONY: help help-macros depend clean clobber distclean

help::
@echo "This makefile provides the following targets."
@echo
@echo "make help -- shows this list of targets"
@echo "make help-macros -- shows the values of all make macros"
@echo "make ready -- prepares the source directory for make"
@echo "make all -- makes $(SLACK_TARGET) (default)"
@echo "make test -- generates and performs library unit tests"
@echo "make man -- generates all manpages"
@echo "make html -- generates all manpages in html"
@echo "make install -- installs everything under $(PREFIX)"
@echo "make uninstall -- uninstalls everything"
@echo "make depend -- generates source dependencies using makedepend"
@echo "make tags -- generates a tags file using ctags"
@echo "make clean -- removes object files, tags, core and Makefile.bak"
@echo "make clobber -- same as clean but also removes $(SLACK_TARGET) and tests"
@echo "make distclean -- same as clobber but also removes source dependencies"
@echo "make MANIFEST -- creates the MANIFEST file"
@echo "make dist -- creates the distribution: ../$(SLACK_DIST)"
@echo
@echo "This makefile provides the following targets."; \
echo; \
echo " help -- shows this list of targets"; \
echo " help-macros -- shows the values of all make macros"; \
echo " all -- makes $(SLACK_TARGET) (default)"; \
echo " ready -- prepares the source directory for compilation"; \
echo " test -- makes and runs library unit tests"; \
echo " man -- generates all manpages"; \
echo " html -- generates all manpages in html"; \
echo " install -- installs everything under $(PREFIX)"; \
echo " uninstall -- uninstalls everything from $(PREFIX)"; \
echo " depend -- generates source dependencies using makedepend"; \
echo " tags -- generates a tags file using ctags"; \
echo " clean -- removes object files, tags, core and Makefile.bak"; \
echo " clobber -- same as clean but also removes $(SLACK_TARGET) and tests"; \
echo " distclean -- same as clobber but also removes source dependencies"; \
echo " dist -- makes the distribution: ../$(SLACK_DIST)"; \
echo " rpm -- makes source and binary rpm packages"; \
echo " deb -- makes binary debian package"; \
echo " pkg -- makes binary solaris package"; \
echo

help-macros::
@echo "CC = $(CC)"
@echo "TEST = $(TEST)"
@echo "PREFIX = $(PREFIX)"
@echo "APP_INSDIR = $(APP_INSDIR)"
@echo "LIB_INSDIR = $(LIB_INSDIR)"
@echo "MAN_INSDIR = $(MAN_INSDIR)"
@echo "HDR_INSDIR = $(HDR_INSDIR)"
@echo "APP_MANSECT = $(APP_MANSECT)"
@echo "LIB_MANSECT = $(LIB_MANSECT)"
@echo "APP_MANDIR = $(APP_MANDIR)"
@echo "APP_CATDIR = $(APP_CATDIR)"
@echo "LIB_MANDIR = $(LIB_MANDIR)"
@echo "LIB_CATDIR = $(LIB_CATDIR)"
@echo "TAG_FILES = $(TAG_FILES)"
@echo "DEPEND_CFILES = $(DEPEND_CFILES)"
@echo "DEPEND_HFILES = $(DEPEND_HFILES)"
@echo "CCFLAGS = $(CCFLAGS)"
@echo "READY_TARGETS = $(READY_TARGETS)"
@echo "ALL_TARGETS = $(ALL_TARGETS)"
@echo "TEST_TARGETS = $(TEST_TARGETS)"
@echo "MAN_TARGETS = $(MAN_TARGETS)"
@echo "HTML_TARGETS = $(HTML_TARGETS)"
@echo "INSTALL_TARGETS = $(INSTALL_TARGETS)"
@echo "UNINSTALL_TARGETS = $(UNINSTALL_TARGETS)"
@echo "CLEAN_FILES = $(CLEAN_FILES)"
@echo "CLOBBER_FILES = $(CLOBBER_FILES)"
@echo

MANIFEST:
@find . -name \* -print > MANIFEST
@echo "CC = $(CC)"; \
echo "TEST = $(TEST)"; \
echo "PREFIX = $(PREFIX)"; \
echo "APP_INSDIR = $(APP_INSDIR)"; \
echo "LIB_INSDIR = $(LIB_INSDIR)"; \
echo "MAN_INSDIR = $(MAN_INSDIR)"; \
echo "HDR_INSDIR = $(HDR_INSDIR)"; \
echo "DATA_INSDIR = $(DATA_INSDIR)"; \
echo "APP_MANSECT = $(APP_MANSECT)"; \
echo "LIB_MANSECT = $(LIB_MANSECT)"; \
echo "APP_MANDIR = $(APP_MANDIR)"; \
echo "LIB_MANDIR = $(LIB_MANDIR)"; \
echo "TAG_FILES = $(TAG_FILES)"; \
echo "DEPEND_CFILES = $(DEPEND_CFILES)"; \
echo "DEPEND_HFILES = $(DEPEND_HFILES)"; \
echo "CCFLAGS = $(CCFLAGS)"; \
echo "READY_TARGETS = $(READY_TARGETS)"; \
echo "ALL_TARGETS = $(ALL_TARGETS)"; \
echo "TEST_TARGETS = $(TEST_TARGETS)"; \
echo "MAN_TARGETS = $(MAN_TARGETS)"; \
echo "HTML_TARGETS = $(HTML_TARGETS)"; \
echo "INSTALL_TARGETS = $(INSTALL_TARGETS)"; \
echo "UNINSTALL_TARGETS = $(UNINSTALL_TARGETS)"; \
echo "CLEAN_FILES = $(CLEAN_FILES)"; \
echo "CLOBBER_FILES = $(CLOBBER_FILES)"; \
echo "DIST_TARGETS = $(DIST_TARGETS)"; \
echo "RPM_TARGETS = $(RPM_TARGETS)"; \
echo "DEB_TARGETS = $(DEB_TARGETS)"; \
echo "PKG_TARGETS = $(PKG_TARGETS)"; \
echo

tags: $(TAG_FILES)
@ctags $(TAG_FILES)

depend: ready $(DEPEND_CFILES) $(DEPEND_HFILES)
@makedepend $(SLACK_CPPFLAGS) $(DEPEND_CFILES)

# makedepend $(SLACK_CPPFLAGS) $(DEPEND_CFILES)

clean::
@rm -rf $(CLEAN_FILES)

clobber::
@rm -rf $(CLEAN_FILES) $(CLOBBER_FILES)

distclean:: clobber
@perl -pi -e 'last if /[D]O NOT DELETE/;' Makefile

dist: distclean MANIFEST
@src=`basename \`pwd\``; \
dst=$(SLACK_ID); \
cd ..; \
$(TEST) "$$src" != "$$dst" -a ! -e "$$dst" && ln -s $$src $$dst; \
tar chzf $(SLACK_DIST) $$dst; \
$(TEST) -L "$$dst" && rm -f $$dst; \
rm $$src/MANIFEST; \
tar tzf $$dst.tar.gz
@perl -pi -e 'last if /[D]O NOT DELETE/;' $(patsubst %, %/Makefile, $(SLACK_SRCDIR) $(SLACK_SUBDIRS))

include $(SLACK_SRCDIR)/rules.mk

Loading

0 comments on commit 6d0e9d6

Please sign in to comment.