xplc-0.3.13/0040755000204300020430000000000010331536343012737 5ustar pphaneufpphaneufxplc-0.3.13/CVS/0040755000204300020430000000000010331536003013363 5ustar pphaneufpphaneufxplc-0.3.13/CVS/Entries0100644000204300020430000000124310331536003014714 0ustar pphaneufpphaneuf/.cvsignore/1.10/Fri May 21 20:21:34 2004// /CREDITS/1.3/Thu Apr 8 19:06:14 2004// /Doxyfile/1.4/Sat Dec 6 01:04:21 2003// /INSTALL/1.3/Fri Mar 29 23:36:00 2002// /LICENSE/1.1/Thu Jun 7 01:08:12 2001// /TODO/1.5/Sat Nov 15 05:19:52 2003// /install-sh/1.1/Fri Jan 28 00:24:43 2000// /uuid2cdef.pl/1.1/Mon Oct 28 23:37:55 2002// D/VisualC++//// D/config//// D/debian//// D/dist//// D/include//// D/tests//// D/xplc//// D/xplc-cxx//// D/examples//// /Makefile/1.14/Tue Jul 19 22:18:49 2005// /config.guess/1.4/Mon Oct 31 22:33:26 2005// /config.sub/1.4/Mon Oct 31 22:33:26 2005// D/uuid//// /NEWS/1.39/Mon Oct 31 23:18:29 2005// /configure.ac/1.41/Mon Oct 31 23:19:35 2005// xplc-0.3.13/CVS/Repository0100644000204300020430000000000510075346772015476 0ustar pphaneufpphaneufxplc xplc-0.3.13/CVS/Root0100644000204300020430000000006510331536343014236 0ustar pphaneufpphaneuf:pserver:anonymous@cvs.sourceforge.net:/cvsroot/xplc xplc-0.3.13/VisualC++/0040755000204300020430000000000010102606171014424 5ustar pphaneufpphaneufxplc-0.3.13/VisualC++/CVS/0040755000204300020430000000000010102606171015057 5ustar pphaneufpphaneufxplc-0.3.13/VisualC++/CVS/Repository0100644000204300020430000000001710075346773017176 0ustar pphaneufpphaneufxplc/VisualC++ xplc-0.3.13/VisualC++/CVS/Entries0100644000204300020430000000041410102606171016407 0ustar pphaneufpphaneuf/testobj.vcproj/1.5/Thu Jun 24 18:06:23 2004// /tests.vcproj/1.6/Thu Jun 24 18:06:23 2004// /xplc-cxx.vcproj/1.2/Fri Jun 25 12:04:14 2004// /xplc.def/1.1/Thu Jun 24 18:06:23 2004// /xplc.sln/1.4/Thu Jun 24 18:06:23 2004// /xplc.vcproj/1.7/Sat Jul 31 03:05:29 2004// D xplc-0.3.13/VisualC++/CVS/Root0100644000204300020430000000006510331536343015732 0ustar pphaneufpphaneuf:pserver:anonymous@cvs.sourceforge.net:/cvsroot/xplc xplc-0.3.13/VisualC++/testobj.vcproj0100644000204300020430000000745010066614037017337 0ustar pphaneufpphaneuf xplc-0.3.13/VisualC++/tests.vcproj0100644000204300020430000001051410066614037017022 0ustar pphaneufpphaneuf xplc-0.3.13/VisualC++/xplc-cxx.vcproj0100644000204300020430000000627410067012276017434 0ustar pphaneufpphaneuf xplc-0.3.13/VisualC++/xplc.def0100644000204300020430000000005610066614037016061 0ustar pphaneufpphaneufLIBRARY xplc EXPORTS XPLC_getServiceManager xplc-0.3.13/VisualC++/xplc.sln0100644000204300020430000000530510066614037016121 0ustar pphaneufpphaneufMicrosoft Visual Studio Solution File, Format Version 8.00 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "xplc", "xplc.vcproj", "{B815FC75-59A0-44CD-A9AD-F13838091045}" ProjectSection(ProjectDependencies) = postProject {F82BC50C-DF45-4DD6-BC1D-84CCD45DD171} = {F82BC50C-DF45-4DD6-BC1D-84CCD45DD171} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testobj", "testobj.vcproj", "{579912D1-047C-4A7A-9532-5E31FC7A812F}" ProjectSection(ProjectDependencies) = postProject {F82BC50C-DF45-4DD6-BC1D-84CCD45DD171} = {F82BC50C-DF45-4DD6-BC1D-84CCD45DD171} {B815FC75-59A0-44CD-A9AD-F13838091045} = {B815FC75-59A0-44CD-A9AD-F13838091045} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tests", "tests.vcproj", "{45151968-D0DD-4275-AD6B-66DE04B28F19}" ProjectSection(ProjectDependencies) = postProject {F82BC50C-DF45-4DD6-BC1D-84CCD45DD171} = {F82BC50C-DF45-4DD6-BC1D-84CCD45DD171} {B815FC75-59A0-44CD-A9AD-F13838091045} = {B815FC75-59A0-44CD-A9AD-F13838091045} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "xplc-cxx", "xplc-cxx.vcproj", "{F82BC50C-DF45-4DD6-BC1D-84CCD45DD171}" ProjectSection(ProjectDependencies) = postProject EndProjectSection EndProject Global GlobalSection(SolutionConfiguration) = preSolution Debug = Debug Release = Release EndGlobalSection GlobalSection(ProjectConfiguration) = postSolution {B815FC75-59A0-44CD-A9AD-F13838091045}.Debug.ActiveCfg = Debug|Win32 {B815FC75-59A0-44CD-A9AD-F13838091045}.Debug.Build.0 = Debug|Win32 {B815FC75-59A0-44CD-A9AD-F13838091045}.Release.ActiveCfg = Release|Win32 {B815FC75-59A0-44CD-A9AD-F13838091045}.Release.Build.0 = Release|Win32 {579912D1-047C-4A7A-9532-5E31FC7A812F}.Debug.ActiveCfg = Debug|Win32 {579912D1-047C-4A7A-9532-5E31FC7A812F}.Debug.Build.0 = Debug|Win32 {579912D1-047C-4A7A-9532-5E31FC7A812F}.Release.ActiveCfg = Release|Win32 {579912D1-047C-4A7A-9532-5E31FC7A812F}.Release.Build.0 = Release|Win32 {45151968-D0DD-4275-AD6B-66DE04B28F19}.Debug.ActiveCfg = Debug|Win32 {45151968-D0DD-4275-AD6B-66DE04B28F19}.Debug.Build.0 = Debug|Win32 {45151968-D0DD-4275-AD6B-66DE04B28F19}.Release.ActiveCfg = Release|Win32 {45151968-D0DD-4275-AD6B-66DE04B28F19}.Release.Build.0 = Release|Win32 {F82BC50C-DF45-4DD6-BC1D-84CCD45DD171}.Debug.ActiveCfg = Debug|Win32 {F82BC50C-DF45-4DD6-BC1D-84CCD45DD171}.Debug.Build.0 = Debug|Win32 {F82BC50C-DF45-4DD6-BC1D-84CCD45DD171}.Release.ActiveCfg = Release|Win32 {F82BC50C-DF45-4DD6-BC1D-84CCD45DD171}.Release.Build.0 = Release|Win32 EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution EndGlobalSection GlobalSection(ExtensibilityAddIns) = postSolution EndGlobalSection EndGlobal xplc-0.3.13/VisualC++/xplc.vcproj0100644000204300020430000001531310102606171016617 0ustar pphaneufpphaneuf xplc-0.3.13/config/0040755000204300020430000000000010331536343014204 5ustar pphaneufpphaneufxplc-0.3.13/config/CVS/0040755000204300020430000000000010331515666014644 5ustar pphaneufpphaneufxplc-0.3.13/config/CVS/Repository0100644000204300020430000000001410075346773016744 0ustar pphaneufpphaneufxplc/config xplc-0.3.13/config/CVS/Entries0100644000204300020430000000045710331515666016203 0ustar pphaneufpphaneuf/.cvsignore/1.2/Fri Jan 28 23:36:02 2000// /exports.map/1.2/Mon Dec 22 22:19:02 2003// /libdl.supp/1.1/Tue Jul 20 14:22:35 2004// /cvs-users/1.2/Tue Aug 17 21:10:52 2004// /config.mk.in/1.41/Mon Oct 31 22:33:26 2005// /rules.mk/1.49/Mon Oct 31 22:33:26 2005// /vars.mk/1.41/Mon Oct 31 22:33:26 2005// D xplc-0.3.13/config/CVS/Root0100644000204300020430000000006510331536343015503 0ustar pphaneufpphaneuf:pserver:anonymous@cvs.sourceforge.net:/cvsroot/xplc xplc-0.3.13/config/.cvsignore0100644000204300020430000000002507044423742016203 0ustar pphaneufpphaneufdepends.mk config.mk xplc-0.3.13/config/libdl.supp0100644000204300020430000000042310077225253016201 0ustar pphaneufpphaneuf{ loading_executable_error Memcheck:Leak fun:malloc fun:realloc fun:_dl_new_object fun:_dl_map_object_from_fd } { loading_nonelf_error Memcheck:Leak fun:malloc fun:_dl_map_object_internal fun:dl_open_worker fun:_dl_catch_error_internal } xplc-0.3.13/config/config.mk.in0100644000204300020430000000313610331515666016414 0ustar pphaneufpphaneuf# @configure_input@ # # XPLC - Cross-Platform Lightweight Components # Copyright (C) 2000-2002, Pierre Phaneuf # Copyright (C) 2002, Net Integration Technologies, Inc. # # This library is free software; you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as # published by the Free Software Foundation; either version 2.1 of the # License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 # USA # # $Id: config.mk.in,v 1.41 2005/10/26 19:19:28 sfllaw Exp $ # set variables from the configure script CC=@CC@ CFLAGS+=@CFLAGS@ CXX=@CXX@ CXXFLAGS+=@CXXFLAGS@ LDFLAGS+=@LDFLAGS@ pc_version:=@pc_version@ xplcdir_version:=@xplcdir_version@ lib_prefix_version:=@lib_prefix_version@ enable_loader:=@enable_loader@ with_dlopen:=@with_dlopen@ so_style:=@so_style@ with_uuid:=@with_uuid@ with_uuid_static:=@with_uuid_static@ prefix:=@prefix@ exec_prefix:=@exec_prefix@ includedir:=@includedir@ libdir:=@libdir@ bindir:=@bindir@ mandir:=@mandir@ INSTALL:=@INSTALL@ INSTALL_PROGRAM:=@INSTALL_PROGRAM@ INSTALL_DATA:=@INSTALL_DATA@ PACKAGE_TARNAME:=@PACKAGE_TARNAME@ PACKAGE_VERSION:=@PACKAGE_VERSION@ LN_S:=@LN_S@ LIBS:=@LIBS@ CVS2CL:=@CVS2CL@ xplc-0.3.13/config/cvs-users0100644000204300020430000000020310110472134016041 0ustar pphaneufpphaneufpphaneuf:'Pierre Phaneuf ' slajoie:'Stéphane Lajoie ' sfllaw:'Simon Law ' xplc-0.3.13/config/exports.map0100644000204300020430000000010707771666726016431 0ustar pphaneufpphaneuf{ global: XPLC_Module; XPLC_getServiceManager; local: *; }; xplc-0.3.13/config/rules.mk0100644000204300020430000001142310331515666015672 0ustar pphaneufpphaneuf# XPLC - Cross-Platform Lightweight Components # Copyright (C) 2000-2003, Pierre Phaneuf # Copyright (C) 2002, Net Integration Technologies, Inc. # # This library is free software; you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as # published by the Free Software Foundation; either version 2.1 of the # License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 # USA # # $Id: rules.mk,v 1.49 2005/10/21 15:00:44 sfllaw Exp $ .PHONY: ChangeLog dist dustclean clean distclean realclean installdirs install uninstall doxygen clean-doxygen examples %.o: %.c @$(COMPILE.c) -M -E $< | sed -e 's|^.*:|$@:|' > $(dir $@).$(notdir $(@:.o=.d)) $(COMPILE.c) $(OUTPUT_OPTION) $< %.o: %.cpp @$(COMPILE.cpp) -M -E $< | sed -e 's|^.*:|$@:|' > $(dir $@).$(notdir $(@:.o=.d)) $(COMPILE.cpp) $(OUTPUT_OPTION) $< %.s: %.cpp @$(COMPILE.cpp) -M -E $< | sed -e 's|^.*:|$@:|' > $(dir $@).$(notdir $(@:.s=.d)) $(COMPILE.cpp) $(OUTPUT_OPTION) -S $< %: %.o $(LINK.cc) $^ $(LOADLIBES) $(LDLIBS) -o $@ lib%_s.a: lib%.a $(LN_S) -f $^ $@ %.a: $(AR) $(ARFLAGS) $@ $^ $(RANLIB) $@ %.so: $(LINK.cc) $(SHARED) $^ -o $@ %.dll: $(LINK.cc) $(SHARED) $^ -o $@ %.tar: % tar cf $@ $^ %.gz: % gzip -c9 $< > $@ %.bz2: % bzip2 -c9 $< > $@ examples: default $(MAKE) -C $@ .PHONY: $(DIST) $(DIST): ChangeLog README xplc.spec debian/control configure rm -rf $(DIST) tar cf - . | (mkdir $(DIST) && cd $(DIST) && tar xf -) $(MAKE) -C $(DIST) distclean for FILE in $$(find $(DIST) -name Root | grep CVS); do \ echo ':pserver:anonymous@cvs.sourceforge.net:/cvsroot/xplc' >$$FILE; \ done dist: default examples tests $(DIST).tar.gz @echo REMINDER: did you update the version number in configure.ac? @echo The NEWS file? The debian/changelog file? ChangeLog: rm -f ChangeLog ChangeLog.bak $(CVS2CL) --utc -U config/cvs-users doxygen: clean-doxygen doxygen README: dist/README.in configure.ac sed $< -e 's%@VERSION@%$(PACKAGE_VERSION)%g' > $@ xplc.spec: dist/xplc.spec.in configure.ac sed $< -e 's%@VERSION@%$(PACKAGE_VERSION)%g' > $@ debian/control: debian/control.in configure.ac sed $< -e 's%@VERSION@%$(PACKAGE_VERSION)%g' > $@ dustclean: -rm -rf $(wildcard $(DUSTCLEAN)) clean: dustclean -rm -rf $(wildcard $(CLEAN)) $(MAKE) -C examples clean distclean: clean -rm -rf $(wildcard $(DISTCLEAN)) realclean: distclean -rm -rf $(wildcard $(REALCLEAN)) installdirs: mkdir -p $(DESTDIR)$(bindir) mkdir -p $(DESTDIR)$(mandir)/man1 mkdir -p $(DESTDIR)$(libdir)/pkgconfig mkdir -p $(DESTDIR)$(libdir)$(xplcdir_version) mkdir -p $(DESTDIR)$(includedir)$(xplcdir_version)/xplc install: default installdirs $(INSTALL_PROGRAM) libxplc.so $(DESTDIR)$(libdir)/libxplc.so.$(PACKAGE_VERSION) $(INSTALL_DATA) libxplc.a $(DESTDIR)$(libdir)$(xplcdir_version) $(INSTALL_DATA) libxplc-cxx.a $(DESTDIR)$(libdir)$(xplcdir_version) $(INSTALL_DATA) dist/xplc.pc $(DESTDIR)$(libdir)/pkgconfig/xplc$(pc_version).pc $(INSTALL_DATA) $(wildcard include/xplc/*.h) $(DESTDIR)$(includedir)$(xplcdir_version)/xplc $(INSTALL_PROGRAM) uuid/bin/uuidgen $(DESTDIR)$(bindir) $(INSTALL_DATA) uuid/bin/uuidgen.1 $(DESTDIR)$(mandir)/man1 $(LN_S) $(lib_prefix_version)libxplc.so.$(PACKAGE_VERSION) $(DESTDIR)$(libdir)$(xplcdir_version)/libxplc.so $(LN_S) libxplc.a $(DESTDIR)$(libdir)$(xplcdir_version)/libxplc_s.a $(LN_S) uuidgen $(DESTDIR)$(bindir)/uuidcdef $(LN_S) uuidgen.1 $(DESTDIR)$(mandir)/man1/uuidcdef.1 uninstall: rm -f $(DESTDIR)$(libdir)/libxplc.so.$(PACKAGE_VERSION) $(DESTDIR)$(libdir)$(xplcdir_version)/libxplc.so rm -f $(DESTDIR)$(libdir)$(xplcdir_version)/libxplc.a $(DESTDIR)$(libdir)$(xplcdir_version)/libxplc_s.a rm -f $(DESTDIR)$(libdir)$(xplcdir_version)/libxplc-cxx.a rm -f $(DESTDIR)$(libdir)/pkgconfig/xplc$(pc_version).pc rm -f $(DESTDIR)$(bindir)/uuidgen $(DESTDIR)$(bindir)/uuidcdef rm -f $(DESTDIR)$(mandir)/man1/uuidgen.1 rm -f $(DESTDIR)$(mandir)/man1/uuidcdef.1 rm -rf $(DESTDIR)$(includedir)$(xplcdir_version)/xplc ifneq ($(xplcdir_version),) rm -rf $(DESTDIR)$(libdir)$(xplcdir_version) rm -rf $(DESTDIR)$(includedir)$(xplcdir_version) endif ifeq ($(filter-out $(SIMPLETARGETS),$(MAKECMDGOALS)),$(MAKECMDGOALS)) config/config.mk dist/xplc.pc: config/config.mk.in dist/xplc.pc.in configure @echo "Please run './configure'." @exit 1 configure include/xplc/autoconf.h.in: configure.ac autoconf autoheader -include $(DEPFILES) /dev/null endif xplc-0.3.13/config/vars.mk0100644000204300020430000000423310331515666015514 0ustar pphaneufpphaneuf# XPLC - Cross-Platform Lightweight Components # Copyright (C) 2000-2002, Pierre Phaneuf # Copyright (C) 2002, Net Integration Technologies, Inc. # # This library is free software; you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as # published by the Free Software Foundation; either version 2.1 of the # License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 # USA # # $Id: vars.mk,v 1.41 2005/10/21 13:08:27 sfllaw Exp $ DEPFILES:=$(shell find . -name '.*.d') DUSTCLEAN+=$(shell find . -name '*~' -o -name '.\#*') CLEAN+=$(shell find . -name '*.o') libxplc.so* $(DEPFILES) $(addprefix debian/,$(shell cat debian/.cvsignore | grep -v control)) autom4te.cache xplc-[0-9]* DISTCLEAN+=config/config.mk include/autoconf.h ChangeLog.bak REALCLEAN+=ChangeLog include/autoconf.h.in debian/control SIMPLETARGETS+=ChangeLog clean dustclean realclean distclean doxygen clean-doxygen # Function that returns "even" or "odd", depending on the value passed. oddeven = $(filter even odd,$(foreach d,0 2 4 6 8,$(1:%$d=even)) $(foreach d,1 3 5 7 9,$(1:%$d=odd))) VERSION_MAJOR:=$(word 1,$(subst ., ,$(PACKAGE_VERSION))) VERSION_MINOR:=$(word 2,$(subst ., ,$(PACKAGE_VERSION))) VERSION_PATCH:=$(word 3,$(subst ., ,$(PACKAGE_VERSION))) DIST=$(PACKAGE_TARNAME)-$(PACKAGE_VERSION) # The 'S' option to 'ar' seems to cause problem on Solaris? #ARFLAGS=rcS ARFLAGS=rc RANLIB=ranlib CXXFLAGS+=-pipe -Iinclude # Ensure CVS2CL is there ifeq ("$(CVS2CL)", "no") CVS2CL=$(error Please install cvs2cl) endif ifeq ("$(so_style)", "darwin") SHARED=-bundle endif ifeq ("$(so_style)", "sysv") SONAMEOPT=-Wl,-h SHARED=-shared $(if $(SONAME),$(SONAMEOPT)$(SONAME)) -Wl,-z,defs,--version-script=config/exports.map endif xplc-0.3.13/debian/0040755000204300020430000000000010331523270014154 5ustar pphaneufpphaneufxplc-0.3.13/debian/CVS/0040755000204300020430000000000010331515666014621 5ustar pphaneufpphaneufxplc-0.3.13/debian/CVS/Repository0100644000204300020430000000001410075346773016721 0ustar pphaneufpphaneufxplc/debian xplc-0.3.13/debian/CVS/Entries0100644000204300020430000000101010331515666016142 0ustar pphaneufpphaneuf/libxplc.install/1.1/Fri Nov 14 21:26:47 2003// /libxplc-dev.install/1.3/Wed Oct 6 03:52:28 2004// /source.lintian-overrides/1.1/Tue Oct 5 22:30:25 2004// /libxplc-dev.examples/1.1/Thu Oct 7 19:42:52 2004// /.cvsignore/1.4/Mon Oct 31 22:33:26 2005// /changelog/1.22/Mon Oct 31 22:33:26 2005// /control.in/1.5/Mon Oct 31 22:33:26 2005// /copyright/1.3/Mon Oct 31 22:33:26 2005// /rules/1.6/Mon Oct 31 22:33:26 2005// /uuidcdef.install/1.1/Fri Oct 21 16:23:40 2005// /uuidcdef.manpages/1.1/Fri Oct 21 16:23:40 2005// D xplc-0.3.13/debian/CVS/Root0100644000204300020430000000006510331536343015460 0ustar pphaneufpphaneuf:pserver:anonymous@cvs.sourceforge.net:/cvsroot/xplc xplc-0.3.13/debian/libxplc-dev.install0100644000204300020430000000020310130665774017762 0ustar pphaneufpphaneufdebian/tmp/usr/include/* debian/tmp/usr/lib/xplc-*/*.a debian/tmp/usr/lib/xplc-*/libxplc.so debian/tmp/usr/lib/pkgconfig/xplc-*.pc xplc-0.3.13/debian/.cvsignore0100644000204300020430000000016710331515666016167 0ustar pphaneufpphaneuf*.debhelper control compat files libxplc libxplc-dev uuidcdef.substvars stamp-autotools-files stamp-makefile-build tmp xplc-0.3.13/debian/changelog0100644000204300020430000000617010331515666016041 0ustar pphaneufpphaneufxplc (0.3.13-1.1) NONE; urgency=low * Unofficial build from CVS. -- J. Random Hacker Sat, 22 Oct 2005 00:00:00 -0000 xplc (0.3.13-1) unstable; urgency=low * New upstream release. - Includes /usr/bin/uuidcdef. (Closes: Bug#310755) * Built for G++ 4.0. -- Simon Law Fri, 21 Oct 2005 09:48:37 -0400 xplc (0.3.11-1) unstable; urgency=low * New Upstream release. (Closes: #286505) * Acknowledge NMU. (Closes: #290424) -- James Morrison Tue, 22 Mar 2005 22:57:10 -0500 xplc (0.3.10-3.1) unstable; urgency=low * Non-maintainer upload. * Fix for int size issues that break building on 64-bit platforms; not release-critical for this package, but is holding up RC bugfixes for packages that reverse-depend on xplc. Thanks to Kurt Roeckx for the patch. (Closes: #286505) * Invoke ldconfig as /sbin/ldconfig, fixing build failures when /sbin is not part of the path (as is the case on many third-party build systems). Closes: #290424 -- Steve Langasek Tue, 18 Jan 2005 03:57:10 -0800 xplc (0.3.10-3) unstable; urgency=low * Add a Build-Depends for debhelper, which I though cdbs pulled in automatically. (Closes: Bug#283884) -- Simon Law Thu, 2 Dec 2004 07:52:49 -0500 xplc (0.3.10-2) unstable; urgency=low * Install examples into libxplc-dev. -- Simon Law Thu, 07 Oct 2004 15:02:12 -0400 xplc (0.3.10-1) unstable; urgency=low * New upstream release. (Closes: Bug#281786) * New maintainer. * Renamed libxplc and libxplc-dev to reflect that they have unstable API and ABIs. -- Simon Law Mon, 04 Oct 2004 18:45:49 -0400 xplc (0.3.9-1) unstable; urgency=low * New upstream release. -- Pierre Phaneuf Mon, 27 Sep 2004 19:25:31 +0000 xplc (0.3.8-1) unstable; urgency=low * New upstream release. -- Pierre Phaneuf Tue, 20 Jul 2004 21:32:32 +0000 xplc (0.3.7-1) unstable; urgency=low * New upstream release. -- Pierre Phaneuf Thu, 1 Jul 2004 20:37:52 +0000 xplc (0.3.6-1) unstable; urgency=low * New upstream release. -- Pierre Phaneuf Fri, 25 Jun 2004 18:50:16 +0000 xplc (0.3.5-1) unstable; urgency=low * New upstream release. -- Pierre Phaneuf Fri, 21 May 2004 20:27:00 +0000 xplc (0.3.4-1) unstable; urgency=low * New upstream release. -- Pierre Phaneuf Wed, 7 Apr 2004 15:03:24 -0400 xplc (0.3.3-1) unstable; urgency=low * New upstream release. -- Pierre Phaneuf Sat, 20 Mar 2004 15:00:58 -0500 xplc (0.3.2-1) unstable; urgency=low * New upstream release. -- Pierre Phaneuf Fri, 9 Jan 2004 10:01:00 -0500 xplc (0.3.1-1) unstable; urgency=low * New upstream release. * Made the libxplc-dev package depend on the libxplc package. -- Pierre Phaneuf Fri, 12 Dec 2003 16:18:23 -0500 xplc (0.3.0-1) unstable; urgency=low * Package xplc. -- James Morrison Fri, 24 Oct 2003 17:48:36 -0400 xplc-0.3.13/debian/rules0100755000204300020430000000250010331515666015240 0ustar pphaneufpphaneuf#!/usr/bin/make -f include /usr/share/cdbs/1/rules/debhelper.mk include /usr/share/cdbs/1/class/autotools.mk # Specify the 'make check' target DEB_MAKE_CHECK_TARGET := tests # Determine the version of XPLC automatically PKG_VERSION := $(shell awk -F, '/AC_INIT/{print $$2}' configure.ac \ | sed 's/[ ]//g') # Don't install the CVS/ and .cvsignore from the examples DEB_INSTALL_EXAMPLES_libxplc$(PKG_VERSION)-dev := -XCVS -X.cvsignore # Make sure the install files are in the right place build/libxplc$(PKG_VERSION):: cp -f debian/libxplc.install debian/libxplc$(PKG_VERSION).install cleanbuilddir/libxplc$(PKG_VERSION):: rm -f debian/libxplc$(PKG_VERSION).install build/libxplc$(PKG_VERSION)-dev:: cp -f debian/libxplc-dev.install debian/libxplc$(PKG_VERSION)-dev.install cp -f debian/libxplc-dev.examples debian/libxplc$(PKG_VERSION)-dev.examples cleanbuilddir/libxplc$(PKG_VERSION)-dev:: rm -f debian/libxplc$(PKG_VERSION)-dev.install rm -f debian/libxplc$(PKG_VERSION)-dev.examples # Fix ldconfig-symlink-missing-for-shlib binary-predeb/libxplc$(PKG_VERSION):: /sbin/ldconfig -v -n debian/libxplc$(PKG_VERSION)/usr/lib # Turn symlinks into the real binary install/uuidcdef:: ln -f debian/tmp/usr/bin/uuidgen debian/tmp/usr/bin/uuidcdef ln -f debian/tmp/usr/share/man/man1/uuidgen.1 debian/tmp/usr/share/man/man1/uuidcdef xplc-0.3.13/debian/copyright0100644000204300020430000000451110331515666016117 0ustar pphaneufpphaneufThis package was debianized by James Morrison on Mon, 23 Oct 2003 19:49:14 -0400. It was downloaded from http://xplc.sourceforge.net/ Upstream Author: Pierre Phaneuf Copyright: XPLC is released under the terms of the GNU Lesser General Public License (LGPL) which can be found on Debian systems in the following file: /usr/share/common-licenses/LGPL-2.1 This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. XPLC is Copyright 2000-2004, Pierre Phaneuf, Copyright 2000-2004 Stéphane Lajoie and Copyright 2002-2005 Net Integration Technologies, Inc. This package also contains libuuid, which is extracted from e2fsprogs-1.38: Copyright (C) 1996, 1997 Theodore Ts'o. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, and the entire permission notice in its entirety, including the disclaimer of warranties. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the 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, ALL OF WHICH ARE HEREBY DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF NOT ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. xplc-0.3.13/debian/control0100644000204300020430000000277610331523256015574 0ustar pphaneufpphaneufSource: xplc Section: libs Priority: optional Maintainer: Simon Law Uploaders: James Morrison Build-Depends: uuid-dev, cdbs, debhelper (>= 4.1.0) Standards-Version: 3.6.2.0 Package: libxplc0.3.13 Section: libs Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends} Description: Light weight component system XPLC ("Cross-Platform Lightweight Components") is a component system that will provide extensibility and reusability both inside and between applications, while being portable across platforms (and languages) and having the lowest possible overhead (both in machine resources and programming effort). Package: libxplc0.3.13-dev Section: libdevel Architecture: any Depends: libxplc0.3.13 (= ${Source-Version}), uuidcdef, ${shlibs:Depends} Description: Light weight component system (Development libraries and headers) XPLC ("Cross-Platform Lightweight Components") is a component system that will provide extensibility and reusability both inside and between applications, while being portable across platforms (and languages) and having the lowest possible overhead (both in machine resources and programming effort). Package: uuidcdef Section: devel Architecture: any Depends: ${shlibs:Depends} Description: Universally Unique Identifier (UUID) generator This utility generates univerally unique identifiers (UUIDs). It also manages to print them out in OSF form, or as a C structure when handling them in programs, as is the case for an XPLC-enabled library. xplc-0.3.13/debian/libxplc.install0100644000204300020430000000004107755244227017213 0ustar pphaneufpphaneufdebian/tmp/usr/lib/libxplc.so.0* xplc-0.3.13/debian/control.in0100644000204300020430000000300710331515666016173 0ustar pphaneufpphaneufSource: xplc Section: libs Priority: optional Maintainer: Simon Law Uploaders: James Morrison Build-Depends: uuid-dev, cdbs, debhelper (>= 4.1.0) Standards-Version: 3.6.2.0 Package: libxplc@VERSION@ Section: libs Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends} Description: Light weight component system XPLC ("Cross-Platform Lightweight Components") is a component system that will provide extensibility and reusability both inside and between applications, while being portable across platforms (and languages) and having the lowest possible overhead (both in machine resources and programming effort). Package: libxplc@VERSION@-dev Section: libdevel Architecture: any Depends: libxplc@VERSION@ (= ${Source-Version}), uuidcdef, ${shlibs:Depends} Description: Light weight component system (Development libraries and headers) XPLC ("Cross-Platform Lightweight Components") is a component system that will provide extensibility and reusability both inside and between applications, while being portable across platforms (and languages) and having the lowest possible overhead (both in machine resources and programming effort). Package: uuidcdef Section: devel Architecture: any Depends: ${shlibs:Depends} Description: Universally Unique Identifier (UUID) generator This utility generates univerally unique identifiers (UUIDs). It also manages to print them out in OSF form, or as a C structure when handling them in programs, as is the case for an XPLC-enabled library. xplc-0.3.13/debian/source.lintian-overrides0100644000204300020430000000003610130620201021015 0ustar pphaneufpphaneufxplc: source-contains-CVS-dir xplc-0.3.13/debian/libxplc-dev.examples0100644000204300020430000000001310131316074020114 0ustar pphaneufpphaneufexamples/* xplc-0.3.13/debian/uuidcdef.install0100644000204300020430000000003410326213014017322 0ustar pphaneufpphaneufdebian/tmp/usr/bin/uuidcdef xplc-0.3.13/debian/uuidcdef.manpages0100644000204300020430000000005110326213014017446 0ustar pphaneufpphaneufdebian/tmp/usr/share/man/man1/uuidcdef.1 xplc-0.3.13/dist/0040755000204300020430000000000010331536343013702 5ustar pphaneufpphaneufxplc-0.3.13/dist/CVS/0040755000204300020430000000000010331515666014342 5ustar pphaneufpphaneufxplc-0.3.13/dist/CVS/Repository0100644000204300020430000000001210075346773016440 0ustar pphaneufpphaneufxplc/dist xplc-0.3.13/dist/CVS/Entries0100644000204300020430000000042210331515666015671 0ustar pphaneufpphaneuf/.cvsignore/1.1/Thu Apr 8 01:04:16 2004// /README.in/1.3/Fri May 21 20:22:32 2004// /xplc-uninstalled.pc.in/1.1/Thu Apr 8 01:04:16 2004// /xplc.spec.in/1.11/Wed Oct 6 05:04:28 2004// /pkg-config/1.1/Wed Jul 6 18:11:17 2005// /xplc.pc.in/1.4/Mon Oct 31 22:33:26 2005// D xplc-0.3.13/dist/CVS/Root0100644000204300020430000000006510331536343015201 0ustar pphaneufpphaneuf:pserver:anonymous@cvs.sourceforge.net:/cvsroot/xplc xplc-0.3.13/dist/.cvsignore0100644000204300020430000000000510035122420015656 0ustar pphaneufpphaneuf*.pc xplc-0.3.13/dist/README.in0100644000204300020430000000611210053462410015156 0ustar pphaneufpphaneufXPLC (Cross-Platform Lightweight Components) ============================================ Release: @VERSION@ Web Site: http://xplc.sourceforge.net/ Maintainer: Pierre Phaneuf Introduction ------------ XPLC (cross-platform lightweight components) is a component system that provide extensibility and reusability both inside and between applications, being portable across platforms and languages, easy to use and having the lowest possible overhead. Stability/Usability ------------------- XPLC is quickly becoming usable, but it's API is still in a state of flux. A project that would like to use XPLC would thus have to either require a precise version or link it statically. They should also be prepared to follow changes in the API as they change from one version of XPLC to the other. That said, using XPLC should now be possible, provided that you are subscribed to the mailing list and know what you are doing. Documentation ------------- The documentation for XPLC is available online: http://xplc.sourceforge.net/doc/ Thanks ------ I would like to thank Net Integration Technologies, my employers, for allowing me to work on XPLC a day a week and generally being a cool place to work at. License ------- All files included in this package are covered by the Lesser General Public License, unless noted otherwise. Refer to the 'LICENSE' file for terms and conditions. Releases -------- XPLC uses a numbering scheme for releases similar to what the Linux kernel uses. In short, a release number is composed of three parts, the major, minor and patchlevel numbers (like this: 3.4.31). The minor number has a special signification depending on whether it is even or odd. If it is even, it means that this is a stable release, suitable for use in a production environment. If it is odd, it means that this is a development release, intended for people willing to test XPLC, report bugs and/or work on its development. Installation ------------ See the 'INSTALL' file. Patches ------- Patches should preferably be submitted to the patch tracking system on our SourceForge project page (http://sourceforge.net/projects/xplc/), but could also be send via e-mail to the maintainer. *** IMPORTANT *** Before preparing a patch, you should make sure that 'make tests' passes all tests. Those tests are made to be as easy to use as possible, so please use them. Using the "--enable-fatal-warnings" option of the "configure" script is also recommended. The simpler way to prepare a patch requires CVS and Internet access. Just issue the following command in the root XPLC project directory: $ cvs diff -u > mypatch.diff You can also send a patch that is limited to a few files in the following way: $ cvs diff -u [FILES] > mypatch.diff If you do not have CVS and/or Internet access, you should do the following: - rename the XPLC source directory to something like 'xplc-modified' - unpack the fresh XPLC sources - run the following command: $ diff -ruN xplc-X.Y.Z xplc-modified > mypatch.diff You can then submit the mypatch.diff file for inclusion in XPLC! xplc-0.3.13/dist/xplc.pc.in0100644000204300020430000000042510331515666015604 0ustar pphaneufpphaneufprefix=@prefix@ exec_prefix=@exec_prefix@ libdir=@libdir@@xplcdir_version@ includedir=@includedir@@xplcdir_version@ Name: XPLC Description: Cross-platform lightweight component system Version: @PACKAGE_VERSION@ Libs: -L${libdir} -lxplc -lxplc-cxx -ldl Cflags: -I${includedir} xplc-0.3.13/dist/xplc.spec.in0100644000204300020430000000446410331536325016136 0ustar pphaneufpphaneufName: xplc Version: @VERSION@ Release: 1 Summary: Cross-platform lightweight component system Group: System Environment/Libraries License: LGPL Source: xplc-%{version}.tar.gz URL: http://xplc.sourceforge.net/ Prefix: /usr BuildRoot: %{_tmppath}/%{name}-root Requires: /sbin/ldconfig %package devel Summary: Cross-platform lightweight component system (development) Group: Development/Libraries Requires: xplc = %{version} %package uuidgen Summary: Cross-platform lightweight component system (uuidgen) Group: Development/Libraries %package doc Summary: Cross-platform lightweight component system (documentation) Group: Development/Libraries %description XPLC (cross-platform lightweight components) is a component system that provide extensibility and reusability both inside and between applications, being portable across platforms and languages, easy to use and having the lowest possible overhead. %description devel This is the parts of XPLC needed for development. %description uuidgen This is a UUID generator. It is not strictly needed, as there are other tools available to generate UUIDs. %description doc This package contains documentation and examples for XPLC. %prep %setup -q %build %configure make make tests %install rm -rf %{buildroot} %makeinstall rm -rf $(find examples -name CVS -type d -o -name .cvsignore) %clean rm -rf %{buildroot} %post -p /sbin/ldconfig %postun -p /sbin/ldconfig %files %defattr(-,root,root) /usr/lib/libxplc.so.%{version} %files devel %defattr(-,root,root) /usr/include/xplc-%{version} /usr/lib/xplc-%{version} /usr/lib/pkgconfig/xplc-%{version}.pc %files uuidgen %defattr(-,root,root) /usr/bin/uuidgen %doc /usr/share/man/man1/uuidgen.1.gz %files doc %defattr(-,root,root) %doc README CREDITS NEWS LICENSE ChangeLog %doc examples %changelog * Wed Oct 6 2004 Pierre Phaneuf - Updated for the new parallel installation support. * Wed Apr 7 2004 Pierre Phaneuf - Fixed the ownership of the documentation files. - Runs the unit tests while packaging. * Fri Jan 17 2003 Pierre Phaneuf - Minor fix to the permission of the header files. * Sat Nov 30 2002 Pierre Phaneuf - Added libxplc-cxx.a to the devel package. * Fri Sep 27 2002 Pierre Phaneuf - Initial RPM release. xplc-0.3.13/dist/xplc-uninstalled.pc.in0100644000204300020430000000032110035122420020076 0ustar pphaneufpphaneuftop_builddir=@abs_top_builddir@ Name: XPLC Description: Cross-platform lightweight component system Version: @PACKAGE_VERSION@ Libs: -L${top_builddir} -lxplc -lxplc-cxx -ldl Cflags: -I${top_builddir}/include xplc-0.3.13/dist/pkg-config0100755000204300020430000000016010263017305015642 0ustar pphaneufpphaneuf#!/bin/sh # This shims out pkg-config so that complaints don't occur when building # examples and such. exit 0 xplc-0.3.13/README0100644000204300020430000000610710331523256013617 0ustar pphaneufpphaneufXPLC (Cross-Platform Lightweight Components) ============================================ Release: 0.3.13 Web Site: http://xplc.sourceforge.net/ Maintainer: Pierre Phaneuf Introduction ------------ XPLC (cross-platform lightweight components) is a component system that provide extensibility and reusability both inside and between applications, being portable across platforms and languages, easy to use and having the lowest possible overhead. Stability/Usability ------------------- XPLC is quickly becoming usable, but it's API is still in a state of flux. A project that would like to use XPLC would thus have to either require a precise version or link it statically. They should also be prepared to follow changes in the API as they change from one version of XPLC to the other. That said, using XPLC should now be possible, provided that you are subscribed to the mailing list and know what you are doing. Documentation ------------- The documentation for XPLC is available online: http://xplc.sourceforge.net/doc/ Thanks ------ I would like to thank Net Integration Technologies, my employers, for allowing me to work on XPLC a day a week and generally being a cool place to work at. License ------- All files included in this package are covered by the Lesser General Public License, unless noted otherwise. Refer to the 'LICENSE' file for terms and conditions. Releases -------- XPLC uses a numbering scheme for releases similar to what the Linux kernel uses. In short, a release number is composed of three parts, the major, minor and patchlevel numbers (like this: 3.4.31). The minor number has a special signification depending on whether it is even or odd. If it is even, it means that this is a stable release, suitable for use in a production environment. If it is odd, it means that this is a development release, intended for people willing to test XPLC, report bugs and/or work on its development. Installation ------------ See the 'INSTALL' file. Patches ------- Patches should preferably be submitted to the patch tracking system on our SourceForge project page (http://sourceforge.net/projects/xplc/), but could also be send via e-mail to the maintainer. *** IMPORTANT *** Before preparing a patch, you should make sure that 'make tests' passes all tests. Those tests are made to be as easy to use as possible, so please use them. Using the "--enable-fatal-warnings" option of the "configure" script is also recommended. The simpler way to prepare a patch requires CVS and Internet access. Just issue the following command in the root XPLC project directory: $ cvs diff -u > mypatch.diff You can also send a patch that is limited to a few files in the following way: $ cvs diff -u [FILES] > mypatch.diff If you do not have CVS and/or Internet access, you should do the following: - rename the XPLC source directory to something like 'xplc-modified' - unpack the fresh XPLC sources - run the following command: $ diff -ruN xplc-X.Y.Z xplc-modified > mypatch.diff You can then submit the mypatch.diff file for inclusion in XPLC! xplc-0.3.13/include/0040755000204300020430000000000010331536343014362 5ustar pphaneufpphaneufxplc-0.3.13/include/CVS/0040755000204300020430000000000010075346774015031 5ustar pphaneufpphaneufxplc-0.3.13/include/CVS/Repository0100644000204300020430000000001510075346773017123 0ustar pphaneufpphaneufxplc/include xplc-0.3.13/include/CVS/Entries0100644000204300020430000000013710075346774016363 0ustar pphaneufpphaneuf/.cvsignore/1.1/Wed Mar 24 15:09:07 2004// /config.h/1.1/Wed Mar 24 15:09:07 2004// D/xplc//// xplc-0.3.13/include/CVS/Root0100644000204300020430000000006510331536343015661 0ustar pphaneufpphaneuf:pserver:anonymous@cvs.sourceforge.net:/cvsroot/xplc xplc-0.3.13/include/xplc/0040755000204300020430000000000010331515666015335 5ustar pphaneufpphaneufxplc-0.3.13/include/xplc/CVS/0040755000204300020430000000000010331515666015770 5ustar pphaneufpphaneufxplc-0.3.13/include/xplc/CVS/Repository0100644000204300020430000000002210075346773020067 0ustar pphaneufpphaneufxplc/include/xplc xplc-0.3.13/include/xplc/CVS/Entries0100644000204300020430000000207610331515666017326 0ustar pphaneufpphaneuf/core.h/1.4/Sat Jul 31 03:05:30 2004// /ICategory.h/1.8/Mon Oct 31 22:33:26 2005// /ICategoryIterator.h/1.5/Mon Oct 31 22:33:26 2005// /ICategoryManager.h/1.8/Mon Oct 31 22:33:26 2005// /IFactory.h/1.10/Mon Oct 31 22:33:26 2005// /IModule.h/1.11/Mon Oct 31 22:33:26 2005// /IModuleLoader.h/1.9/Mon Oct 31 22:33:26 2005// /IModuleManagerFactory.h/1.3/Mon Oct 31 22:33:26 2005// /IMoniker.h/1.11/Mon Oct 31 22:33:26 2005// /IMonikerService.h/1.11/Mon Oct 31 22:33:26 2005// /IObject.h/1.18/Mon Oct 31 22:33:26 2005// /IServiceHandler.h/1.17/Mon Oct 31 22:33:26 2005// /IServiceManager.h/1.19/Mon Oct 31 22:33:26 2005// /IStaticServiceHandler.h/1.11/Mon Oct 31 22:33:26 2005// /IWeakRef.h/1.4/Mon Oct 31 22:33:26 2005// /delete.h/1.7/Mon Oct 31 22:33:26 2005// /factory.h/1.6/Mon Oct 31 22:33:26 2005// /module.h/1.17/Mon Oct 31 22:33:26 2005// /ptr.h/1.13/Mon Oct 31 22:33:26 2005// /trace.h/1.7/Mon Oct 31 22:33:26 2005// /utils.h/1.42/Mon Oct 31 22:33:26 2005// /uuid.h/1.32/Mon Oct 31 22:33:26 2005// /uuidops.h/1.4/Mon Oct 31 22:33:26 2005// /xplc.h/1.25/Mon Oct 31 22:33:26 2005// D xplc-0.3.13/include/xplc/CVS/Root0100644000204300020430000000006510331536343016627 0ustar pphaneufpphaneuf:pserver:anonymous@cvs.sourceforge.net:/cvsroot/xplc xplc-0.3.13/include/xplc/ICategoryIterator.h0100644000204300020430000000346310331515666021111 0ustar pphaneufpphaneuf/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- * * XPLC - Cross-Platform Lightweight Components * Copyright (C) 2004, Pierre Phaneuf * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License * as published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ #ifndef __XPLC_ICATEGORYITERATOR_H__ #define __XPLC_ICATEGORYITERATOR_H__ #if defined(__GNUC__) && __GNUC__ > 3 # pragma GCC system_header #endif #include /** \interface ICategoryIterator ICategoryIterator.h xplc/ICategoryIterator.h * * Allows iteration over a category. */ class ICategoryIterator: public IObject { UNSTABLE_INTERFACE public: /** Returns the UUID of the category entry. */ virtual const UUID& getUuid() = 0; /** Returns the string associated with the category entry. */ virtual const char* getString() = 0; /** Advances to the next category entry. */ virtual void next() = 0; /** Tests if the iterator is past the last item. The iterator is * invalid when this method returns true. */ virtual bool done() = 0; }; DEFINE_IID(ICategoryIterator, {0x87e48aae, 0xa1da, 0x4d9c, {0xa7, 0xc0, 0x7a, 0x5b, 0x88, 0xf4, 0x01, 0x7a}}); #endif /* __XPLC_ICATEGORYITERATOR_H__ */ xplc-0.3.13/include/xplc/ICategory.h0100644000204300020430000000267410331515666017402 0ustar pphaneufpphaneuf/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- * * XPLC - Cross-Platform Lightweight Components * Copyright (C) 2002, Net Integration Technologies, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License * as published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ #ifndef __XPLC_ICATEGORY_H__ #define __XPLC_ICATEGORY_H__ #if defined(__GNUC__) && __GNUC__ > 3 # pragma GCC system_header #endif #include #include /** * Represents a category. */ class ICategory: public IObject { UNSTABLE_INTERFACE public: /** Gets an iterator for the category. */ virtual ICategoryIterator* getIterator() = 0; }; DEFINE_IID(ICategory, {0x90abfe8d, 0x50a9, 0x44d8, {0x96, 0x03, 0x29, 0x9c, 0x8b, 0x21, 0x9e, 0x5d}}); #endif /* __XPLC_ICATEGORYMANAGER_H__ */ xplc-0.3.13/include/xplc/uuid.h0100644000204300020430000001230010331515666016445 0ustar pphaneufpphaneuf/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- * * XPLC - Cross-Platform Lightweight Components * Copyright (C) 2000-2003, Pierre Phaneuf * Copyright (C) 2002, Net Integration Technologies, Inc. * Copyright (C) 2004, Stéphane Lajoie * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License * as published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ #ifndef __XPLC_UUID_H__ #define __XPLC_UUID_H__ #if defined(__GNUC__) && __GNUC__ > 3 # pragma GCC system_header #endif /** \file * * Universally Unique IDentifiers. * * A UUID is a sequence of 16 bytes that is unique throughout the * universe, and which can uniquely identify anything you might want. * It will never have a name conflict with any other UUID. To come up * with a UUID of your own, run the 'uuidgen' program that comes with * many Unix and Windows systems. Although any UUID is guaranteed to * be unique, there is a downside: it's almost impossible for a human * to read, understand, or remember the contents of a UUID. For a * less unique, human-readable alternative to UUIDs, see IMoniker. * * A UUID is what is known as a "strong name". It is like the name of * a class in a C++ program, or of a global variable, but the "strong" * part refers to how this name, unlike the name of a C++ class, is * unique and refers precisely to this one thing. C++ names are "weak * names", it is very easy to create two different things with the * same name, for example, classes named "String" are very common, and * two different "String" classes could not be used in the same * program. When making a single program, it is possible to avoid * these conflicts, but with a component system, you never know how * components will be used together, thus the need for strong names. * * The UUID is the standard way of looking up and indexing objects in * XPLC. All "well-known" objects you need to look for (such as the * standard XPLC moniker and category services, and other objects you * create yourself) will have a UUID you can look up using the service * manager. Note that objects referenced by a UUID are necessarily * "singletons" - that is, objects of a class that is only * instantiated once in any program. For example, a factory that * produces HelloWorld objects would have its own UUID - so you can * ask for a HelloWorldFactory and get "the" HelloWorldFactory - but * the HelloWorld objects it produces would not be findable by UUID. * (If they all had the same UUID, it wouldn't be very Universally * Unique, would it? And if they all had different UUIDs, how would * you know which UUID to look for?) * * Also: when you retrieve a different interface from an IObject using * its getInterface() method, you do so by looking up the UUID of that * interface, also known as an IID (which is just a nickname for UUID, * they are identical in meaning). Every interface must have an IID, * but the IID is the same for all objects implementing that * interface. However, you can have multiple objects implementing a * particular interface, and each of those objects will have its own * UUID. */ #ifdef WIN32 typedef unsigned long u_int32_t; typedef unsigned short u_int16_t; typedef unsigned char u_int8_t; #else #include #endif //@{ #ifndef GUID_DEFINED #define GUID_DEFINED /** * The structure underlying UUIDs. This is similar to the Windows * definition, for compatibility reasons. */ typedef struct _GUID { //@{ u_int32_t Data1; u_int16_t Data2; u_int16_t Data3; u_int8_t Data4[8]; //@} } GUID; #endif #ifndef UUID_DEFINED #define UUID_DEFINED typedef GUID UUID; #ifndef uuid_t #define uuid_t UUID #endif #endif //@} /// The NULL UUID. Nothing will ever have this UUID, I promise. static const UUID UUID_null = {0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}; /** \struct XPLC_IID uuid.h xplc/uuid.h * * An Interface IDentifier. Every interface (abstract classes derived from * IObject) must have a unique IID, so that getInterface() can ask for that * interface. * * Generate a UUID for your IID using 'uuidgen', then declare your IID * using DEFINE_IID(ClassName). If you need to obtain the UUID corresponding * to that interface in the future, call the static function * XPLC_IID::get(). */ template struct XPLC_IID { }; /** * Used to define the IID of an interface. */ #define DEFINE_IID(iface, u1, u2, u3, u4, u5, u6, u7, u8, u9, u10, u11) \ static const UUID iface##_IID = u1, u2, u3, u4, u5, u6, u7, u8, u9, u10, u11; \ template <> \ struct XPLC_IID { \ static const UUID& get() { \ return iface##_IID; \ } \ } #endif /* __XPLC_UUID_H__ */ xplc-0.3.13/include/xplc/uuidops.h0100644000204300020430000000725710331515666017206 0ustar pphaneufpphaneuf/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- * * XPLC - Cross-Platform Lightweight Components * Copyright (C) 2000-2003, Pierre Phaneuf * Copyright (C) 2002, Net Integration Technologies, Inc. * Copyright (C) 2004, Stéphane Lajoie * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License * as published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA * * As a special exception, you may use this file as part of a free * software library without restriction. Specifically, if other files * instantiate templates or use macros or inline functions from this * file, or you compile this file and link it with other files to * produce an executable, this file does not by itself cause the * resulting executable to be covered by the GNU Lesser General Public * License. This exception does not however invalidate any other * reasons why the executable file might be covered by the GNU Lesser * General Public License. */ #ifndef __XPLC_UUIDOPS_H__ #define __XPLC_UUIDOPS_H__ #if defined(__GNUC__) && __GNUC__ > 3 # pragma GCC system_header #endif #include #if !defined _SYS_GUID_OPERATOR_EQ_ && !defined _NO_SYS_GUID_OPERATOR_EQ_ #define _SYS_GUID_OPERATOR_EQ_ /** * Equality operator for UUIDs. */ inline int operator==(const UUID& uuid1, const UUID& uuid2) { return (&uuid1 == &uuid2) || ((static_cast(&uuid1.Data1)[0] == static_cast(&uuid2.Data1)[0]) && (static_cast(&uuid1.Data1)[1] == static_cast(&uuid2.Data1)[1]) && (static_cast(&uuid1.Data1)[2] == static_cast(&uuid2.Data1)[2]) && (static_cast(&uuid1.Data1)[3] == static_cast(&uuid2.Data1)[3])); } /** * Inequality operator for UUIDs. */ inline int operator!=(const UUID& uuid1, const UUID& uuid2) { return (&uuid1 != &uuid2) && ((static_cast(&uuid1.Data1)[0] != static_cast(&uuid2.Data1)[0]) || (static_cast(&uuid1.Data1)[1] != static_cast(&uuid2.Data1)[1]) || (static_cast(&uuid1.Data1)[2] != static_cast(&uuid2.Data1)[2]) || (static_cast(&uuid1.Data1)[3] != static_cast(&uuid2.Data1)[3])); } #endif /** * Converts a printable C string to a UUID. The string is of the form * "9c318f06-52ec-4a62-b5fb-9279216e8586" (without the quotes), but * will also tolerate opening and closing braces before and after. * * This is the form produced by the 'uuidgen' program and is used in * the Windows registry. */ const UUID UuidFromString(const char* str); /** * Fill the given pointer with a printable string representing the * given UUID. The string is of the form * "9c318f06-52ec-4a62-b5fb-9279216e8586" (without the quotes). * * 'str' should point to at least 39 bytes of available memory. * Always returns 'str', which has been null-terminated. */ char* UuidToString(const UUID& uuid, char* str); #endif /* __XPLC_UUIDOPS_H__ */ xplc-0.3.13/include/xplc/ICategoryManager.h0100644000204300020430000000355710331515666020676 0ustar pphaneufpphaneuf/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- * * XPLC - Cross-Platform Lightweight Components * Copyright (C) 2002-2003, Net Integration Technologies, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License * as published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ #ifndef __XPLC_ICATEGORYMANAGER_H__ #define __XPLC_ICATEGORYMANAGER_H__ #if defined(__GNUC__) && __GNUC__ > 3 # pragma GCC system_header #endif #include #include /** \interface ICategoryManager ICategoryManager.h xplc/ICategoryManager.h * * Let you register categories and obtain information about them. */ class ICategoryManager: public IObject { UNSTABLE_INTERFACE public: /** * Register a component with a category. Both are specified by * UUIDs. */ virtual void registerComponent(const UUID& category, const UUID& component, const char* extrastring) = 0; /** * Get a category object for the specified category. */ virtual ICategory* getCategory(const UUID&) = 0; }; DEFINE_IID(ICategoryManager, {0xb5f218a5, 0xb50a, 0x4e8c, {0x9e, 0x0e, 0x69, 0x2e, 0x17, 0xf0, 0xe2, 0x99}}); #endif /* __XPLC_ICATEGORYMANAGER_H__ */ xplc-0.3.13/include/xplc/IFactory.h0100644000204300020430000000307010331515666017223 0ustar pphaneufpphaneuf/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- * * XPLC - Cross-Platform Lightweight Components * Copyright (C) 2000-2002, Pierre Phaneuf * Copyright (C) 2002, Net Integration Technologies, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License * as published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ #ifndef __XPLC_IFACTORY_H__ #define __XPLC_IFACTORY_H__ #if defined(__GNUC__) && __GNUC__ > 3 # pragma GCC system_header #endif #include /** \interface IFactory IFactory.h xplc/IFactory.h * * Common object creation interface. */ class IFactory: public IObject { UNSTABLE_INTERFACE public: /** * Creates an object. * * The object returned by IFactory::createObject() is already * addRef()'d. */ virtual IObject* createObject() = 0; }; DEFINE_IID(IFactory, {0xcd386b27, 0x0ea1, 0x4e1b, {0xba, 0x08, 0xb8, 0x5e, 0xe4, 0xda, 0xad, 0x69}}); #endif /* __XPLC_IFACTORY_H__ */ xplc-0.3.13/include/xplc/IModule.h0100644000204300020430000000300510331515666017037 0ustar pphaneufpphaneuf/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- * * XPLC - Cross-Platform Lightweight Components * Copyright (C) 2002-2004, Net Integration Technologies, Inc. * Copyright (C) 2002-2004, Pierre Phaneuf * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License * as published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ #ifndef __XPLC_IMODULE_H__ #define __XPLC_IMODULE_H__ #if defined(__GNUC__) && __GNUC__ > 3 # pragma GCC system_header #endif #include /** \interface IModule IModule.h xplc/IModule.h * * The interface that a module should provide. */ class IModule: public IServiceHandler { UNSTABLE_INTERFACE public: /* * FIXME: There will be other methods here, for inspecting a * module. */ }; DEFINE_IID(IModule, {0x772689d4, 0x7932, 0x448a, {0x80, 0x8a, 0x6e, 0xbf, 0x1c, 0xe9, 0xf9, 0x4b}}); #endif /* __XPLC_IMODULE_H__ */ xplc-0.3.13/include/xplc/IModuleLoader.h0100644000204300020430000000301110331515666020163 0ustar pphaneufpphaneuf/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- * * XPLC - Cross-Platform Lightweight Components * Copyright (C) 2002-2004, Pierre Phaneuf * Copyright (C) 2002-2004, Net Integration Technologies, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License * as published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ #ifndef __XPLC_IMODULELOADER_H__ #define __XPLC_IMODULELOADER_H__ #if defined(__GNUC__) && __GNUC__ > 3 # pragma GCC system_header #endif #include /** \interface IModuleLoader IModuleLoader.h xplc/IModuleLoader.h * * The interface to control the module loader. */ class IModuleLoader: public IObject { UNSTABLE_INTERFACE public: virtual IModule* loadModule(const char* modulename) = 0; }; DEFINE_IID(IModuleLoader, {0xa4143690, 0xfc54, 0x43f4, {0x9d, 0x7e, 0x50, 0x3c, 0x71, 0xff, 0xa5, 0x01}}); #endif /* __XPLC_IMODULELOADER_H__ */ xplc-0.3.13/include/xplc/IMonikerService.h0100644000204300020430000000340010331515666020536 0ustar pphaneufpphaneuf/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- * * XPLC - Cross-Platform Lightweight Components * Copyright (C) 2002, Pierre Phaneuf * Copyright (C) 2002, Net Integration Technologies, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License * as published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ #ifndef __XPLC_IMONIKERSERVICE_H__ #define __XPLC_IMONIKERSERVICE_H__ #if defined(__GNUC__) && __GNUC__ > 3 # pragma GCC system_header #endif #include /** \interface IMonikerService IMonikerService.h xplc/IMonikerService.h * * An interface for registering objects so they can be retrieved using * a moniker. * * You can obtain the %XPLC standard moniker service by getting the * XPLC_monikers UUID from the service manager. */ class IMonikerService: public IMoniker { UNSTABLE_INTERFACE public: /** * Register an object to be retrieved with a moniker. */ virtual void registerObject(const char* prefix, const UUID& uuid) = 0; }; DEFINE_IID(IMonikerService, {0x0ee2cc09, 0xd7d5, 0x44ee, {0xbc, 0x63, 0xf2, 0xb9, 0x03, 0x7d, 0xb9, 0x82}}); #endif /* __XPLC_IMONIKERSERVICE_H__ */ xplc-0.3.13/include/xplc/IMoniker.h0100644000204300020430000000440210331515666017220 0ustar pphaneufpphaneuf/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- * * XPLC - Cross-Platform Lightweight Components * Copyright (C) 2002, Pierre Phaneuf * Copyright (C) 2002, Net Integration Technologies, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License * as published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ #ifndef __XPLC_IMONIKER_H__ #define __XPLC_IMONIKER_H__ #if defined(__GNUC__) && __GNUC__ > 3 # pragma GCC system_header #endif #include /** \interface IMoniker IMoniker.h xplc/IMoniker.h * * An interface for obtaining an IObject given a moniker string. * * A moniker can be used to obtain a particular object using a * human-readable string to describe it, rather than having to know * the object's UUID. Human-readable strings are, unfortunately, not * guaranteed to be universally unique, so you might (theoretically) * not get the object you want. * * You can retrieve the standard %XPLC moniker service from the service * manager using the XPLC_monikers UUID, which can then be used to * resolve monikers and register your own using the IMonikerService * interface it provides. * * Note that XPLC::get() and XPLC::create() are a convenient interface * to the %XPLC moniker system. */ class IMoniker: public IObject { UNSTABLE_INTERFACE public: /** * Given a moniker string, return the IObject it refers to, or NULL if * no objects match. The returned object is already addRef()'d. */ virtual IObject* resolve(const char* moniker) = 0; }; DEFINE_IID(IMoniker, {0x6c0bb432, 0x7c32, 0x4614, {0xa5, 0xab, 0xb2, 0x5d, 0x92, 0x23, 0xda, 0xa2}}); #endif /* __XPLC_IMONIKER_H__ */ xplc-0.3.13/include/xplc/IServiceHandler.h0100644000204300020430000000356210331515666020520 0ustar pphaneufpphaneuf/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- * * XPLC - Cross-Platform Lightweight Components * Copyright (C) 2000-2002, Pierre Phaneuf * Copyright (C) 2002, Net Integration Technologies, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License * as published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ #ifndef __XPLC_ISERVICEHANDLER_H__ #define __XPLC_ISERVICEHANDLER_H__ #if defined(__GNUC__) && __GNUC__ > 3 # pragma GCC system_header #endif /** \file * * The service handler interface. */ #include /** \interface IServiceHandler IServiceHandler.h xplc/IServiceHandler.h * * Interface to an object which can be used to find other objects, * given their UUIDs. This is the most basic way to find objects in * %XPLC, no matter where they are. */ class IServiceHandler: public IObject { UNSTABLE_INTERFACE public: /** * Get the object corresponding to the given UUID. The returned object * is already addRef()ed. Returns NULL if there is no matching object. */ virtual IObject* getObject(const UUID&) = 0; }; /// IServiceHandler's IID DEFINE_IID(IServiceHandler, {0xe897384f, 0x3ba6, 0x46e3, {0xad, 0x06, 0x53, 0x76, 0x21, 0xa6, 0x0a, 0x03}}); #endif /* __XPLC_ISERVICEHANDLER_H__ */ xplc-0.3.13/include/xplc/IObject.h0100644000204300020430000001106710331515666017027 0ustar pphaneufpphaneuf/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- * * XPLC - Cross-Platform Lightweight Components * Copyright (C) 2000-2003, Pierre Phaneuf * Copyright (C) 2002, Net Integration Technologies, Inc. * Copyright (C) 2002, Stéphane Lajoie * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License * as published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ #ifndef __XPLC_IOBJECT_H__ #define __XPLC_IOBJECT_H__ #if defined(__GNUC__) && __GNUC__ > 3 # pragma GCC system_header #endif /** \file * * This file contains the %XPLC foundation interface. */ #include #ifndef UNSTABLE /** * Used to mark an interface as unstable. Add an UNSTABLE_INTERFACE * declaration to your object if you don't want people to use your * interface without knowing the interface might change from * underneath them. They will then have to \#define UNSTABLE if they * want their program to compile. */ #define UNSTABLE_INTERFACE static bool UNSTABLE_INTERFACE = true; #else #define UNSTABLE_INTERFACE #endif class IWeakRef; /** \interface IObject IObject.h xplc/IObject.h * * The basic interface which is included by all other %XPLC interfaces * and objects. It provides a standard method to say you're using an * object, to say you're done, and to retrieve other %XPLC interfaces * from the object. * * Usually you will not implement these functions yourself; use * the IMPLEMENT_IOBJECT macro instead. * * \sa IMPLEMENT_IOBJECT, mutate(), get(), xplc_ptr, XPLC */ class IObject { UNSTABLE_INTERFACE public: /** * Indicate you are using this object. This increases the reference * count of the object by one. Usually, when the reference count * reaches zero, the object is freed automatically. * * This called a "strong reference", because they will prevent the * object from being destroyed. They should thus be used carefully, * as they control the lifetime of the object. For example, you do * not need to call addRef() on object passed as parameters, unless * you intend on keeping them. * * addRef() is often called automatically for you in %XPLC, but * you'll have to call release() by hand sometimes unless you use * xplc_ptr. */ virtual unsigned int addRef() = 0; /** * Indicate that you are finished using this object. This decreases * the reference count of the object by one. Usually, when the * reference count reaches zero, the object is freed automatically. * * You will usually need to manually release() any object given to * you by any other %XPLC function, unless you give the object to * someone else who will call release. * * If you use xplc_ptr, it will do this for you. */ virtual unsigned int release() = 0; /** * Returns the requested %XPLC interface. Will return NULL if the * interface is not supported. The returned interface has been * addRef()ed, so you will need to release() it when done. Note * that the interface returned may be a pointer to the same object * or a different one - that's none of your business. Asking for the * IObject interface should always return the same pointer for a * given logical object, so this can be used for comparison by * identity. * * You should probably use the convenient mutate() and get() * functions instead of this, or use an xplc_ptr, which mutates the * object for you. */ virtual IObject* getInterface(const UUID&) = 0; /** * Return a weak reference to this object. A weak reference points * at the object, but does not control the lifetime of the object. * An object can thus still be deleted while someone holds a weak * reference. You will still need to release() the weak reference * when you are done with it. * * \sa IWeakRef */ virtual IWeakRef* getWeakRef() = 0; }; /// IObject's IID DEFINE_IID(IObject, {0x8ca76e98, 0xb653, 0x43d7, {0xb0, 0x56, 0x8b, 0x9d, 0xde, 0x9a, 0xbe, 0x9d}}); #endif /* __XPLC_IOBJECT_H__ */ xplc-0.3.13/include/xplc/IStaticServiceHandler.h0100644000204300020430000000323410331515666021664 0ustar pphaneufpphaneuf/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- * * XPLC - Cross-Platform Lightweight Components * Copyright (C) 2000-2002, Pierre Phaneuf * Copyright (C) 2002, Net Integration Technologies, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License * as published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ #ifndef __XPLC_ISTATICSERVICEHANDLER_H__ #define __XPLC_ISTATICSERVICEHANDLER_H__ #if defined(__GNUC__) && __GNUC__ > 3 # pragma GCC system_header #endif #include /** * Service handler for statically linked components. */ class IStaticServiceHandler: public IServiceHandler { UNSTABLE_INTERFACE public: /** Adds an object to the static service handler. */ virtual void addObject(const UUID&, IObject*) = 0; /** Removes an object from the static service handler. */ virtual void removeObject(const UUID&) = 0; }; DEFINE_IID(IStaticServiceHandler, {0x0a599d64, 0x0684, 0x4c44, {0x8a, 0xbc, 0xab, 0xfd, 0x5d, 0xe0, 0x22, 0x59}}); #endif /* __XPLC_ISTATICSERVICEHANDLER_H__ */ xplc-0.3.13/include/xplc/IServiceManager.h0100644000204300020430000000552310331515666020514 0ustar pphaneufpphaneuf/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- * * XPLC - Cross-Platform Lightweight Components * Copyright (C) 2000-2002, Pierre Phaneuf * Copyright (C) 2002, Net Integration Technologies, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License * as published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ #ifndef __XPLC_ISERVICEMANAGER_H__ #define __XPLC_ISERVICEMANAGER_H__ #if defined(__GNUC__) && __GNUC__ > 3 # pragma GCC system_header #endif /** \file * * The service manager interface. */ #include #include /** \interface IServiceManager IServiceManager.h xplc/IServiceManager.h * * The %XPLC service manager interface. * * To do anything with %XPLC, you need to use the service manager. You * can obtain it by calling XPLC_getServiceManager(). * * The service manager knows how to find objects from their UUID. It * does so by searching a list of service handlers (objects that * implement the IServiceHandler interface), querying them in turn * until the object is found. * * The service handlers are those who know how to find objects through * various means. For example, one might get objects from a statically * defined list of objects, another might search a directory for * plugins, etc... * * If you want to provide an IServiceHandler, you should register with * the service manager. */ class IServiceManager: public IServiceHandler { UNSTABLE_INTERFACE public: /** * Register a handler to be handled by this manager. */ virtual void addHandler(IServiceHandler*) = 0; /** Register a handler to be handled by this manager, explicitly * adding it to the beginning of the list (highest priority). */ virtual void addFirstHandler(IServiceHandler*) = 0; /** Register a handler to be handled by this manager, explicitly * adding it to the end of the list (lowest priority). */ virtual void addLastHandler(IServiceHandler*) = 0; /** Remove a handler from the list. */ virtual void removeHandler(IServiceHandler*) = 0; }; /// IServiceManager's IID DEFINE_IID(IServiceManager, {0x22bdabd9, 0xa63a, 0x4b5e, {0xb1, 0x61, 0xb6, 0x36, 0x52, 0x27, 0xd7, 0x8e}}); #endif /* __XPLC_ISERVICEMANAGER_H__ */ xplc-0.3.13/include/xplc/IWeakRef.h0100644000204300020430000000315610331515666017145 0ustar pphaneufpphaneuf/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- * * XPLC - Cross-Platform Lightweight Components * Copyright (C) 2003, Pierre Phaneuf * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License * as published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ #ifndef __XPLC_IWEAKREF_H__ #define __XPLC_IWEAKREF_H__ #if defined(__GNUC__) && __GNUC__ > 3 # pragma GCC system_header #endif #include /** \interface IWeakRef IWeakRef.h xplc/IWeakRef.h * * Represents a weak reference to another object. */ class IWeakRef: public IObject { UNSTABLE_INTERFACE public: /** * Obtains an addRef()'d strong reference to the referenced * object. If the object has been destroyed, this will return * NULL. Do not forget to release() the strong reference when you * are done with it. */ virtual IObject* getObject() = 0; }; DEFINE_IID(IWeakRef, {0x6a97f962, 0xeeec, 0x48e2, {0xb4, 0x68, 0x56, 0x60, 0x57, 0x3f, 0xd9, 0x24}}); #endif /* __XPLC_IWEAKREF_H__ */ xplc-0.3.13/include/xplc/core.h0100644000204300020430000000501010102606172016414 0ustar pphaneufpphaneuf/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- * * XPLC - Cross-Platform Lightweight Components * Copyright (C) 2002, Net Integration Technologies, Inc. * Copyright (C) 2004, Pierre Phaneuf * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License * as published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ #ifndef __XPLC_CORE_H__ #define __XPLC_CORE_H__ #include extern "C" IServiceManager* XPLC_getServiceManager(); static const UUID XPLC_staticServiceHandler = {0xf8c76062, 0xf241, 0x4f38, {0x80, 0x8d, 0x73, 0x88, 0x31, 0x22, 0x89, 0xd8}}; static const UUID XPLC_moduleLoader = {0x59e3fa68, 0x807c, 0x4ecb, {0xbc, 0x26, 0xb8, 0x08, 0x37, 0xcb, 0x32, 0x7e}}; static const UUID XPLC_moduleManagerFactory = {0x251c9dfc, 0xc76b, 0x454e, {0xaa, 0xcb, 0x95, 0x8e, 0x06, 0x35, 0xe2, 0x72}}; static const UUID XPLC_genericFactory = {0x414a69c6, 0x3c9e, 0x49f7, {0xab, 0x08, 0xe5, 0x5c, 0x7b, 0x6c, 0x23, 0x34}}; static const UUID XPLC_monikers = {0x5ed8cb8f, 0x6938, 0x40f2, {0x92, 0x7c, 0x2f, 0x4c, 0xe2, 0x89, 0x3c, 0x0b}}; static const UUID XPLC_newMoniker = {0x9ec8028c, 0x45e3, 0x40ff, {0x97, 0xfc, 0x0b, 0x35, 0xca, 0x6e, 0xdc, 0xb5}}; static const UUID XPLC_categoryManager = {0xa7b3c486, 0x3725, 0x4500, {0xa4, 0x4c, 0x59, 0x13, 0x1d, 0x65, 0x9e, 0x20}}; #endif /* __XPLC_CORE_H__ */ xplc-0.3.13/include/xplc/delete.h0100644000204300020430000000746710331515666016763 0ustar pphaneufpphaneuf/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- * * XPLC - Cross-Platform Lightweight Components * Copyright (C) 2004, Net Integration Technologies, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License * as published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA * * As a special exception, you may use this file as part of a free * software library without restriction. Specifically, if other files * instantiate templates or use macros or inline functions from this * file, or you compile this file and link it with other files to * produce an executable, this file does not by itself cause the * resulting executable to be covered by the GNU Lesser General Public * License. This exception does not however invalidate any other * reasons why the executable file might be covered by the GNU Lesser * General Public License. */ #ifndef __XPLC_DELETE_H__ #define __XPLC_DELETE_H__ #if defined(__GNUC__) && __GNUC__ > 3 # pragma GCC system_header #endif /** \file * * Include this file right after IObject.h (or instead of) to detect * accidental uses of "delete" on an %XPLC interface. Use "xplcdelete" * instead of "delete" when you know what you are doing. */ #include #include #ifdef __XPLC_IOBJECT_H__ #error " has to be included before ." #endif #include /** * \defgroup DeleteDetector This is the "delete detector". */ /// \ingroup DeleteDetector class CheckIObject {}; class CheckIObjectOk {}; /// \ingroup DeleteDetector class CheckIObjectOkVector {}; template class ConversionIObject { public: //@{ typedef char Yes; /// \ingroup DeleteDetector struct No { char dummy[2]; }; static T* from; static Yes test(const IObject*); static No test(...); //@} }; template struct XPLC_CTAssert; template<> /// \ingroup DeleteDetector struct XPLC_CTAssert {}; template inline void operator&&(CheckIObject, const T* obj) { static_cast(sizeof(XPLC_CTAssert<(sizeof(ConversionIObject::test(ConversionIObject::from)) != sizeof(typename ConversionIObject::Yes))>)); delete obj; } template inline void operator&&(CheckIObjectOk, const T* obj) { delete obj; } template inline void operator&&(CheckIObjectOkVector, const T* obj) { delete[] obj; } /** * Undefine xplcdelete. defines xplcdelete, we should * undo this, in case it has been included before. */ #undef xplcdelete /** * Macro used to indicate a valid use of the delete keyword with an * XPLC interface. In some cases, you really need to use delete on an * object that derives from IObject. In those cases, use "xplcdelete" * instead of "delete". */ #define xplcdelete CheckIObjectOk() && /** * Overriding the delete keyword. This replaces the delete keyword * with an invocation of the operator&& using a specific marker class * as the left operand, allowing it to be templated on the right * operand. */ #define delete CheckIObject() && /** * Remplacement for delete[]. Because we cannot capture usage of * delete[] using macros, we have to add a replacement for it, * unfortunately. */ #define deletev CheckIObjectOkVector() && #endif /* __XPLC_DELETE_H__ */ xplc-0.3.13/include/xplc/factory.h0100644000204300020430000000430310331515666017152 0ustar pphaneufpphaneuf/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- * * XPLC - Cross-Platform Lightweight Components * Copyright (C) 2003, Pierre Phaneuf * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License * as published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA * * As a special exception, you may use this file as part of a free * software library without restriction. Specifically, if other files * instantiate templates or use macros or inline functions from this * file, or you compile this file and link it with other files to * produce an executable, this file does not by itself cause the * resulting executable to be covered by the GNU Lesser General Public * License. This exception does not however invalidate any other * reasons why the executable file might be covered by the GNU Lesser * General Public License. */ #ifndef __XPLC_FACTORY_H__ #define __XPLC_FACTORY_H__ #if defined(__GNUC__) && __GNUC__ > 3 # pragma GCC system_header #endif #include #include typedef IObject*(*FactoryFunc)(); /** * Generic factory class. Implements IFactory by calling the function * pointer that its constructor takes. */ class GenericFactory: public IFactory { IMPLEMENT_IOBJECT(GenericFactory); private: FactoryFunc factory; public: /** * Set up the generic factory. The generic factory will use the * function that the specified pointer indicates to answer to * IFactory::createObject requests. */ GenericFactory(FactoryFunc aFactory); /* IFactory */ virtual IObject* createObject(); }; #endif /* __XPLC_FACTORY_H__ */ xplc-0.3.13/include/xplc/module.h0100644000204300020430000000717510331515666017002 0ustar pphaneufpphaneuf/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- * * XPLC - Cross-Platform Lightweight Components * Copyright (C) 2002, Pierre Phaneuf * Copyright (C) 2002, Net Integration Technologies, Inc. * Copyright (C) 2002, Stéphane Lajoie * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License * as published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ #ifndef __XPLC_MODULE_H__ #define __XPLC_MODULE_H__ #if defined(__GNUC__) && __GNUC__ > 3 # pragma GCC system_header #endif /** \file * * Structures and definitions related to the XPLC module ABI * (Application Binary Interface). */ #include #ifdef UNSTABLE #include #endif /** * XPLC module magic number. Used to ensure that we are dealing with a * valid XPLC module. */ #define XPLC_MODULE_MAGIC 0x58504c43UL /** * The current XPLC module ABI version. */ //@{ #ifdef UNSTABLE #define XPLC_MODULE_VERSION_MAJOR UINT_MAX #define XPLC_MODULE_VERSION_MINOR 0 #else #define XPLC_MODULE_VERSION_MAJOR 0 #define XPLC_MODULE_VERSION_MINOR 0 #endif //@} /** * Defines attributes required for exported symbols. */ #ifdef WIN32 #define ENTRYPOINT extern "C" __declspec(dllexport) #else #define ENTRYPOINT extern "C" #endif /** * Entry for a component. Modules have an array of these, where the * function pointed at by getObject will be used to obtain an * interface pointer when the requested UUID matches the one in uuid. */ struct XPLC_ComponentEntry { //@{ const UUID& uuid; IObject* (*getObject)(); //@} }; /** * Entry for a category registration. Modules have an array of these, * used to indicate the category information for the module. */ struct XPLC_CategoryEntry { //@{ const UUID& category; const UUID& uuid; const char* const string; //@} }; /** * Information for an XPLC module. */ struct XPLC_ModuleInfo { /** * XPLC module magic number. This is to ensure that it is in fact a * valid XPLC module that has been loaded. */ unsigned long magic; /** * The XPLC module ABI version that this module conforms to. This * should always be the first member of the XPLC_ModuleInfo * structure, as the meaning of the following members depend on it. */ unsigned int version_major; /** * The XPLC module ABI sub-version that this module conforms * to. This is used for optional and backward-compatible changes in * the module ABI. */ unsigned int version_minor; /** * Description string for the module. */ const char* description; /** * List of components supported by the module. This is a pointer to * the list of components that will be made available by this * module. */ const XPLC_ComponentEntry* const components; /** * List of category registrations for the module. */ const XPLC_CategoryEntry* const categories; }; /** * Definition of the XPLC module information structure. This structure * should be initialized appropriately in a loadable XPLC module. */ ENTRYPOINT const XPLC_ModuleInfo XPLC_Module; #endif /* __XPLC_MODULE_H__ */ xplc-0.3.13/include/xplc/ptr.h0100644000204300020430000000750610331515666016320 0ustar pphaneufpphaneuf/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- * * XPLC - Cross-Platform Lightweight Components * Copyright (C) 2002-2004, Pierre Phaneuf * Copyright (C) 2002-2004, Net Integration Technologies, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License * as published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA * * As a special exception, you may use this file as part of a free * software library without restriction. Specifically, if other files * instantiate templates or use macros or inline functions from this * file, or you compile this file and link it with other files to * produce an executable, this file does not by itself cause the * resulting executable to be covered by the GNU Lesser General Public * License. This exception does not however invalidate any other * reasons why the executable file might be covered by the GNU Lesser * General Public License. */ #ifndef __XPLC_PTR_H__ #define __XPLC_PTR_H__ #if defined(__GNUC__) && __GNUC__ > 3 # pragma GCC system_header #endif /** \file * * Smart pointer for XPLC interfaces. */ #include #ifndef UNSTABLE #error "xplc_ptr is experimental!" #endif /** * Smart pointer class for XPLC interfaces. */ template class xplc_ptr { private: T* ptr; class ProtectedPtr: public T { private: virtual unsigned int addRef() = 0; virtual unsigned int release() = 0; #ifndef __XPLC_DELETE_H__ void operator delete(void*); #endif }; xplc_ptr& operator=(const xplc_ptr&); public: xplc_ptr(): ptr(0) { } /** * Construct an xplc_ptr from a raw pointer. This is the only way * that an xplc_ptr will take ownership of an interface from its * previous owner. */ explicit xplc_ptr(T* aObj): ptr(aObj) { } /** * Construct an xplc_ptr from another xplc_ptr. This will addRef the * interface, if the xplc_ptr is non-NULL. */ template explicit xplc_ptr(const xplc_ptr

& aObj): ptr(aObj) { if(ptr) ptr->addRef(); } ~xplc_ptr() { if(ptr) ptr->release(); } /** * Provide an operator->. This allows you to invoke methods on the * interface pointed at by the xplc_ptr. As with a raw pointer, if * the xplc_ptr is NULL, this will cause a crash. The interface is * wrapped in some basic protection, to avoid accidental addRef or * release. */ ProtectedPtr* operator->() const { return static_cast(ptr); } /** * Provide an operator*. This is so you can use "*foo" with an * xplc_ptr like you could with the raw pointer. It also applies * some basic protection. */ operator ProtectedPtr*() const { return static_cast(ptr); } /** * Assign a raw pointer to an xplc_ptr. This will addRef the * interface, and release the interface previously pointed at by the * xplc_ptr, if any. */ xplc_ptr& operator=(T* _ptr) { if(_ptr) _ptr->addRef(); if(ptr) ptr->release(); ptr = _ptr; return *this; } }; /** * Used to addRef an object before passing it to something that would * otherwise "steal" the reference. */ template T* do_addRef(T* obj) { if (obj) obj->addRef(); return obj; } #endif /* __XPLC_PTR_H__ */ xplc-0.3.13/include/xplc/trace.h0100644000204300020430000000503710331515666016606 0ustar pphaneufpphaneuf/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- * * XPLC - Cross-Platform Lightweight Components * Copyright (C) 2002, Pierre Phaneuf * Copyright (C) 2002, Net Integration Technologies, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License * as published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA * * As a special exception, you may use this file as part of a free * software library without restriction. Specifically, if other files * instantiate templates or use macros or inline functions from this * file, or you compile this file and link it with other files to * produce an executable, this file does not by itself cause the * resulting executable to be covered by the GNU Lesser General Public * License. This exception does not however invalidate any other * reasons why the executable file might be covered by the GNU Lesser * General Public License. */ #ifndef __XPLC_TRACE_H__ #define __XPLC_TRACE_H__ #if defined(__GNUC__) && __GNUC__ > 3 # pragma GCC system_header #endif #ifdef DEBUG #include /* * Mix-in template that trace constructors, destructors and refcount * to stderr. */ template class TraceComponent: public Component { public: TraceComponent() { fprintf(stderr, "%s: instantiated (%p)\n", __PRETTY_FUNCTION__, this); } virtual unsigned int addRef() { unsigned int refcount = Component::addRef(); fprintf(stderr, "%s = %i (%p)\n", __PRETTY_FUNCTION__, refcount, this); return refcount; } virtual unsigned int release() { unsigned int refcount = Component::release(); fprintf(stderr, "%s = %i (%p)\n", __PRETTY_FUNCTION__, refcount, this); return refcount; } virtual ~TraceComponent() { fprintf(stderr, "%s: destroyed (%p)\n", __PRETTY_FUNCTION__, this); } }; #else /* DEBUG */ #error "this header should not be used other than for debugging" #endif /* else DEBUG */ #endif /* __XPLC_TRACE_H__ */ xplc-0.3.13/include/xplc/utils.h0100644000204300020430000001424410331515666016650 0ustar pphaneufpphaneuf/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- * * XPLC - Cross-Platform Lightweight Components * Copyright (C) 2000-2003, Pierre Phaneuf * Copyright (C) 2001, Stéphane Lajoie * Copyright (C) 2002-2004, Net Integration Technologies, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License * as published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA * * As a special exception, you may use this file as part of a free * software library without restriction. Specifically, if other files * instantiate templates or use macros or inline functions from this * file, or you compile this file and link it with other files to * produce an executable, this file does not by itself cause the * resulting executable to be covered by the GNU Lesser General Public * License. This exception does not however invalidate any other * reasons why the executable file might be covered by the GNU Lesser * General Public License. */ #ifndef __XPLC_UTILS_H__ #define __XPLC_UTILS_H__ #if defined(__GNUC__) && __GNUC__ > 3 # pragma GCC system_header #endif /** \file * * Various utility functions, macros and templates. */ #include #include #include /** * Utility structure used for the interface map. */ struct UUID_Info { //@{ const UUID* iid; ptrdiff_t delta; //@} }; /** * Start the interface map for "component". */ #define UUID_MAP_BEGIN(component) const UUID_Info component::xplc_iobject_uuids[] = { /** * Add an entry to an interface map. */ #define UUID_MAP_ENTRY(iface) { &iface##_IID, reinterpret_cast(static_cast(reinterpret_cast(1))) - 1 }, /** * Add an entry to an interface map for an ambiguous interface. The * second parameter is the interface that should be used to * disambiguate. */ #define UUID_MAP_ENTRY_2(iface, iface2) { &iface##_IID, reinterpret_cast(static_cast(reinterpret_cast(1))) - 1 }, /** * Marks the end of an interface map. */ #define UUID_MAP_END { 0, 0 } }; class WeakRef; /** * Helper internal structure. Used for implementing IMPLEMENT_IOBJECT. */ struct IObjectImplInternal { /** * Holds the reference count. */ unsigned int refcount; /** * Pointer to a weak reference object. This object is lazily * instantiated, so the pointer is NULL until a weak reference is * needed. */ WeakRef* weakref; IObjectImplInternal(): refcount(1), weakref(0) { } /** * Used to implement IObject::getInterface(). */ IObject* getInterface(void* self, const UUID& uuid, const UUID_Info* uuidlist); }; #ifndef xplcdelete /** * Internal macro. This macro is needed to cooperate correctly with * the "delete detector". */ #define xplcdelete delete #endif /** * Helper macro to implement the IObject methods automatically. Put * this at the beginning of your class, specifiying the class name as * the parameter, and it will automatically implement all the IObject * methods. You also need to define an interface map. * * \sa UUID_MAP_BEGIN, UUID_MAP_ENTRY, UUID_MAP_ENTRY_2, UUID_MAP_END */ #define IMPLEMENT_IOBJECT(component) \ private: \ IObjectImplInternal xplc_iobject_internal; \ static const UUID_Info xplc_iobject_uuids[]; \ typedef component ThisXPLCComponent; \ public: \ virtual unsigned int addRef() { \ return ++xplc_iobject_internal.refcount; \ } \ virtual unsigned int release() { \ if(--xplc_iobject_internal.refcount) \ return xplc_iobject_internal.refcount; \ /* protect against re-entering the destructor */ \ xplc_iobject_internal.refcount = 1; \ if(xplc_iobject_internal.weakref) { \ xplc_iobject_internal.weakref->release(); \ xplc_iobject_internal.weakref->object = 0; \ } \ xplcdelete this; \ return 0; \ } \ virtual IObject* getInterface(const UUID& uuid) { \ return xplc_iobject_internal.getInterface(this, uuid, xplc_iobject_uuids); \ } \ virtual IWeakRef* getWeakRef() { \ if(!xplc_iobject_internal.weakref) \ xplc_iobject_internal.weakref = new WeakRef(reinterpret_cast(reinterpret_cast(this) + xplc_iobject_uuids->delta)); \ xplc_iobject_internal.weakref->addRef(); \ return xplc_iobject_internal.weakref; \ } /** \class WeakRef * * Common implementation of a weak reference. */ class WeakRef: public IWeakRef { IMPLEMENT_IOBJECT(WeakRef); public: /** The object that the weak reference is pointing at. */ IObject* object; virtual IObject* getObject() { if(object) object->addRef(); return object; } /** * Initialize a weak reference. */ WeakRef(IObject* aObj): object(aObj) { } }; /** * %XPLC equivalent to dynamic_cast. This templated function is a * typesafe way to call the getInterface method of a component and * cast it properly. If the component does not support the interface, * a NULL pointer will be returned. */ template Interface* get(IObject* aObj) { if(!aObj) return 0; return static_cast(aObj->getInterface(XPLC_IID::get())); } /** * A version of get() that releases its parameter. This templated * function is very similar to the "get" one, except that it * automatically releases the inbound reference, without regard * whether the getInterface actually yielded something. */ template Interface* mutate(IObject* aObj) { Interface* rv; if(!aObj) return 0; rv = static_cast(aObj->getInterface(XPLC_IID::get())); aObj->release(); return rv; } #endif /* __XPLC_UTILS_H__ */ xplc-0.3.13/include/xplc/xplc.h0100644000204300020430000000715510331515666016461 0ustar pphaneufpphaneuf/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- * * XPLC - Cross-Platform Lightweight Components * Copyright (C) 2000-2003, Pierre Phaneuf * Copyright (C) 2002, Net Integration Technologies, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License * as published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA * * As a special exception, you may use this file as part of a free * software library without restriction. Specifically, if other files * instantiate templates or use macros or inline functions from this * file, or you compile this file and link it with other files to * produce an executable, this file does not by itself cause the * resulting executable to be covered by the GNU Lesser General Public * License. This exception does not however invalidate any other * reasons why the executable file might be covered by the GNU Lesser * General Public License. */ #ifndef __XPLC_XPLC_H__ #define __XPLC_XPLC_H__ #if defined(__GNUC__) && __GNUC__ > 3 # pragma GCC system_header #endif /** \file * * The XPLC helper class for the C++ binding. */ #include #include #include /** \class XPLC xplc.h xplc/xplc.h * * The XPLC helper class. This class is part of the XPLC C++ binding * in order to provide a more natural C++ feel to the use of XPLC. */ class XPLC { private: xplc_ptr servmgr; public: XPLC(): servmgr(XPLC_getServiceManager()) {} /** * Create an XPLC object using an existing service manager * reference. */ XPLC(IServiceManager* _servmgr): servmgr(do_addRef(_servmgr)) {} /** * Adds a directory to the module loader path. */ void addModuleDirectory(const char* directory); /** * Obtain an XPLC object. Obtains an object with the provided UUID * from the service manager. */ IObject* get(const UUID& uuid) { return servmgr->getObject(uuid); } /** * Templated variant of XPLC::get() that will do a getInterface() * for you. */ template Interface* get(const UUID& uuid) { return mutate(servmgr->getObject(uuid)); } /** * Object creation helper. Obtains an object with the provided UUID * from the service manager, tries to get the IFactory interface * from the object and calls its createObject() method. */ IObject* create(const UUID& cid); /** * Templated variant of XPLC::create() that will do a getInterface() * for you. */ template Interface* create(const UUID& cid) { return mutate(create(cid)); } /** * Object creation helper that operates from a moniker. Works like * XPLC::create(const UUID&), but finds the object using a moniker * instead. */ IObject* create(const char*); /** * Templated variant of XPLC::create(const char*) that will do a * getInterface() for you. */ template Interface* create(const char* aMoniker) { return mutate(create(aMoniker)); } }; #endif /* __XPLC_XPLC_H__ */ xplc-0.3.13/include/xplc/IModuleManagerFactory.h0100644000204300020430000000261310331515666021666 0ustar pphaneufpphaneuf/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- * * XPLC - Cross-Platform Lightweight Components * Copyright (C) 2004, Pierre Phaneuf * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License * as published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ #ifndef __XPLC_IMODULEMANAGERFACTORY_H__ #define __XPLC_IMODULEMANAGERFACTORY_H__ #if defined(__GNUC__) && __GNUC__ > 3 # pragma GCC system_header #endif #include class IModuleManagerFactory: public IObject { UNSTABLE_INTERFACE public: virtual IServiceHandler* createModuleManager(const char* directory) = 0; }; DEFINE_IID(IModuleManagerFactory,{0x9c88d2d0, 0xc61f, 0x41b7, {0x9d, 0x4d, 0xd2, 0xc6, 0xc0, 0x97, 0x94, 0x55}}); #endif /* __XPLC_IMODULEMANAGERFACTORY_H__ */ xplc-0.3.13/include/autoconf.h.in0100644000204300020430000000614710331517632016763 0ustar pphaneufpphaneuf/* include/autoconf.h.in. Generated from configure.ac by autoheader. */ /* Define if you want to enable dynamic loading. */ #undef ENABLE_LOADER /* Define to 1 if you have the header file, and it defines `DIR'. */ #undef HAVE_DIRENT_H /* Define to 1 if you have the header file. */ #undef HAVE_DLFCN_H /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H /* Define to 1 if you have the header file. */ #undef HAVE_LIMITS_H /* Define to 1 if you have the header file. */ #undef HAVE_MACH_O_DYLD_H /* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H /* Define to 1 if you have the header file, and it defines `DIR'. */ #undef HAVE_NDIR_H /* Define to 1 if you have the header file. */ #undef HAVE_NETINET_IN_H /* Define to 1 if you have the header file. */ #undef HAVE_NET_IF_DL_H /* Define to 1 if you have the header file. */ #undef HAVE_NET_IF_H /* Define if struct sockaddr contains sa_len */ #undef HAVE_SA_LEN /* Define to 1 if you have the `srandom' function. */ #undef HAVE_SRANDOM /* Define to 1 if you have the header file. */ #undef HAVE_STDINT_H /* Define to 1 if you have the header file. */ #undef HAVE_STDLIB_H /* Define to 1 if you have the header file. */ #undef HAVE_STRINGS_H /* Define to 1 if you have the header file. */ #undef HAVE_STRING_H /* Define to 1 if you have the header file, and it defines `DIR'. */ #undef HAVE_SYS_DIR_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_IOCTL_H /* Define to 1 if you have the header file, and it defines `DIR'. */ #undef HAVE_SYS_NDIR_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_SOCKET_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_SOCKIO_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_STAT_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TYPES_H /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H /* Define to 1 if you have the header file. */ #undef HAVE_UUID_UUID_H /* Define to the address where bug reports for this package should be sent. */ #undef PACKAGE_BUGREPORT /* Define to the full name of this package. */ #undef PACKAGE_NAME /* Define to the full name and version of this package. */ #undef PACKAGE_STRING /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME /* Define to the version of this package. */ #undef PACKAGE_VERSION /* The size of a `int', as computed by sizeof. */ #undef SIZEOF_INT /* The size of a `long', as computed by sizeof. */ #undef SIZEOF_LONG /* The size of a `long long', as computed by sizeof. */ #undef SIZEOF_LONG_LONG /* The size of a `short', as computed by sizeof. */ #undef SIZEOF_SHORT /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS /* Define if you have dlopen. */ #undef WITH_DLOPEN /* Define if you have dyld. */ #undef WITH_DYLD xplc-0.3.13/include/.cvsignore0100644000204300020430000000003110030322223016333 0ustar pphaneufpphaneufautoconf.h autoconf.h.in xplc-0.3.13/include/config.h0100644000204300020430000000223410030322223015760 0ustar pphaneufpphaneuf/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- * * XPLC - Cross-Platform Lightweight Components * Copyright (C) 2002, Pierre Phaneuf * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License * as published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ #ifndef __XPLC_CONFIG_H__ #define __XPLC_CONFIG_H__ /* * Platforms that do not support Autoconf should skip including that * file. */ #if !defined(WIN32) #include "autoconf.h" #else #ifdef WIN32 #define ENABLE_LOADER #endif #endif #endif /* __XPLC_CONFIG_H__ */ xplc-0.3.13/configure.ac0100644000204300020430000001547610331523207015232 0ustar pphaneufpphaneuf# Process this file with autoconf to produce a configure script. # # XPLC - Cross-Platform Lightweight Components # Copyright (C) 2000-2002, Pierre Phaneuf # Copyright (C) 2002-2004, Net Integration Technologies, Inc. # # # This library is free software; you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as # published by the Free Software Foundation; either version 2.1 of the # License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 # USA AC_INIT(XPLC, 0.3.13, pp@ludusdesign.com) AC_REVISION($Id: configure.ac,v 1.41 2005/10/31 23:19:35 pphaneuf Exp $) AC_CANONICAL_HOST AC_ARG_ENABLE(debug, AC_HELP_STRING([--enable-debug], [debugging options])) AC_ARG_ENABLE(fatal-warnings, AC_HELP_STRING([--enable-fatal-warnings], [turn warnings into errors])) AC_ARG_ENABLE(optimization, AC_HELP_STRING([--disable-optimization], [optimization options])) AC_ARG_ENABLE(warnings, AC_HELP_STRING([--disable-warnings], [extra warnings])) AC_ARG_ENABLE(unstable, AC_HELP_STRING([--enable-unstable], [allow unstable interfaces in stable version])) AC_ARG_ENABLE(rtti, AC_HELP_STRING([--enable-rtti], [C++ run-time type identification (compiler)])) AC_ARG_ENABLE(exceptions, AC_HELP_STRING([--enable-exceptions], [C++ exceptions (compiler)])) AC_ARG_ENABLE(pic, AC_HELP_STRING([--disable-pic], [generation of position-independent code])) AC_ARG_ENABLE(loader, AC_HELP_STRING([--disable-loader], [dynamic loading])) AC_ARG_WITH(dlopen, AC_HELP_STRING([--with-dlopen], [dlopen])) AC_ARG_WITH(dyld, AC_HELP_STRING([--with-dyld], [dyld])) AC_ARG_WITH(libuuid, AC_HELP_STRING([--with-libuuid], [libuuid])) AC_CONFIG_SRCDIR([include/xplc/xplc.h]) AC_LANG(C++) AC_PROG_CC AC_PROG_CXX AC_PROG_INSTALL AC_PROG_LN_S AC_HEADER_DIRENT AC_CHECK_HEADERS([limits.h]) AC_CHECK_PROGS([CVS2CL], [cvs2cl.pl cvs2cl], [no]) case "$host_os" in darwin*|rhapsody*) so_style=darwin ;; *) so_style=sysv ;; esac # Make sure we link in libc. LDFLAGS="$LDFLAGS -lc" if test "$with_dlopen" != "no"; then AC_CHECK_HEADERS(dlfcn.h) AC_SEARCH_LIBS(dlopen, dl, with_dlopen=$ac_cv_search_dlopen, with_dlopen=no) test "$with_dlopen" = "none required" && with_dlopen= test "$with_dlopen" = "no" || AC_DEFINE(WITH_DLOPEN, 1, [Define if you have dlopen.]) fi if test "$with_dyld" != "no"; then AC_CHECK_HEADERS(mach-o/dyld.h) AC_SEARCH_LIBS(NSCreateObjectFileImageFromFile, System, with_dyld=$ac_cv_search_NSCreateObjectFileImageFromFile, with_dyld=no) test "$with_dyld" = "none required" && with_dyld= test "$with_dyld" = "no" || AC_DEFINE(WITH_DYLD, 1, [Define if you have dyld.]) fi # dyld not really supported yet if test "$with_dlopen" = "no" && test "$with_dyld" = "no"; then enable_loader=no fi if test "$enable_loader" != "no"; then AC_DEFINE(ENABLE_LOADER, 1, [Define if you want to enable dynamic loading.]) fi dnl Do some checks for uuid/ since no native library is available with_uuid=no if test "$with_uuid" == "no" && test "$with_libuuid" != "no"; then AC_CHECK_HEADERS(uuid/uuid.h, AC_CHECK_LIB(uuid, uuid_unparse, with_uuid=-luuid)) fi if test "$with_uuid" == "no"; then AC_CHECK_SIZEOF(short) AC_CHECK_SIZEOF(int) AC_CHECK_SIZEOF(long) AC_CHECK_SIZEOF(long long) SIZEOF_SHORT=$ac_cv_sizeof_short SIZEOF_INT=$ac_cv_sizeof_int SIZEOF_LONG=$ac_cv_sizeof_long SIZEOF_LONG_LONG=$ac_cv_sizeof_long_long AC_SUBST(SIZEOF_SHORT) AC_SUBST(SIZEOF_INT) AC_SUBST(SIZEOF_LONG) AC_SUBST(SIZEOF_LONG_LONG) AC_CHECK_HEADERS([inttypes.h stdlib.h unistd.h]) AC_CHECK_HEADERS([net/if.h net/if_dl.h netinet/in.h]) AC_CHECK_HEADERS([sys/ioctl.h sys/socket.h sys/sockio.h]) AC_CHECK_FUNCS(srandom) AC_CHECK_MEMBER(struct sockaddr.sa_len, AC_DEFINE_UNQUOTED(HAVE_SA_LEN, 1, [Define if struct sockaddr contains sa_len]),, [#include #include ]) with_uuid= with_uuid_static=uuid/libuuid.a fi if test "$enable_optimization" != "no"; then CFLAGS="$CFLAGS -O2" fi if test -z "$enable_debug"; then enable_debug=no fi if test "$enable_debug" != "no"; then CFLAGS="$CFLAGS -ggdb -DDEBUG" if test "$enable_debug" != "yes"; then CFLAGS="$CFLAGS -DDEBUG_$enable_debug" fi else CFLAGS="$CFLAGS -DNDEBUG" fi if test "$enable_fatal_warnings" = "yes"; then CFLAGS="$CFLAGS -Werror" fi if test "$enable_warnings" != "no"; then CFLAGS="$CFLAGS -Wall" CXXFLAGS="$CXXFLAGS -Woverloaded-virtual" if test "$enable_warnings" = "yes"; then CXXFLAGS="$CXXFLAGS -Wold-style-cast" fi fi if test "$enable_rtti" != "yes"; then CXXFLAGS="$CXXFLAGS -fno-rtti" fi if test "$enable_exceptions" != "yes"; then CXXFLAGS="$CXXFLAGS -fno-exceptions" fi if test "$enable_pic" != "no"; then CFLAGS="$CFLAGS -fpic" fi pc_version= xplcdir_version= lib_prefix_version= if test "$(echo $PACKAGE_VERSION | awk -F. '{ print $2 % 2}')" -eq 1; then enable_unstable=yes pc_version="-${PACKAGE_VERSION}" xplcdir_version="/xplc-${PACKAGE_VERSION}" lib_prefix_version="../" fi if test "$enable_unstable" = "yes"; then CFLAGS="$CFLAGS -DUNSTABLE" fi CXXFLAGS="$CXXFLAGS $CFLAGS" AC_SUBST(pc_version) AC_SUBST(xplcdir_version) AC_SUBST(lib_prefix_version) AC_SUBST(enable_loader) AC_SUBST(with_dlopen) AC_SUBST(so_style) AC_SUBST(with_uuid) AC_SUBST(with_uuid_static) AC_SUBST(CVS2CL) AC_CONFIG_FILES([config/config.mk]) AC_CONFIG_FILES([dist/xplc.pc dist/xplc-uninstalled.pc]) AC_CONFIG_FILES([examples/simple-module/Makefile]) AC_CONFIG_FILES([examples/simple-module-user/Makefile]) AC_CONFIG_FILES([uuid/uuid_types.h]) AC_CONFIG_HEADERS([include/autoconf.h]) AC_OUTPUT if test "$(echo $PACKAGE_VERSION | awk -F. '{ print $2 % 2}')" -eq 1; then AC_MSG_WARN([Unstable release, the API might change in the next release.]) fi if test "$enable_loader" = "no"; then AC_MSG_WARN([Dynamic loading is disabled.]) fi xplc-0.3.13/tests/0040755000204300020430000000000010331536343014101 5ustar pphaneufpphaneufxplc-0.3.13/tests/CVS/0040755000204300020430000000000010331535776014545 5ustar pphaneufpphaneufxplc-0.3.13/tests/CVS/Repository0100644000204300020430000000001310075346773016640 0ustar pphaneufpphaneufxplc/tests xplc-0.3.13/tests/CVS/Entries0100644000204300020430000000150410331535776016076 0ustar pphaneufpphaneuf/.cvsignore/1.4/Fri Oct 18 22:32:23 2002// /vars.mk/1.12/Fri Nov 22 23:03:37 2002// /test.h/1.26/Sat Jul 31 03:31:25 2004// /test000.cpp/1.11/Sat Jul 31 03:31:25 2004// /test001.cpp/1.13/Sat Jul 31 03:31:25 2004// /test002.cpp/1.13/Sat Jul 31 03:31:25 2004// /test003.cpp/1.8/Sat Jul 31 03:31:25 2004// /test004.cpp/1.12/Sat Jul 31 03:31:25 2004// /test005.cpp/1.16/Sat Jul 31 03:31:25 2004// /test006.cpp/1.8/Sat Jul 31 03:31:25 2004// /test008.cpp/1.7/Sat Jul 31 03:31:25 2004// /test009.cpp/1.12/Sat Jul 31 03:31:25 2004// /test011.cpp/1.3/Sat Jul 31 03:31:25 2004// /testmain.cpp/1.11/Wed Jan 5 23:17:56 2005// /rules.mk/1.21/Wed Jan 5 23:21:12 2005// /test007.cpp/1.7/Wed Jan 5 23:50:22 2005// /test010.cpp/1.11/Wed Apr 27 21:38:09 2005// /testobj.cpp/1.16/Wed Apr 27 21:38:09 2005// /testobj.h/1.5/Wed Apr 27 21:38:09 2005// D xplc-0.3.13/tests/CVS/Root0100644000204300020430000000006510331536343015400 0ustar pphaneufpphaneuf:pserver:anonymous@cvs.sourceforge.net:/cvsroot/xplc xplc-0.3.13/tests/.cvsignore0100644000204300020430000000003207554105767016110 0ustar pphaneufpphaneuf.*.d testmain testobj.dll xplc-0.3.13/tests/test000.cpp0100644000204300020430000000250610102611215015770 0ustar pphaneufpphaneuf/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- * * XPLC - Cross-Platform Lightweight Components * Copyright (C) 2000-2002, Pierre Phaneuf * Copyright (C) 2001, Stéphane Lajoie * Copyright (C) 2002, Net Integration Technologies, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License * as published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ #include "test.h" /* * test000 * * Verifies that shutdown properly releases all the involved objects. */ void test000() { IServiceManager* serv; serv = XPLC_getServiceManager(); ASSERT(serv != 0, "could not obtain service manager"); VERIFY(serv->release() == 0, "service manager has non-zero refcount after release"); } xplc-0.3.13/tests/test.h0100644000204300020430000001430410102611215015214 0ustar pphaneufpphaneuf/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- * * XPLC - Cross-Platform Lightweight Components * Copyright (C) 2000-2003, Pierre Phaneuf * Copyright (C) 2001, Stéphane Lajoie * Copyright (C) 2002-2004, Net Integration Technologies, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License * as published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ #ifndef __TESTS_TEST_H__ #define __TESTS_TEST_H__ #include #include #include #include void test000(); void test001(); void test002(); void test003(); void test004(); void test005(); void test006(); void test007(); void test008(); void test009(); void test010(); void test011(); void test_assert(const char* file, unsigned int line, bool test, const char* reason); void test_verify(const char* file, unsigned int line, bool test, const char* reason); #define ASSERT(cond, desc) test_assert(__FILE__, __LINE__, cond, desc) #define VERIFY(cond, desc) test_verify(__FILE__, __LINE__, cond, desc) #ifndef xplcdelete #define xplcdelete delete #endif class ITestInterface: public IObject { public: virtual unsigned int getRefCount() = 0; virtual void setRefCount(unsigned int) = 0; }; DEFINE_IID(ITestInterface, {0x794e20af, 0x5d35, 0x4d7a, {0x8f, 0x23, 0xf8, 0x53, 0xd7, 0x34, 0xb3, 0xa7}}); class ITestInterface2: public ITestInterface { public: virtual unsigned int getAnswer() = 0; }; DEFINE_IID(ITestInterface2, {0xdb0f1055, 0x805d, 0x4ad7, {0x98, 0xaa, 0xd0, 0x84, 0x59, 0xb5, 0x2f, 0xac}}); class TestWeakRef: public IWeakRef { private: unsigned int refcount; bool destroyed; TestWeakRef* weakref; public: IObject* object; TestWeakRef(IObject* aObject): refcount(1), destroyed(false), weakref(0), object(aObject) { } virtual ~TestWeakRef() { } virtual unsigned int addRef() { return ++refcount; } virtual unsigned int release() { if(--refcount) return refcount; ASSERT(!destroyed, "test object destroyed more than once"); refcount = 1; destroyed = true; if(weakref) weakref->object = 0; xplcdelete this; return 0; } virtual IObject* getInterface(const UUID& uuid) { ASSERT(!destroyed, "using destroyed test object"); if(uuid == IObject_IID) { addRef(); return static_cast(this); } if(uuid == IWeakRef_IID) { addRef(); return static_cast(this); } return 0; } virtual IWeakRef* getWeakRef() { if(!weakref) { weakref = new TestWeakRef(this); } return weakref; } virtual IObject* getObject() { if(object) object->addRef(); return object; } }; class TestObject: public ITestInterface2 { private: unsigned int refcount; bool destroyed; bool deletethis; TestWeakRef* weakref; public: TestObject(const bool _deletethis = false): refcount(1), destroyed(false), deletethis(_deletethis), weakref(0) { } virtual ~TestObject() { VERIFY(destroyed, "test object leaked"); } virtual unsigned int addRef() { ASSERT(!destroyed, "using destroyed test object"); return ++refcount; } virtual unsigned int release() { ASSERT(!destroyed, "test object destroyed more than once"); if(--refcount) return refcount; refcount = 1; destroyed = true; if(deletethis) xplcdelete this; return 0; } virtual IObject* getInterface(const UUID& uuid) { ASSERT(!destroyed, "using destroyed test object"); if(uuid == IObject_IID) { addRef(); return static_cast(this); } if(uuid == ITestInterface_IID) { addRef(); return static_cast(this); } return 0; } virtual IWeakRef* getWeakRef() { if(!weakref) { weakref = new TestWeakRef(this); } return weakref; } virtual unsigned int getRefCount() { ASSERT(!destroyed, "using destroyed test object"); return refcount; } virtual void setRefCount(unsigned int aRefCount) { ASSERT(!destroyed, "using destroyed test object"); refcount = aRefCount; if(!refcount) { refcount = 1; destroyed = true; } } virtual unsigned int getAnswer() { return 42; } }; static const UUID TestObject_CID = {0xfa8ebece, 0x047e, 0x4372, {0xb7, 0x34, 0x30, 0x10, 0x05, 0x32, 0x45, 0x47}}; class TestObjectFactory: public IFactory { private: unsigned int refcount; bool destroyed; TestWeakRef* weakref; public: TestObjectFactory(): refcount(1), destroyed(false), weakref(0) { } virtual ~TestObjectFactory() { } virtual unsigned int addRef() { return ++refcount; } virtual unsigned int release() { if(--refcount) return refcount; ASSERT(!destroyed, "test object factory destroyed more than once"); refcount = 1; destroyed = true; xplcdelete this; return 0; } virtual IObject* getInterface(const UUID& uuid) { if(uuid == IObject_IID) { addRef(); return static_cast(this); } if(uuid == IFactory_IID) { addRef(); return static_cast(this); } return 0; } virtual IWeakRef* getWeakRef() { if(!weakref) { weakref = new TestWeakRef(this); weakref->addRef(); } return weakref; } virtual IObject* createObject() { return new TestObject(true); } }; static const UUID TestObjectFactory_CID = {0x9cacf26d, 0xd362, 0x4543, {0xb0, 0x42, 0x10, 0xe8, 0xcb, 0xa3, 0xfd, 0xab}}; #endif /* __TESTS_TEST_H__ */ xplc-0.3.13/tests/test001.cpp0100644000204300020430000001111010102611215015760 0ustar pphaneufpphaneuf/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- * * XPLC - Cross-Platform Lightweight Components * Copyright (C) 2000-2002, Pierre Phaneuf * Copyright (C) 2001, Stéphane Lajoie * Copyright (C) 2002, Net Integration Technologies, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License * as published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ #include "test.h" #include /* * test001 * * Verifies that the service manager queries handlers properly. */ const UUID obj1 = {0xd60530d8, 0x9a3d, 0x4c8e, {0xaa, 0x0b, 0x48, 0x32, 0xc6, 0x9c, 0xf0, 0x1a}}; const UUID obj2 = {0x862adfe4, 0x0821, 0x4f88, {0x85, 0x4a, 0xb9, 0xbf, 0xb9, 0xdc, 0x8a, 0x29}}; const UUID obj3 = {0xe1eabacb, 0x0795, 0x4c6d, {0x81, 0x8e, 0x7a, 0xab, 0x2c, 0x5a, 0x82, 0x25}}; class Handler1: public IServiceHandler { IMPLEMENT_IOBJECT(Handler1); public: static Handler1* create() { return new Handler1; } virtual IObject* getObject(const UUID& uuid) { if(uuid == obj1) { return reinterpret_cast(1); } return 0; } }; class Handler2: public IServiceHandler { IMPLEMENT_IOBJECT(Handler2); public: static Handler2* create() { return new Handler2; } virtual IObject* getObject(const UUID& uuid) { VERIFY(uuid != obj1, "request for the first object reached second handler"); if(uuid == obj2) { return reinterpret_cast(2); } return 0; } }; class Handler3: public IServiceHandler { IMPLEMENT_IOBJECT(Handler3); public: static Handler3* create() { return new Handler3; } virtual IObject* getObject(const UUID& uuid) { VERIFY(uuid != obj1, "request for the first object reached third handler"); VERIFY(uuid != obj2, "request for the second object reached third handler"); if(uuid == obj3) { return reinterpret_cast(3); } return 0; } }; UUID_MAP_BEGIN(Handler1) UUID_MAP_ENTRY(IObject) UUID_MAP_ENTRY(IServiceHandler) UUID_MAP_END UUID_MAP_BEGIN(Handler2) UUID_MAP_ENTRY(IObject) UUID_MAP_ENTRY(IServiceHandler) UUID_MAP_END UUID_MAP_BEGIN(Handler3) UUID_MAP_ENTRY(IObject) UUID_MAP_ENTRY(IServiceHandler) UUID_MAP_END void test001() { IServiceManager* serv; IServiceHandler* handler1; IServiceHandler* handler2; IServiceHandler* handler3; IObject* obj; serv = XPLC_getServiceManager(); ASSERT(serv != 0, "could not obtain service manager"); handler1 = Handler1::create(); ASSERT(handler1 != 0, "could not instantiate test handler 1"); serv->addFirstHandler(handler1); handler2 = Handler2::create(); ASSERT(handler2 != 0, "could not instantiate test handler 2"); serv->addHandler(handler2); handler3 = Handler3::create(); ASSERT(handler3 != 0, "could not instantiate test handler 2"); serv->addLastHandler(handler3); obj = serv->getObject(obj1); VERIFY(obj != 0, "object 1 was not found"); VERIFY(obj == reinterpret_cast(1), "asked for object 1 and got another one"); obj = serv->getObject(obj2); VERIFY(obj != 0, "object 2 was not found"); VERIFY(obj == reinterpret_cast(2), "asked for object 2 and got another one"); obj = serv->getObject(obj3); VERIFY(obj != 0, "object 3 was not found"); VERIFY(obj == reinterpret_cast(3), "asked for object 3 and got another one"); serv->removeHandler(handler1); serv->removeHandler(handler2); serv->removeHandler(handler3); obj = serv->getObject(obj1); VERIFY(!obj, "object 1 still returned after removing handler 1"); obj = serv->getObject(obj2); VERIFY(!obj, "object 2 still returned after removing handler 2"); obj = serv->getObject(obj3); VERIFY(!obj, "object 3 still returned after removing handler 3"); VERIFY(handler1->release() == 0, "incorrect refcount on handler 1"); VERIFY(handler2->release() == 0, "incorrect refcount on handler 2"); VERIFY(handler3->release() == 0, "incorrect refcount on handler 3"); VERIFY(serv->release() == 0, "service manager has non-zero refcount after release"); } xplc-0.3.13/tests/test002.cpp0100644000204300020430000000525410102611215015775 0ustar pphaneufpphaneuf/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- * * XPLC - Cross-Platform Lightweight Components * Copyright (C) 2000-2003, Pierre Phaneuf * Copyright (C) 2001, Stéphane Lajoie * Copyright (C) 2002-2004, Net Integration Technologies, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License * as published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ #include "test.h" #include #include "../xplc/statichandler.h" /* * test002 * * Verifies the static service handler. */ void test002() { IStaticServiceHandler* handler; TestObject* test; IObject* obj; ITestInterface *itest; handler = new StaticServiceHandler; ASSERT(handler != 0, "could not instantiate static service handler"); test = new TestObject; ASSERT(test != 0, "could not instantiate test object"); VERIFY(test->getRefCount() == 1, "the test object has an incorrect refcount"); handler->addObject(TestObject_CID, test); VERIFY(test->getRefCount() == 2, "static service handler did not addRef the test component"); obj = handler->getObject(TestObject_CID); ASSERT(obj != 0, "could not get test component from static service handler"); itest = mutate(obj); ASSERT(itest != 0, "test component does not have the expected interface"); VERIFY(test->getRefCount() == 3, "the test object has an incorrect refcount"); itest->setRefCount(10); itest->addRef(); VERIFY(itest->getRefCount() == 11, "test component has unexpected behavior"); itest->setRefCount(3); VERIFY(itest->release() == 2, "test component has incorrect refcount"); handler->removeObject(TestObject_CID); VERIFY(test->getRefCount() == 1, "static service handler did not release the test component"); obj = handler->getObject(TestObject_CID); VERIFY(!obj, "static service handler did not remove the test component"); if(obj) obj->release(); VERIFY(handler->release() == 0, "static service handler has non-zero refcount after release"); VERIFY(test->release() == 0, "test object has non-zero refcount after release"); xplcdelete test; } xplc-0.3.13/tests/test003.cpp0100644000204300020430000000351610102611215015775 0ustar pphaneufpphaneuf/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- * * XPLC - Cross-Platform Lightweight Components * Copyright (C) 2000-2003, Pierre Phaneuf * Copyright (C) 2001, Stéphane Lajoie * Copyright (C) 2002-2004, Net Integration Technologies, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License * as published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ #include "test.h" #include #include /* * test003 * * Verifies the generic factory. */ IObject* testfactory() { return new TestObject; } void test003() { IFactory* factory; IObject* obj; ITestInterface* test; obj = new GenericFactory(testfactory); ASSERT(obj != 0, "could not instantiate generic factory"); factory = mutate(obj); ASSERT(factory != 0, "factory does not have expected interface"); obj = factory->createObject(); ASSERT(obj != 0, "factory did not create test object"); test = mutate(obj); ASSERT(test != 0, "test object does not have expected interface"); VERIFY(test->release() == 0, "test object has non-zero refcount after release"); VERIFY(factory->release() == 0, "factory has non-zero refcount after release"); xplcdelete test; } xplc-0.3.13/tests/test004.cpp0100644000204300020430000000446410102611215016001 0ustar pphaneufpphaneuf/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- * * XPLC - Cross-Platform Lightweight Components * Copyright (C) 2000-2004, Pierre Phaneuf * Copyright (C) 2001, Stéphane Lajoie * Copyright (C) 2002-2004, Net Integration Technologies, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License * as published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ #include "test.h" #include "config.h" #include #include #include "testobj.h" /* * test004 * * Verifies the module loader. */ void test004() { #ifdef ENABLE_LOADER IServiceManager* servmgr; IModuleLoader* loader; IModule* module; IObject* obj; ITestComponent* test; servmgr = XPLC_getServiceManager(); ASSERT(servmgr != 0, "could not obtain service manager"); obj = servmgr->getObject(XPLC_moduleLoader); ASSERT(obj != 0, "could not obtain the module loader component"); loader = mutate(obj); ASSERT(loader != 0, "module loader does not have expected interface"); module = loader->loadModule("./testobj.dll"); ASSERT(module, "could not load module"); VERIFY(loader->release() == 1, "module loader factory has wrong refcount"); obj = module->getObject(TestComponent_CID); ASSERT(obj != 0, "could not create test object"); test = mutate(obj); ASSERT(test != 0, "test object did not have expected interface"); ASSERT(test->getAnswer() == 42, "test object did not have expected behavior"); VERIFY(test->release() == 0, "test object has wrong refcount"); VERIFY(module->release() == 0, "module has wrong refcount"); VERIFY(servmgr->release() == 0, "service manager has non-zero refcount after release"); #endif } xplc-0.3.13/tests/test005.cpp0100644000204300020430000001040110102611215015766 0ustar pphaneufpphaneuf/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- * * XPLC - Cross-Platform Lightweight Components * Copyright (C) 2001-2003, Pierre Phaneuf * Copyright (C) 2002-2004, Net Integration Technologies, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License * as published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ #include "test.h" #include #include "../xplc/statichandler.h" /* * test005 * * Verifies the generic component template. */ class IFoo: public IObject { public: virtual unsigned int getFoo() = 0; virtual void setFoo(unsigned int) = 0; }; DEFINE_IID(IFoo, {0xdacffda8, 0x5eb4, 0x4c9b, {0xb5, 0xd4, 0x6d, 0xc5, 0x95, 0x5e, 0x4f, 0x74}}); class IBar: public IObject { public: virtual unsigned int getBar() = 0; virtual void setBar(unsigned int) = 0; }; DEFINE_IID(IBar, {0xa1520c1d, 0xcf44, 0x4830, {0xa9, 0xb2, 0xb1, 0x80, 0x9b, 0x1e, 0xe7, 0xa2}}); class MyTestObject: public IFoo, public IBar { IMPLEMENT_IOBJECT(MyTestObject); private: bool destroyed; unsigned int foo; unsigned int bar; public: static MyTestObject* create(); MyTestObject(): destroyed(false), foo(0), bar(0) { } virtual ~MyTestObject() { ASSERT(!destroyed, "test object destroyed twice"); destroyed = true; } virtual unsigned int getFoo() { return foo; } virtual void setFoo(unsigned int aFoo) { foo = aFoo; } virtual unsigned int getBar() { return bar; } virtual void setBar(unsigned int aBar) { bar = aBar; } }; UUID_MAP_BEGIN(MyTestObject) UUID_MAP_ENTRY_2(IObject, IFoo) UUID_MAP_ENTRY(IFoo) UUID_MAP_ENTRY(IBar) UUID_MAP_END MyTestObject* MyTestObject::create() { return new MyTestObject; } void test005() { MyTestObject* test = 0; IObject* iobj = 0; IFoo* ifoo = 0; IBar* ibar = 0; IWeakRef* weak1 = 0; IWeakRef* weak2 = 0; IObject* itest = 0; test = MyTestObject::create(); ASSERT(test, "could not instantiate test object"); iobj = static_cast(test)->getInterface(IObject_IID); VERIFY(iobj, "getInterface(IObject::getIID()) failed on test object"); VERIFY(reinterpret_cast(iobj) == reinterpret_cast(test), "identity test failed"); weak1 = iobj->getWeakRef(); ASSERT(weak1, "could not obtain first weak reference"); weak2 = iobj->getWeakRef(); ASSERT(weak2, "could not obtain second weak reference"); VERIFY(weak1 == weak2, "the two weak references are different"); ifoo = get(iobj); VERIFY(ifoo, "get failed on test object"); ibar = get(ifoo); VERIFY(ibar, "get failed on test object"); ifoo->setFoo(10); ibar->setBar(20); itest = weak1->getObject(); ASSERT(itest, "could not strengthen the weak reference"); VERIFY(itest->release() == 4, "incorrect refcount"); VERIFY(ifoo->getFoo() == 10, "test object has unexpected behavior"); VERIFY(ibar->getBar() == 20, "test object has unexpected behavior"); VERIFY(iobj->addRef() == 5, "incorrect refcount"); VERIFY(ifoo->addRef() == 6, "incorrect refcount"); VERIFY(ibar->addRef() == 7, "incorrect refcount"); VERIFY(iobj->release() == 6, "incorrect refcount"); VERIFY(ifoo->release() == 5, "incorrect refcount"); VERIFY(ibar->release() == 4, "incorrect refcount"); VERIFY(iobj->release() == 3, "incorrect refcount"); VERIFY(ifoo->release() == 2, "incorrect refcount"); VERIFY(ibar->release() == 1, "incorrect refcount"); VERIFY(static_cast(test)->release() == 0, "incorrect refcount"); itest = weak1->getObject(); VERIFY(!itest, "weak->getObject gave us something when it shouldn't"); VERIFY(weak1->release() == 1, "incorrect refcount"); VERIFY(weak2->release() == 0, "incorrect refcount"); } xplc-0.3.13/tests/rules.mk0100644000204300020430000000243310167073150015562 0ustar pphaneufpphaneuf# XPLC - Cross-Platform Lightweight Components # Copyright (C) 2000-2002, Pierre Phaneuf # Copyright (C) 2002, Net Integration Technologies, Inc. # # This library is free software; you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as # published by the Free Software Foundation; either version 2.1 of the # License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 # USA # # $Id: rules.mk,v 1.21 2005/01/05 23:21:12 pphaneuf Exp $ .PHONY: tests ifeq ("$(enable_loader)", "no") tests: default tests/testmain else tests: default tests/testmain tests/testobj.dll endif @echo "Running tests:" @cd tests && ./testmain $(TESTS) tests/testmain: tests/testmain.o $(patsubst %.cpp,%.o,$(wildcard tests/test[0-9][0-9][0-9].cpp)) libxplc.a libxplc-cxx.a $(LIBS) tests/testobj.dll: tests/testobj.o libxplc-cxx.a xplc-0.3.13/tests/test006.cpp0100644000204300020430000000643710102611215016005 0ustar pphaneufpphaneuf/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- * * XPLC - Cross-Platform Lightweight Components * Copyright (C) 2001-2002, Pierre Phaneuf * Copyright (C) 2002-2004, Net Integration Technologies, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License * as published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ #include "test.h" #include #include #include /* * test006 * * Verifies the moniker facility */ void test006() { IServiceManager* servmgr; IStaticServiceHandler* handler; IMonikerService* monikers; IObject* testobj; IObject* obj; servmgr = XPLC_getServiceManager(); ASSERT(servmgr != 0, "could not obtain service manager"); obj = servmgr->getObject(XPLC_staticServiceHandler); ASSERT(obj != 0, "could not obtain static service handler"); handler = mutate(obj); ASSERT(handler != 0, "static service handler does not have the IStaticServiceHandler interface"); testobj = new TestObject; ASSERT(testobj != 0, "could not create TestObject"); handler->addObject(TestObject_CID, testobj); VERIFY(servmgr->getObject(TestObject_CID) == testobj, "adding the test object did not work"); VERIFY(testobj->release() == 2, "incorrect refcount on test object"); obj = servmgr->getObject(XPLC_monikers); ASSERT(obj != 0, "could not obtain moniker component"); monikers = mutate(obj); ASSERT(monikers != 0, "moniker service does not have the IMoniker interface"); monikers->registerObject("moniker", XPLC_monikers); monikers->registerObject("testobject", TestObject_CID); obj = monikers->resolve("testobject"); ASSERT(obj != 0, "resolving the test object returned nothing"); ASSERT(obj == testobj, "the testobject moniker resolved to something else than the test object"); VERIFY(obj->release() == 2, "refcount is wrong on the test object"); obj = monikers->resolve("moniker:testobject"); ASSERT(obj != 0, "resolving the test object indirectly returned nothing"); ASSERT(obj == testobj, "the testobject moniker indirectly resolved to something else than the test object"); VERIFY(obj->release() == 2, "refcount is wrong on the test object"); obj = monikers->resolve("moniker:"); VERIFY(obj == 0, "resolving an empty sub-moniker returned something"); VERIFY(monikers->release() == 1, "incorrect refcount on moniker service"); VERIFY(handler->release() == 2, "incorrect refcount on static service handler"); VERIFY(servmgr->release() == 0, "service manager has non-zero refcount after release"); VERIFY(testobj->release() == 0, "refcount is wrong on the test object"); xplcdelete testobj; } xplc-0.3.13/tests/test007.cpp0100644000204300020430000000536710167076476016040 0ustar pphaneufpphaneuf/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- * * XPLC - Cross-Platform Lightweight Components * Copyright (C) 2002-2003, Pierre Phaneuf * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License * as published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ #include "test.h" #include #include /* * test007 * * Verifies the UUID stringification and parsing. */ #ifdef WIN32 #define snprintf _snprintf #endif void test007() { const UUID u0 = {0xe87db3a0, 0x109a, 0x4ecb, {0x86, 0x64, 0x66, 0x85, 0x45, 0x20, 0xa6, 0xcc}}; UUID u1; const char u2[] = "e87db3a0-109a-4ecb-8664-66854520a6cc"; char u3[39]; char u4[39]; char u5[39]; char u6[38]; int rv; ASSERT(sizeof(u0) == 16, "UUID structure is of unexpected size"); ASSERT(sizeof(u2) == 37, "u2 is of unexpected size"); u1 = UUID_null; u1 = UuidFromString(u2); VERIFY(u1 == u0, "u2 was not parsed properly into u1"); rv = snprintf(u3, 39, "{%s}", u2); ASSERT(rv == 38, "copying u2 into u3 with curly braces failed"); u1 = UUID_null; VERIFY(u1 == UUID_null, "u1 is not equal to UUID_null after resetting"); u1 = UuidFromString(u3); VERIFY(u1 == u0, "u3 was not parsed properly into u1"); rv = snprintf(u4, 39, "{%x-%x-%x-%x%x-%x%x%x%x%x%x}", u0.Data1, u0.Data2, u0.Data3, u0.Data4[0], u0.Data4[1], u0.Data4[2], u0.Data4[3], u0.Data4[4], u0.Data4[5], u0.Data4[6], u0.Data4[7]); ASSERT(rv == 38, "formatting u0 into u4 (with snprintf) failed"); VERIFY(strncmp(u3, u4, 39) == 0, "result of formatting u0 into u4 was different from u3"); UuidToString(u0, u5); VERIFY(strncmp(u3, u5, 39) == 0, "result of using toString on u0 was different from u3"); rv = snprintf(u6, 38, "{%s", u2); ASSERT(rv == 37, "copying u2 into u6 with starting curly brace failed"); u1 = u0; u1 = UuidFromString(u6); VERIFY(u1 == UUID_null, "fromString wrongfully accepted u6 into u1"); rv = snprintf(u6, 38, "%s}", u2); ASSERT(rv == 37, "copying u2 into u6 with ending curly brace failed"); u1 = u0; u1 = UuidFromString(u6); VERIFY(u1 == UUID_null, "fromString wrongfully accepted u6 into u1"); } xplc-0.3.13/tests/test008.cpp0100644000204300020430000000555010102611215016002 0ustar pphaneufpphaneuf/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- * * XPLC - Cross-Platform Lightweight Components * Copyright (C) 2001-2002, Pierre Phaneuf * Copyright (C) 2002, Net Integration Technologies, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License * as published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ #include "test.h" #include #include #include /* * test008 * * Verifies the "new" moniker */ void test008() { IServiceManager* servmgr; IStaticServiceHandler* handler; IMonikerService* monikers; ITestInterface* test; TestObjectFactory* factory; IObject* obj; servmgr = XPLC_getServiceManager(); ASSERT(servmgr != 0, "could not obtain service manager"); obj = servmgr->getObject(XPLC_staticServiceHandler); ASSERT(obj != 0, "could not obtain static service handler"); handler = mutate(obj); ASSERT(handler != 0, "static service handler does not have the IStaticServiceHandler interface"); factory = new TestObjectFactory; ASSERT(factory != 0, "could not instantiate test object factory"); handler->addObject(TestObjectFactory_CID, factory); VERIFY(servmgr->getObject(TestObjectFactory_CID) == factory, "adding the test object factory did not work"); VERIFY(factory->release() == 2, "incorrect refcount on test object factory"); VERIFY(handler->release() == 2, "incorrect refcount on static service handler"); monikers = mutate(servmgr->getObject(XPLC_monikers)); ASSERT(monikers != 0, "could not obtain correct moniker service"); monikers->registerObject("testobject", TestObjectFactory_CID); obj = monikers->resolve("new:testobject"); ASSERT(obj != 0, "could not obtain test object"); VERIFY(monikers->release() == 1, "incorrect refcount on moniker service"); test = get(obj); VERIFY(test != 0, "test object does not have ITestInterface"); VERIFY(test->release() == 1, "incorrect refcount on test object"); VERIFY(obj->release() == 0, "incorrect refcount on test object"); VERIFY(servmgr->release() == 0, "service manager has non-zero refcount after release"); VERIFY(factory->release() == 0, "incorrect refcount on test object factory"); } xplc-0.3.13/tests/test009.cpp0100644000204300020430000000456110102611215016004 0ustar pphaneufpphaneuf/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- * * XPLC - Cross-Platform Lightweight Components * Copyright (C) 2002-2004, Pierre Phaneuf * Copyright (C) 2002-2004, Net Integration Technologies, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License * as published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ #include "config.h" #include #include #include #include "test.h" #include "testobj.h" /* * test009 * * Verifies the module manager. */ void test009() { #ifdef ENABLE_LOADER IServiceManager* servmgr; IObject* obj; IModuleManagerFactory* mgrfactory; IServiceHandler* modulemgr; ITestComponent* test; servmgr = XPLC_getServiceManager(); ASSERT(servmgr != 0, "could not obtain service manager"); obj = servmgr->getObject(XPLC_moduleManagerFactory); ASSERT(obj != 0, "could not obtain module manager factory"); mgrfactory = mutate(obj); ASSERT(mgrfactory != 0, "factory does not have expected interface"); modulemgr = mgrfactory->createModuleManager("."); ASSERT(modulemgr, "could not create module manager"); VERIFY(mgrfactory->release() == 1, "factory has wrong refcount"); obj = modulemgr->getObject(TestComponent_CID); ASSERT(obj != 0, "could not create test object"); test = mutate(obj); ASSERT(test != 0, "test object did not have expected interface"); ASSERT(test->getAnswer() == 42, "test object did not have expected behavior"); VERIFY(test->release() == 0, "test object has wrong refcount"); VERIFY(modulemgr->release() == 0, "incorrect refcount on module loader"); VERIFY(servmgr->release() == 0, "service manager has non-zero refcount after release"); #endif } xplc-0.3.13/tests/test010.cpp0100644000204300020430000001157010234003101015765 0ustar pphaneufpphaneuf/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- * * XPLC - Cross-Platform Lightweight Components * Copyright (C) 2003, Pierre Phaneuf * Copyright (C) 2003, Net Integration Technologies, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License * as published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ #include #include #include #include #include "test.h" #include "testobj.h" #include "config.h" /* * test010 * * Tests categories. */ static const UUID myComponent1 = {0xb4a924ca, 0x0b81, 0x48de, {0xb6, 0x61, 0x5c, 0x63, 0x54, 0xcc, 0xa0, 0xac}}; static const UUID myComponent2 = {0x02080213, 0x37f7, 0x4961, {0x85, 0x2e, 0x78, 0x97, 0x51, 0x9c, 0xfa, 0x49}}; static const UUID myComponent3 = {0xea511e95, 0x5be4, 0x4b08, {0x86, 0xca, 0xad, 0xd5, 0x9a, 0xf7, 0xe2, 0x94}}; #ifdef ENABLE_LOADER #define NUM_CATITEM 4 #else #define NUM_CATITEM 3 #endif void test010() { IServiceManager* servmgr; IObject* obj; ICategoryManager* catmgr; ICategory* cat; ICategoryIterator* iter; unsigned int num; bool seen[NUM_CATITEM]; #ifdef ENABLE_LOADER IModuleManagerFactory* mgrfactory; IServiceHandler* modulemgr; #endif servmgr = XPLC_getServiceManager(); ASSERT(servmgr != 0, "could not obtain service manager"); obj = servmgr->getObject(XPLC_categoryManager); ASSERT(obj != 0, "could not obtain category manager"); catmgr = mutate(obj); ASSERT(catmgr != 0, "category manager does not have expected interface"); #ifdef ENABLE_LOADER obj = servmgr->getObject(XPLC_moduleManagerFactory); ASSERT(obj != 0, "could not obtain module manager factory"); mgrfactory = mutate(obj); ASSERT(mgrfactory != 0, "factory does not have expected interface"); modulemgr = mgrfactory->createModuleManager("."); ASSERT(modulemgr, "could not create module manager"); VERIFY(mgrfactory->release() == 1, "factory has wrong refcount"); #endif catmgr->registerComponent(testCategory, myComponent1, "myComponent1"); catmgr->registerComponent(testCategory, myComponent2, "myComponent2"); catmgr->registerComponent(testCategory, myComponent3, 0); cat = catmgr->getCategory(testCategory); ASSERT(cat, "could not obtain the category"); for(num = 0; num < NUM_CATITEM; ++num) { seen[num] = false; } iter = cat->getIterator(); ASSERT(iter, "could not obtain the category iterator"); num = 0; for(; !iter->done(); iter->next()) { ++num; if(iter->getUuid() == myComponent1) { VERIFY(!seen[0], "myComponent1 already seen"); VERIFY(iter->getString() && strcmp(iter->getString(), "myComponent1") == 0, "incorrect string for myComponent1"); seen[0] = true; } else if(iter->getUuid() == myComponent2) { VERIFY(!seen[1], "myComponent2 already seen"); VERIFY(iter->getString() && strcmp(iter->getString(), "myComponent2") == 0, "incorrect string for myComponent2"); seen[1] = true; } else if(iter->getUuid() == myComponent3) { VERIFY(!seen[2], "myComponent3 already seen"); VERIFY(!iter->getString(), "incorrect string for myComponent3"); seen[2] = true; #ifdef ENABLE_LOADER } else if(iter->getUuid() == TestComponent_CID) { VERIFY(!seen[3], "TestComponent already seen"); VERIFY(iter->getString() && strcmp(iter->getString(), "TestComponent") == 0, "incorrect string for TestComponent"); seen[3] = true; #endif } else { VERIFY(false, "got an unknown component"); } } VERIFY(iter->release() == 0, "category iterator has wrong refcount"); VERIFY(num == NUM_CATITEM, "the category has an incorrect number of items"); VERIFY(cat->release() == 0, "category has wrong refcount"); #ifdef ENABLE_LOADER VERIFY(modulemgr->release() == 0, "incorrect refcount on module loader"); #endif VERIFY(catmgr->release() == 1, "category manager has wrong refcount"); VERIFY(servmgr->release() == 0, "service manager has non-zero refcount after release"); } xplc-0.3.13/tests/test011.cpp0100644000204300020430000000561610102611215015777 0ustar pphaneufpphaneuf/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- * * XPLC - Cross-Platform Lightweight Components * Copyright (C) 2004, Pierre Phaneuf * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License * as published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ #include "test.h" #include /* * test011 * * Tests xplc_ptr<>. */ void test011() { TestObject* testobj1 = new TestObject(false); TestObject* testobj2 = new TestObject(false); IObject* obj; ITestInterface* testiface; ITestInterface2* testiface2; testobj1->addRef(); testobj2->addRef(); { xplc_ptr ptr1(testobj1); xplc_ptr ptr2(testobj2); xplc_ptr ptr3(ptr1); VERIFY(ptr1->getRefCount() == 3, "incorrect refcount on test object 1"); VERIFY(ptr2->getRefCount() == 2, "incorrect refcount on test object 2"); VERIFY(ptr1, "test for truth"); VERIFY(!(!ptr1), "test for falseness"); VERIFY(ptr1 == ptr1, "test for self-equality"); VERIFY(!(ptr1 == ptr2), "test for broken equality"); VERIFY(ptr1 != ptr2, "test for broken non-equality"); if(testobj1 < testobj2) { VERIFY(ptr1 < ptr2, "test for less-than operator"); VERIFY(!(ptr2 < ptr1), "test for less-than operator"); VERIFY(ptr2 > ptr1, "test for greater-than operator"); VERIFY(!(ptr1 > ptr2), "test for greater-than operator"); } else { VERIFY(ptr2 < ptr1, "test for less-than operator"); VERIFY(!(ptr1 < ptr2), "test for less-than operator"); VERIFY(ptr1 > ptr2, "test for greater-than operator"); VERIFY(!(ptr2 > ptr1), "test for greater-than operator"); } ptr1 = 0; VERIFY(testobj1->getRefCount() == 2, "incorrect refcount on test object"); ptr1 = testobj1; obj = ptr1; VERIFY(obj == testobj1, "assignment to IObject"); testiface = ptr1; VERIFY(testiface == testobj1, "assignment to ITestInterface"); testiface2 = ptr1; VERIFY(testiface2 == testobj1, "assignment to ITestInterface2"); VERIFY(testobj1->getRefCount() == 3, "incorrect refcount on test object 1"); } VERIFY(testobj1->release() == 0, "incorrect refcount on test object 1"); VERIFY(testobj2->release() == 0, "incorrect refcount on test object 2"); delete testobj1; delete testobj2; } xplc-0.3.13/tests/testmain.cpp0100644000204300020430000000553110167072644016440 0ustar pphaneufpphaneuf/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- * * XPLC - Cross-Platform Lightweight Components * Copyright (C) 2000-2002, Pierre Phaneuf * Copyright (C) 2001, Stéphane Lajoie * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License * as published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ #include #include #include #include #include "test.h" static unsigned int passed; static unsigned int failed; struct Test { const char* name; void (*test)(); }; static char* prog; #define ADD_TEST(testname) { #testname, testname } static Test tests[] = { ADD_TEST(test000), ADD_TEST(test001), ADD_TEST(test002), ADD_TEST(test003), ADD_TEST(test004), ADD_TEST(test005), ADD_TEST(test006), ADD_TEST(test007), ADD_TEST(test008), ADD_TEST(test009), ADD_TEST(test010), ADD_TEST(test011), { 0, 0 } }; void test_assert(const char* file, unsigned int line, bool test, const char* reason) { if(test) { passed++; } else { failed++; fprintf(stderr, "%s:%i: %s\n", file, line, reason); fprintf(stderr, "%s: %i failed, %i passed\n", prog, failed, passed); exit(1); } } void test_verify(const char* file, unsigned int line, bool test, const char* reason) { if(test) { passed++; } else { failed++; fprintf(stderr, "%s:%i: %s\n", file, line, reason); } } int main(int argc, char* argv[]) { Test* test = tests; unsigned int total_passed = 0; unsigned int total_failed = 0; prog = argv[0]; for(test = tests; test && test->test; ++test) { assert(test->name); if(argc > 1) { int argsleft = argc; for(argsleft = argc; argsleft > 1 && strcmp(argv[argsleft - 1], test->name) != 0; --argsleft) { } if(argsleft <= 1) continue; } passed = 0; failed = 0; test->test(); total_passed += passed; total_failed += failed; } if((total_failed + total_passed) == 0) { fprintf(stderr, "%s: BAD TEST\n", prog); exit(1); } fprintf(stderr, "%s: %i failed, %i passed\n", prog, total_failed, total_passed); return (total_failed != 0); } xplc-0.3.13/tests/testobj.cpp0100644000204300020430000000374410234003101016243 0ustar pphaneufpphaneuf/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- * * XPLC - Cross-Platform Lightweight Components * Copyright (C) 2000-2002, Pierre Phaneuf * Copyright (C) 2002, Net Integration Technologies, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License * as published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ #include #include #include #include "testobj.h" /* * testobj * * Contains a small test object. */ class TestComponent: public ITestComponent { IMPLEMENT_IOBJECT(TestComponent); public: /* ITestComponent */ virtual int getAnswer(); }; int TestComponent::getAnswer() { /* * The Answer to Life, Universe and Everything. */ return 42; } static IObject* factory() { static TestComponent* component = 0; if(!component) component = new TestComponent; return component; } UUID_MAP_BEGIN(TestComponent) UUID_MAP_ENTRY(IObject) UUID_MAP_ENTRY(ITestComponent) UUID_MAP_END const XPLC_ComponentEntry components[] = { { TestComponent_CID, &factory }, { UUID_null, 0 } }; const XPLC_CategoryEntry categories[] = { { testCategory, TestComponent_CID, "TestComponent" }, { UUID_null, UUID_null, 0 } }; const XPLC_ModuleInfo XPLC_Module = { XPLC_MODULE_MAGIC, XPLC_MODULE_VERSION_MAJOR, XPLC_MODULE_VERSION_MINOR, "Test Module", components, categories }; xplc-0.3.13/tests/testobj.h0100644000204300020430000000320110234003101015674 0ustar pphaneufpphaneuf/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- * * XPLC - Cross-Platform Lightweight Components * Copyright (C) 2000-2002, Pierre Phaneuf * Copyright (C) 2002, Net Integration Technologies, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License * as published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ #ifndef __TESTS_TESTOBJ_H__ #define __TESTS_TESTOBJ_H__ #include class ITestComponent: public IObject { public: virtual int getAnswer() = 0; }; DEFINE_IID(ITestComponent, {0x1db2ab25, 0xc54f, 0x4374, {0x8b, 0x52, 0xc1, 0x85, 0xe7, 0xeb, 0x83, 0x91}}); static const UUID TestComponent_CID = {0x746d2ba8, 0x0a52, 0x4156, {0xb9, 0x20, 0x05, 0x85, 0x3f, 0xf1, 0x73, 0x43}}; static const UUID testCategory = {0xeb1babb7, 0xebbf, 0x415f, {0xa5, 0x3b, 0xc0, 0xda, 0x3b, 0x6d, 0xad, 0x99}}; #endif /* __TESTS_TESTOBJ_H__ */ xplc-0.3.13/tests/vars.mk0100644000204300020430000000171407567533711015422 0ustar pphaneufpphaneuf# XPLC - Cross-Platform Lightweight Components # Copyright (C) 2000-2002, Pierre Phaneuf # Copyright (C) 2002, Net Integration Technologies, Inc. # # This library is free software; you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as # published by the Free Software Foundation; either version 2.1 of the # License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 # USA # # $Id: vars.mk,v 1.12 2002/11/22 23:03:37 pphaneuf Exp $ CLEAN+=tests/testmain tests/testobj.dll xplc-0.3.13/xplc/0040755000204300020430000000000010331536343013705 5ustar pphaneufpphaneufxplc-0.3.13/xplc/CVS/0040755000204300020430000000000010234003101014317 5ustar pphaneufpphaneufxplc-0.3.13/xplc/CVS/Repository0100644000204300020430000000001210075346774016444 0ustar pphaneufpphaneufxplc/xplc xplc-0.3.13/xplc/CVS/Entries0100644000204300020430000000225610234003101015655 0ustar pphaneufpphaneuf/.cvsignore/1.1/Fri Oct 18 22:32:23 2002// /handlernode.h/1.7/Mon Nov 18 07:10:41 2002// /loader.h/1.4/Fri Jan 30 22:59:37 2004// /monikernode.h/1.4/Sat Nov 30 07:53:59 2002// /monikers.cpp/1.9/Sun Oct 19 05:28:04 2003// /monikers.h/1.6/Wed Apr 7 16:43:53 2004// /new.cpp/1.12/Sun Oct 19 05:28:04 2003// /new.h/1.7/Wed Apr 7 16:43:53 2004// /objectnode.h/1.4/Mon Nov 18 04:52:41 2002// /rules.mk/1.19/Fri May 21 20:21:35 2004// /servmgr.h/1.23/Wed Apr 7 16:43:53 2004// /statichandler.cpp/1.14/Fri Jun 25 18:23:30 2004// /statichandler.h/1.9/Wed Dec 31 18:44:17 2003// /vars.mk/1.13/Thu Dec 5 03:48:19 2002// /modulemgr.h/1.1/Tue Jul 20 14:35:44 2004// /modulemgr.cpp/1.4/Thu Sep 30 21:09:54 2004// /category.cpp/1.4/Sat Feb 12 01:15:24 2005// /category.h/1.5/Sat Feb 12 01:15:35 2005// /categorynode.h/1.2/Sat Feb 12 01:15:35 2005// /catiter.cpp/1.2/Sat Feb 12 01:15:35 2005// /catiter.h/1.2/Sat Feb 12 01:15:35 2005// /catmgr.cpp/1.10/Sat Feb 12 01:15:35 2005// /catmgr.h/1.7/Sat Feb 12 01:15:36 2005// /servmgr.cpp/1.34/Fri Apr 8 20:45:21 2005// /loader.cpp/1.14/Fri Apr 8 22:44:09 2005// /moduleloader.h/1.14/Wed Mar 9 21:02:21 2005// /moduleloader.cpp/1.30/Wed Apr 27 21:38:09 2005// D xplc-0.3.13/xplc/CVS/Root0100644000204300020430000000006510331536343015204 0ustar pphaneufpphaneuf:pserver:anonymous@cvs.sourceforge.net:/cvsroot/xplc xplc-0.3.13/xplc/.cvsignore0100644000204300020430000000000507554105767015714 0ustar pphaneufpphaneuf.*.d xplc-0.3.13/xplc/statichandler.cpp0100644000204300020430000000466610067066642017255 0ustar pphaneufpphaneuf/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- * * XPLC - Cross-Platform Lightweight Components * Copyright (C) 2000-2003, Pierre Phaneuf * Copyright (C) 2002, Net Integration Technologies, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License * as published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ #include #include #include #include "statichandler.h" UUID_MAP_BEGIN(StaticServiceHandler) UUID_MAP_ENTRY(IObject) UUID_MAP_ENTRY(IServiceHandler) UUID_MAP_ENTRY(IStaticServiceHandler) UUID_MAP_END StaticServiceHandler::~StaticServiceHandler() { ObjectNode* node; ObjectNode* ptr; node = objects; while(node) { ptr = node; node = node->next; delete ptr; } objects = 0; } IObject* StaticServiceHandler::getObject(const UUID& aUuid) { ObjectNode* node; node = objects; while(node) { if(node->uuid == aUuid) { node->obj->addRef(); return node->obj; } node = node->next; } /* * No match was found, we return empty-handed. */ return 0; } void StaticServiceHandler::addObject(const UUID& aUuid, IObject* aObj) { ObjectNode* node; /* No object given? */ if(!aObj) return; node = objects; while(node) { if(node->uuid == aUuid) break; node = node->next; } /* * FIXME: maybe add a "replace" bool parameter? Or would this * encourage UUID hijacking too much? */ if(node) return; node = new ObjectNode(aUuid, aObj, objects); objects = node; } void StaticServiceHandler::removeObject(const UUID& aUuid) { ObjectNode* node; ObjectNode** ptr; node = objects; ptr = &objects; while(node) { if(node->uuid == aUuid) { *ptr = node->next; delete node; break; } ptr = &node->next; node = *ptr; } } xplc-0.3.13/xplc/category.cpp0100644000204300020430000000265310203254254016225 0ustar pphaneufpphaneuf/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- * * XPLC - Cross-Platform Lightweight Components * Copyright (C) 2003, Net Integration Technologies, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License * as published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ #include #include "category.h" #include "catiter.h" UUID_MAP_BEGIN(Category) UUID_MAP_ENTRY(IObject) UUID_MAP_ENTRY(ICategory) UUID_MAP_END Category::Category(ICategoryManager* aMgr, CategoryEntryNode* aEntries): mgr(aMgr), entries(aEntries) { /* * Prevent the category manager from dying (which would free the * list). */ mgr->addRef(); } ICategoryIterator* Category::getIterator() { return new CategoryIterator(this, entries); } Category::~Category() { mgr->release(); } xplc-0.3.13/xplc/category.h0100644000204300020430000000252110203254267015670 0ustar pphaneufpphaneuf/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- * * XPLC - Cross-Platform Lightweight Components * Copyright (C) 2003, Net Integration Technologies, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License * as published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ #ifndef __XPLC_CATEGORY_H__ #define __XPLC_CATEGORY_H__ #include #include "categorynode.h" class Category: public ICategory { IMPLEMENT_IOBJECT(Category); private: ICategoryManager* mgr; CategoryEntryNode* entries; public: Category(ICategoryManager*, CategoryEntryNode*); /* ICategory */ virtual ICategoryIterator* getIterator(); virtual ~Category(); }; #endif /* __XPLC_CATEGORY_H__ */ xplc-0.3.13/xplc/categorynode.h0100644000204300020430000000356210203254267016544 0ustar pphaneufpphaneuf/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- * * XPLC - Cross-Platform Lightweight Components * Copyright (C) 2000, Pierre Phaneuf * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License * as published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ #ifndef __XPLC_CATEGORYNODE_H__ #define __XPLC_CATEGORYNODE_H__ #include #include class CategoryEntryNode { public: CategoryEntryNode* next; UUID entry; char* str; CategoryEntryNode(const UUID& aUuid, const char* aStr, CategoryEntryNode* aNext): next(aNext), entry(aUuid), str(aStr ? strdup(aStr) : 0) { } ~CategoryEntryNode() { if(next) delete next; if(str) free(str); } }; class CategoryNode { public: CategoryNode* next; UUID category; CategoryEntryNode* entries; CategoryNode(const UUID& aUuid, CategoryNode* aNext): next(aNext), category(aUuid), entries(0) { } ~CategoryNode() { if(entries) delete entries; if(next) delete next; } }; #endif /* __XPLC_CATEGORYNODE_H__ */ xplc-0.3.13/xplc/catiter.cpp0100644000204300020430000000344210203254267016044 0ustar pphaneufpphaneuf/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- * * XPLC - Cross-Platform Lightweight Components * Copyright (C) 2004, Net Integration Technologies, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License * as published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ #include #include "catiter.h" UUID_MAP_BEGIN(CategoryIterator) UUID_MAP_ENTRY(IObject) UUID_MAP_ENTRY(ICategoryIterator) UUID_MAP_END CategoryIterator::CategoryIterator(ICategory* aCategory, CategoryEntryNode* aEntries): category(aCategory), current(aEntries) { /* * Prevent the category from dying, which in turn prevents the * category manager from dying (which would free the list). */ category->addRef(); } const UUID& CategoryIterator::getUuid() { if(current) return current->entry; return UUID_null; } const char* CategoryIterator::getString() { if(current) return current->str; return 0; } void CategoryIterator::next() { if(current) current = current->next; } bool CategoryIterator::done() { return current == 0; } CategoryIterator::~CategoryIterator() { category->release(); } xplc-0.3.13/xplc/catiter.h0100644000204300020430000000270010203254267015505 0ustar pphaneufpphaneuf/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- * * XPLC - Cross-Platform Lightweight Components * Copyright (C) 2004, Net Integration Technologies, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License * as published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ #ifndef __XPLC_CATITER_H__ #define __XPLC_CATEITER_H__ #include #include #include "categorynode.h" class CategoryIterator: public ICategoryIterator { IMPLEMENT_IOBJECT(CategoryIterator); private: ICategory* category; CategoryEntryNode* current; public: CategoryIterator(ICategory*, CategoryEntryNode*); virtual const UUID& getUuid(); virtual const char* getString(); virtual void next(); virtual bool done(); virtual ~CategoryIterator(); }; #endif /* __XPLC_CATEITER_H__ */ xplc-0.3.13/xplc/catmgr.cpp0100644000204300020430000000426610203254267015673 0ustar pphaneufpphaneuf/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- * * XPLC - Cross-Platform Lightweight Components * Copyright (C) 2003, Net Integration Technologies, Inc. * Copyright (C) 2003, Pierre Phaneuf * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License * as published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ #include #include #include #include "catmgr.h" #include "category.h" UUID_MAP_BEGIN(CategoryManager) UUID_MAP_ENTRY(IObject) UUID_MAP_ENTRY(ICategoryManager) UUID_MAP_END CategoryManager::CategoryManager(): categories(0) { } CategoryManager::~CategoryManager() { if(categories) delete categories; } void CategoryManager::registerComponent(const UUID& aCatid, const UUID& aUuid, const char* aString) { CategoryNode* cat; CategoryEntryNode* entry; for(cat = categories; cat; cat = cat->next) { if(cat->category == aCatid) break; } if(!cat) { cat = new CategoryNode(aCatid, categories); categories = cat; } assert(cat); for(entry = cat->entries; entry; entry = entry->next) { if(entry->entry == aUuid) return; } entry = new CategoryEntryNode(aUuid, aString, cat->entries); assert(entry); cat->entries = entry; } ICategory* CategoryManager::getCategory(const UUID& aUuid) { CategoryNode* cat; for(cat = categories; cat; cat = cat->next) { if(cat->category == aUuid) return new Category(this, cat->entries); } return new Category(this, NULL); } xplc-0.3.13/xplc/catmgr.h0100644000204300020430000000264710203254270015333 0ustar pphaneufpphaneuf/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- * * XPLC - Cross-Platform Lightweight Components * Copyright (C) 2003, Net Integration Technologies, Inc. * Copyright (C) 2003, Pierre Phaneuf * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License * as published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ #ifndef __XPLC_CATMGR_H__ #define __XPLC_CATMGR_H__ #include #include "categorynode.h" class CategoryManager: public ICategoryManager { IMPLEMENT_IOBJECT(CategoryManager); private: CategoryNode* categories; public: CategoryManager(); virtual ~CategoryManager(); /* ICategoryManager */ virtual void registerComponent(const UUID&, const UUID&, const char*); virtual ICategory* getCategory(const UUID&); }; #endif /* __XPLC_CATMGR_H__ */ xplc-0.3.13/xplc/handlernode.h0100644000204300020430000000265307566111161016347 0ustar pphaneufpphaneuf/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- * * XPLC - Cross-Platform Lightweight Components * Copyright (C) 2000-2002, Pierre Phaneuf * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License * as published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ #ifndef __XPLC_HANDLERNODE_H__ #define __XPLC_HANDLERNODE_H__ #include class HandlerNode { public: HandlerNode* next; IServiceHandler* handler; bool intercept; HandlerNode(IServiceHandler* aHandler, HandlerNode* aNext, bool aIntercept): next(aNext), handler(aHandler), intercept(aIntercept) { handler->addRef(); } ~HandlerNode() { handler->release(); } }; #endif /* __XPLC_HANDLERNODE_H__ */ xplc-0.3.13/xplc/loader.cpp0100644000204300020430000001202110225604471015650 0ustar pphaneufpphaneuf/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- * * XPLC - Cross-Platform Lightweight Components * Copyright (C) 2002, Net Integration Technologies, Inc. * Copyright (C) 2002-2004, Pierre Phaneuf * Copyright (C) 2002-2004, Stéphane Lajoie * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License * as published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ #include #include #include "config.h" #include "loader.h" #ifdef HAVE_DLFCN_H #include #endif #ifdef HAVE_MACH_O_DYLD_H #include #endif #if defined(WITH_DLOPEN) && defined(ENABLE_LOADER) const char* loaderOpen(const char* aFilename, void** aHandle) { const char* rv = 0; /* clear out dl error */ static_cast(dlerror()); *aHandle = dlopen(aFilename, RTLD_NOW); if(!*aHandle) rv = dlerror(); return rv; } const char* loaderSymbol(void* aHandle, const char* aSymbol, void** aPointer) { /* clear out dl error */ static_cast(dlerror()); *aPointer = dlsym(aHandle, aSymbol); return dlerror(); } bool loaderClose(void*& aHandle) { bool rv; rv = dlclose(aHandle) == 0; aHandle = 0; return rv; } #elif defined(WITH_DYLD) && defined(ENABLE_LOADER) const char* loaderOpen(const char* aFilename, void** aHandle) { NSObjectFileImage ofi = 0; NSObjectFileImageReturnCode ofirc; ofirc = NSCreateObjectFileImageFromFile(aFilename, &ofi); switch(ofirc) { case NSObjectFileImageSuccess: *aHandle = NSLinkModule(ofi, aFilename, NSLINKMODULE_OPTION_RETURN_ON_ERROR | NSLINKMODULE_OPTION_PRIVATE | NSLINKMODULE_OPTION_BINDNOW); NSDestroyObjectFileImage(ofi); break; case NSObjectFileImageInappropriateFile: *aHandle = const_cast(reinterpret_cast(NSAddImage(aFilename, NSADDIMAGE_OPTION_RETURN_ON_ERROR))); break; default: return "could not open dynamic library"; break; } return 0; } const char* loaderSymbol(void* aHandle, const char* aSymbol, void** aPointer) { int len = strlen(aSymbol); char* sym = static_cast(malloc(len + 2)); NSSymbol* nssym = 0; snprintf(sym, len + 2, "_%s", aSymbol); /* Check for both possible magic numbers depending on x86/ppc byte order */ if ((((struct mach_header *)aHandle)->magic == MH_MAGIC) || (((struct mach_header *)aHandle)->magic == MH_CIGAM)) { if (NSIsSymbolNameDefinedInImage((struct mach_header *)aHandle, sym)) { nssym = (NSModule *)NSLookupSymbolInImage((struct mach_header *)aHandle, sym, NSLOOKUPSYMBOLINIMAGE_OPTION_BIND | NSLOOKUPSYMBOLINIMAGE_OPTION_RETURN_ON_ERROR); } } else { nssym = (NSModule *)NSLookupSymbolInModule(aHandle, sym); } free(sym); if(!nssym) { *aPointer = 0; return "symbol not found"; } return 0; } bool loaderClose(void*& aHandle) { aHandle = 0; return false; } #elif defined(WIN32) #include const char* getErrorMessage() { static char error[1024]; FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM, 0, GetLastError(), 0, error, sizeof(error), 0); return error; } const char* loaderOpen(const char* aFilename, void** aHandle) { const char* rv = 0; UINT oldErrorMode = SetErrorMode(0); SetErrorMode(oldErrorMode | SEM_FAILCRITICALERRORS); *aHandle = LoadLibrary(aFilename); SetErrorMode(oldErrorMode); if(!*aHandle) rv = getErrorMessage(); return rv; } const char* loaderSymbol(void* aHandle, const char* aSymbol, void** aPointer) { const char* rv = 0; *aPointer = GetProcAddress(static_cast(aHandle), aSymbol); if(!aPointer) rv = getErrorMessage(); return rv; } bool loaderClose(void*& aHandle) { bool rv; rv = FreeLibrary(static_cast(aHandle)) != 0; aHandle = 0; return rv; } #else const char* loaderOpen(const char* aFilename, void** aHandle) { *aHandle = 0; return "dynamic loading not supported on this platform"; } const char* loaderSymbol(void* aHandle, const char* aSymbol, void** aPointer) { *aPointer = 0; return "dynamic loading not supported on this platform"; } bool loaderClose(void*& aHandle) { aHandle = 0; return false; } #endif xplc-0.3.13/xplc/loader.h0100644000204300020430000000236310006560731015322 0ustar pphaneufpphaneuf/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- * * XPLC - Cross-Platform Lightweight Components * Copyright (C) 2002, Net Integration Technologies, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License * as published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ #ifndef __XPLC_LOADER_H__ #define __XPLC_LOADER_H__ const char* loaderOpen(const char* aFilename, void** aHandle); const char* loaderSymbol(void* aHandle, const char* aSymbol, void** aPointer); bool loaderClose(void*& aHandle); #endif /* __XPLC_LOADER_H__ */ xplc-0.3.13/xplc/moduleloader.cpp0100644000204300020430000000662210234003101017047 0ustar pphaneufpphaneuf/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- * * XPLC - Cross-Platform Lightweight Components * Copyright (C) 2002-2004, Net Integration Technologies, Inc. * Copyright (C) 2002-2004, Pierre Phaneuf * Copyright (C) 2002-2004, Stéphane Lajoie * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License * as published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ #include #include #include #include "moduleloader.h" #include "loader.h" UUID_MAP_BEGIN(ModuleLoader) UUID_MAP_ENTRY(IObject) UUID_MAP_ENTRY(IModuleLoader) UUID_MAP_END UUID_MAP_BEGIN(Module) UUID_MAP_ENTRY(IObject) UUID_MAP_ENTRY(IServiceHandler) UUID_MAP_ENTRY(IModule) UUID_MAP_END IModule* ModuleLoader::loadModule(const char* modulename) { return Module::loadModule(modulename); } Module* Module::loadModule(const char* modulename) { XPLC_ModuleInfo* moduleinfo = 0; void* dlh; const char* err; err = loaderOpen(modulename, &dlh); if(err) return NULL; err = loaderSymbol(dlh, "XPLC_Module", reinterpret_cast(&moduleinfo)); if(err || !moduleinfo || moduleinfo->magic != XPLC_MODULE_MAGIC) { loaderClose(dlh); return NULL; } switch(moduleinfo->version_major) { #ifdef UNSTABLE case -1: /* nothing to do */ break; #endif default: loaderClose(dlh); return NULL; }; return new Module(dlh, moduleinfo); } Module::Module(void* aHandle, const XPLC_ModuleInfo* aModuleInfo): handle(aHandle), moduleinfo(aModuleInfo) { assert(moduleinfo); if(moduleinfo->categories) { IServiceManager* servmgr; IObject* obj; ICategoryManager* catmgr; const XPLC_CategoryEntry* entry; servmgr = XPLC_getServiceManager(); assert(servmgr); obj = servmgr->getObject(XPLC_categoryManager); assert(obj); servmgr->release(); catmgr = mutate(obj); assert(catmgr); entry = moduleinfo->categories; while(entry->category != UUID_null && entry->uuid != UUID_null) { catmgr->registerComponent(entry->category, entry->uuid, entry->string); ++entry; } catmgr->release(); } } IObject* Module::getObject(const UUID& cid) { const XPLC_ComponentEntry* entry = moduleinfo->components; IObject* obj = 0; if(!entry) return NULL; while(!obj && entry->uuid != UUID_null) { if(entry->uuid == cid) obj = entry->getObject(); ++entry; } return obj; } Module::~Module() { /* * FIXME: Adding the conditional here is for future expansion, where * this class could be used for a non-dynamically loaded module. But * for some reason, the size of this file increases in an odd way * when it is added. This should be investigated. */ if(handle) loaderClose(handle); } xplc-0.3.13/xplc/moduleloader.h0100644000204300020430000000313010213662135016522 0ustar pphaneufpphaneuf/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- * * XPLC - Cross-Platform Lightweight Components * Copyright (C) 2002-2004, Net Integration Technologies, Inc. * Copyright (C) 2002-2004, Pierre Phaneuf * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License * as published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ #ifndef __XPLC_MODULELOADER_H__ #define __XPLC_MODULELOADER_H__ #include #include #include class ModuleLoader: public IModuleLoader { IMPLEMENT_IOBJECT(ModuleLoader); public: virtual IModule* loadModule(const char* modulename); }; class Module: public IModule { IMPLEMENT_IOBJECT(Module); private: void *handle; const XPLC_ModuleInfo* moduleinfo; public: Module(void* aHandle, const XPLC_ModuleInfo* aModuleInfo); static Module* loadModule(const char* modulename); virtual IObject* getObject(const UUID& cid); virtual ~Module(); }; #endif /* __XPLC_MODULELOADER_H__ */ xplc-0.3.13/xplc/modulemgr.h0100644000204300020430000000321210077226700016044 0ustar pphaneufpphaneuf/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- * * XPLC - Cross-Platform Lightweight Components * Copyright (C) 2002-2004, Net Integration Technologies, Inc. * Copyright (C) 2002-2004, Pierre Phaneuf * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License * as published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ #ifndef __XPLC_MODULEMGR_H__ #define __XPLC_MODULEMGR_H__ #include #include class ModuleManagerFactory: public IModuleManagerFactory { IMPLEMENT_IOBJECT(ModuleManagerFactory); private: public: static ModuleManagerFactory* create() { return new ModuleManagerFactory; } virtual IServiceHandler* createModuleManager(const char* directory); }; struct ModuleNode; class ModuleManager: public IServiceHandler { IMPLEMENT_IOBJECT(ModuleManager); private: ModuleNode* modules; public: ModuleManager(ModuleNode* aModules); virtual IObject* getObject(const UUID& cid); virtual ~ModuleManager(); }; #endif /* __XPLC_MODULEMGR_H__ */ xplc-0.3.13/xplc/monikernode.h0100644000204300020430000000251607572067227016406 0ustar pphaneufpphaneuf/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- * * XPLC - Cross-Platform Lightweight Components * Copyright (C) 2002, Net Integration Technologies, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License * as published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ #ifndef __XPLC_MONIKERNODE_H__ #define __XPLC_MONIKERNODE_H__ #include #include class MonikerNode { public: MonikerNode* next; char* name; UUID uuid; MonikerNode(const char* aName, const UUID& aUuid, MonikerNode* aNext): next(aNext), name(strdup(aName)), uuid(aUuid) { } ~MonikerNode() { if(name) free(name); } }; #endif /* __XPLC_MONIKERNODE_H__ */ xplc-0.3.13/xplc/monikers.cpp0100644000204300020430000000524207744420344016247 0ustar pphaneufpphaneuf/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- * * XPLC - Cross-Platform Lightweight Components * Copyright (C) 2002, Net Integration Technologies, Inc. * Copyright (C) 2002-2003, Pierre Phaneuf * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License * as published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ #include #include #include "monikers.h" #define MONIKER_SEPARATOR_CHAR ':' UUID_MAP_BEGIN(MonikerService) UUID_MAP_ENTRY(IObject) UUID_MAP_ENTRY(IMoniker) UUID_MAP_ENTRY(IMonikerService) UUID_MAP_END MonikerService::~MonikerService() { MonikerNode* node; MonikerNode* ptr; node = monikers; while(node) { ptr = node; node = node->next; delete ptr; } monikers = 0; } IObject* MonikerService::resolve(const char* aName) { MonikerNode* node; IServiceManager* servmgr; IObject* obj = 0; IMoniker* moniker; char* name = strdup(aName); char* rest = strchr(name, MONIKER_SEPARATOR_CHAR); node = monikers; if(rest) { *rest = 0; ++rest; } while(node) { if(strcmp(name, node->name) == 0) { servmgr = XPLC_getServiceManager(); if(!servmgr) break; obj = servmgr->getObject(node->uuid); servmgr->release(); if(rest) { moniker = mutate(obj); if(moniker) { obj = moniker->resolve(rest); moniker->release(); } else obj = 0; } break; } node = node->next; } free(name); return obj; } void MonikerService::registerObject(const char* aName, const UUID& aUuid) { MonikerNode* node; /* * FIXME: we should do something about registering a name that * contains the separator character. */ node = monikers; while(node) { if(strcmp(aName, node->name) == 0) break; node = node->next; } /* * FIXME: maybe add a "replace" bool parameter? Or would this * encourage moniker hijacking too much? */ if(node) return; node = new MonikerNode(aName, aUuid, monikers); monikers = node; } xplc-0.3.13/xplc/monikers.h0100644000204300020430000000267510035027711015707 0ustar pphaneufpphaneuf/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- * * XPLC - Cross-Platform Lightweight Components * Copyright (C) 2002-2004, Net Integration Technologies, Inc. * Copyright (C) 2002-2003, Pierre Phaneuf * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License * as published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ #ifndef __XPLC_MONIKERS_H__ #define __XPLC_MONIKERS_H__ #include #include "monikernode.h" class MonikerService: public IMonikerService { IMPLEMENT_IOBJECT(MonikerService); private: MonikerNode* monikers; public: MonikerService(): monikers(0) { } virtual ~MonikerService(); /* IMoniker */ virtual IObject* resolve(const char*); /* IMonikerService */ virtual void registerObject(const char*, const UUID&); }; #endif /* __XPLC_MONIKERS_H__ */ xplc-0.3.13/xplc/servmgr.cpp0100644000204300020430000001143710225566541016106 0ustar pphaneufpphaneuf/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- * * XPLC - Cross-Platform Lightweight Components * Copyright (C) 2000-2004, Pierre Phaneuf * Copyright (C) 2000, Stéphane Lajoie * Copyright (C) 2002-2004, Net Integration Technologies, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License * as published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ #include #include #include #include "servmgr.h" #include "catmgr.h" #include "statichandler.h" #include "moduleloader.h" #include "monikers.h" #include "new.h" #include "modulemgr.h" UUID_MAP_BEGIN(ServiceManager) UUID_MAP_ENTRY(IObject) UUID_MAP_ENTRY(IServiceManager) UUID_MAP_END static ServiceManager* singleton; IServiceManager* XPLC_getServiceManager() { if(singleton) singleton->addRef(); else { IStaticServiceHandler* handler; IStaticServiceHandler* handler2; IMonikerService* monikers; IObject* obj; singleton = new ServiceManager; if(!singleton) return 0; handler = new StaticServiceHandler; if(!handler) { singleton->release(); return 0; } /* * Populate the static service handler. */ handler2 = new StaticServiceHandler; if(handler2) { handler->addObject(XPLC_staticServiceHandler, handler2); singleton->addHandler(handler2); handler2->release(); } else { singleton->release(); return 0; } obj = new NewMoniker; if(obj) { handler->addObject(XPLC_newMoniker, obj); obj->release(); } obj = new CategoryManager; if(obj) { handler->addObject(XPLC_categoryManager, obj); obj->release(); } obj = new ModuleLoader; if(obj) { handler->addObject(XPLC_moduleLoader, obj); obj->release(); } obj = new ModuleManagerFactory; if(obj) { handler->addObject(XPLC_moduleManagerFactory, obj); obj->release(); } monikers = new MonikerService; if(monikers) { monikers->registerObject("new", XPLC_newMoniker); handler->addObject(XPLC_monikers, monikers); monikers->release(); } singleton->addHandler(handler); handler->release(); } return singleton; } ServiceManager::~ServiceManager() { HandlerNode* next; while(handlers) { next = handlers->next; delete handlers; handlers = next; } if(singleton == this) singleton = 0; } void ServiceManager::addHandler(IServiceHandler* aHandler) { HandlerNode* node; HandlerNode** ptr; ptr = &handlers; node = *ptr; while(node) { if(node->handler == aHandler) break; if(node->intercept) { ptr = &node->next; } node = node->next; } /* * The handler is already there. */ if(node) return; node = new HandlerNode(aHandler, *ptr, false); *ptr = node; } void ServiceManager::addFirstHandler(IServiceHandler* aHandler) { HandlerNode* node; node = handlers; while(node) { if(node->handler == aHandler) break; node = node->next; } /* * The handler is already there. */ if(node) return; node = new HandlerNode(aHandler, handlers, true); handlers = node; } void ServiceManager::addLastHandler(IServiceHandler* aHandler) { HandlerNode* node; HandlerNode** ptr; ptr = &handlers; node = *ptr; while(node) { if(node->handler == aHandler) break; ptr = &node->next; node = *ptr; } /* * The handler is already there. */ if(node) return; node = new HandlerNode(aHandler, *ptr, false); *ptr = node; } void ServiceManager::removeHandler(IServiceHandler* aHandler) { HandlerNode* node; HandlerNode** ptr; node = handlers; ptr = &handlers; while(node) { if(node->handler == aHandler) { *ptr = node->next; delete node; break; } ptr = &node->next; node = *ptr; } } IObject* ServiceManager::getObject(const UUID& aUuid) { IObject* obj; HandlerNode* handler; handler = handlers; while(handler) { obj = handler->handler->getObject(aUuid); /* * No need to addRef the object, the handler does it for us. */ if(obj) return obj; handler = handler->next; } return 0; } xplc-0.3.13/xplc/new.cpp0100644000204300020430000000326207744420344015211 0ustar pphaneufpphaneuf/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- * * XPLC - Cross-Platform Lightweight Components * Copyright (C) 2002-2003, Pierre Phaneuf * Copyright (C) 2002, Net Integration Technologies, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License * as published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ #include #include #include #include "new.h" UUID_MAP_BEGIN(NewMoniker) UUID_MAP_ENTRY(IObject) UUID_MAP_ENTRY(IMoniker) UUID_MAP_END NewMoniker::~NewMoniker() { } IObject* NewMoniker::resolve(const char* aName) { IServiceManager* servmgr; IMoniker* monikers; IFactory* factory; IObject* obj = 0; servmgr = XPLC_getServiceManager(); if(servmgr) { monikers = mutate(servmgr->getObject(XPLC_monikers)); if(monikers) { factory = mutate(monikers->resolve(aName)); if(factory) { obj = factory->createObject(); factory->release(); } monikers->release(); } servmgr->release(); } return obj; } xplc-0.3.13/xplc/new.h0100644000204300020430000000233110035027711014636 0ustar pphaneufpphaneuf/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- * * XPLC - Cross-Platform Lightweight Components * Copyright (C) 2002-2003, Pierre Phaneuf * Copyright (C) 2004, Net Integration Technologies, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License * as published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ #ifndef __XPLC_NEW_H__ #define __XPLC_NEW_H__ #include class NewMoniker: public IMoniker { IMPLEMENT_IOBJECT(NewMoniker); public: /* IMoniker */ virtual IObject* resolve(const char*); virtual ~NewMoniker(); }; #endif /* __XPLC_NEW_H__ */ xplc-0.3.13/xplc/objectnode.h0100644000204300020430000000254107566071031016175 0ustar pphaneufpphaneuf/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- * * XPLC - Cross-Platform Lightweight Components * Copyright (C) 2000, Pierre Phaneuf * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License * as published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ #ifndef __XPLC_OBJECTNODE_H__ #define __XPLC_OBJECTNODE_H__ #include class ObjectNode { public: ObjectNode* next; UUID uuid; IObject* obj; ObjectNode(const UUID& aUuid, IObject* aObj, ObjectNode* aNext): next(aNext), uuid(aUuid), obj(aObj) { obj->addRef(); } ~ObjectNode() { obj->release(); } }; #endif /* __XPLC_OBJECTNODE_H__ */ xplc-0.3.13/xplc/rules.mk0100644000204300020430000000220010053462317015357 0ustar pphaneufpphaneuf# XPLC - Cross-Platform Lightweight Components # Copyright (C) 2000-2002, Pierre Phaneuf # Copyright (C) 2002-2004, Net Integration Technologies, Inc. # # This library is free software; you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as # published by the Free Software Foundation; either version 2.1 of the # License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 # USA # # $Id: rules.mk,v 1.19 2004/05/21 20:21:35 pphaneuf Exp $ default: libxplc.a libxplc_s.a libxplc.so xplc-uninstalled.pc libxplc.a libxplc.so: $(patsubst %.cpp,%.o,$(wildcard xplc/*.cpp)) libxplc.so: libxplc-cxx.a xplc-uninstalled.pc: dist/xplc-uninstalled.pc cp $^ $@ xplc-0.3.13/xplc/servmgr.h0100644000204300020430000000313110035027711015531 0ustar pphaneufpphaneuf/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- * * XPLC - Cross-Platform Lightweight Components * Copyright (C) 2000-2002, Pierre Phaneuf * Copyright (C) 2001, Stéphane Lajoie * Copyright (C) 2002-2004, Net Integration Technologies, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License * as published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ #ifndef __XPLC_SERVMGR_H__ #define __XPLC_SERVMGR_H__ #include #include "handlernode.h" class ServiceManager: public IServiceManager { IMPLEMENT_IOBJECT(ServiceManager); private: HandlerNode* handlers; public: ServiceManager(): handlers(0) { } virtual ~ServiceManager(); /* IServiceManager */ virtual void addHandler(IServiceHandler*); virtual void addFirstHandler(IServiceHandler*); virtual void addLastHandler(IServiceHandler*); virtual void removeHandler(IServiceHandler*); virtual IObject* getObject(const UUID&); }; #endif /* __XPLC_SERVMGR_H__ */ xplc-0.3.13/xplc/modulemgr.cpp0100644000204300020430000001025510127073042016377 0ustar pphaneufpphaneuf/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- * * XPLC - Cross-Platform Lightweight Components * Copyright (C) 2002-2004, Net Integration Technologies, Inc. * Copyright (C) 2002-2004, Pierre Phaneuf * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License * as published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ #include #include "modulemgr.h" #include #include "config.h" #ifdef HAVE_STDINT_H # include #endif #ifdef HAVE_LIMITS_H # include #endif #if !defined(WIN32) # if HAVE_DIRENT_H # include # define NAMLEN(dirent) strlen((dirent)->d_name) # else # define dirent direct # define NAMLEN(dirent) (dirent)->d_namlen # if HAVE_SYS_NDIR_H # include # endif # if HAVE_SYS_DIR_H # include # endif # if HAVE_NDIR_H # include # endif # endif #else # include #endif #include UUID_MAP_BEGIN(ModuleManagerFactory) UUID_MAP_ENTRY(IObject) UUID_MAP_ENTRY(IModuleManagerFactory) UUID_MAP_END UUID_MAP_BEGIN(ModuleManager) UUID_MAP_ENTRY(IObject) UUID_MAP_ENTRY(IServiceHandler) UUID_MAP_END struct ModuleNode { ModuleNode* next; IModule* module; ModuleNode(IModule* aModule, ModuleNode* aNext): next(aNext), module(aModule) { assert(module); } ~ModuleNode() { if(module) module->release(); } }; IServiceHandler* ModuleManagerFactory::createModuleManager(const char* directory) { #if !defined(WIN32) DIR* dir; struct dirent* ent; char fname[PATH_MAX]; IServiceManager* servmgr = XPLC_getServiceManager(); IModuleLoader* loader; ModuleNode* modules = 0; if(!servmgr) return 0; loader = mutate(servmgr->getObject(XPLC_moduleLoader)); servmgr->release(); if(!loader) return 0; dir = opendir(directory); if(!dir) { loader->release(); return 0; } rewinddir(dir); while((ent = readdir(dir))) { IModule* module; snprintf(fname, PATH_MAX, "%s/%s", directory, ent->d_name); module = loader->loadModule(fname); if(module) { ModuleNode* node = new ModuleNode(module, modules); if(node) modules = node; } } loader->release(); closedir(dir); return new ModuleManager(modules); #else intptr_t dir; _finddata_t ent; char fname[4096]; char pattern[4096]; IServiceManager* servmgr = XPLC_getServiceManager(); IModuleLoader* loader; ModuleNode* modules = 0; if(!servmgr) return 0; loader = mutate(servmgr->getObject(XPLC_moduleLoader)); servmgr->release(); if(!loader) return 0; snprintf(pattern, sizeof(pattern), "%s/*.*", directory); dir = _findfirst(pattern, &ent); if(!dir) { loader->release(); return 0; } do { IModule* module; _snprintf(fname, sizeof(fname), "%s/%s", directory, ent.name); module = loader->loadModule(fname); if(module) { ModuleNode* node = new ModuleNode(module, modules); if(node) modules = node; } } while(_findnext(dir, &ent) == 0); loader->release(); _findclose(dir); return new ModuleManager(modules); #endif } ModuleManager::ModuleManager(ModuleNode* aModules): modules(aModules) { } IObject* ModuleManager::getObject(const UUID& cid) { ModuleNode* node = modules; while(node) { IObject* obj = node->module->getObject(cid); if(obj) return obj; node = node->next; } return 0; } ModuleManager::~ModuleManager() { ModuleNode* node = modules; while(node) { ModuleNode* next = node->next; delete node; node = next; } } xplc-0.3.13/xplc/statichandler.h0100644000204300020430000000273607774614401016721 0ustar pphaneufpphaneuf/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- * * XPLC - Cross-Platform Lightweight Components * Copyright (C) 2000-2003, Pierre Phaneuf * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License * as published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ #ifndef __XPLC_STATICHANDLER_H__ #define __XPLC_STATICHANDLER_H__ #include #include "objectnode.h" class StaticServiceHandler: public IStaticServiceHandler { IMPLEMENT_IOBJECT(StaticServiceHandler); private: ObjectNode* objects; public: StaticServiceHandler(): objects(0) { } virtual ~StaticServiceHandler(); /* IServiceHandler */ virtual IObject* getObject(const UUID&); /* IStaticServiceHandler */ virtual void addObject(const UUID&, IObject*); virtual void removeObject(const UUID&); }; #endif /* __XPLC_STATICHANDLER_H__ */ xplc-0.3.13/xplc/vars.mk0100644000204300020430000000260207573546203015220 0ustar pphaneufpphaneuf# XPLC - Cross-Platform Lightweight Components # Copyright (C) 2000-2002, Pierre Phaneuf # Copyright (C) 2002, Net Integration Technologies, Inc. # # This library is free software; you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as # published by the Free Software Foundation; either version 2.1 of the # License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 # USA # # $Id: vars.mk,v 1.13 2002/12/05 03:48:19 pphaneuf Exp $ # This number should only be increased when a new version breaks # binary compatibility with the previous one. It is used to set # the soname of the shared library. libxplc.so: BINARY_VERSION:=0 ifeq ("$(call oddeven,$(VERSION_MINOR))", "even") libxplc.so: SONAME:=libxplc.so.$(BINARY_VERSION) else libxplc.so: SONAME:=libxplc.so.$(PACKAGE_VERSION)-unstable endif ifneq ("$(enable_loader)", "no") ifneq ("$(with_dlopen)", "no") libxplc.so: LDFLAGS+=$(with_dlopen) endif endif xplc-0.3.13/xplc-cxx/0040755000204300020430000000000010331536343014505 5ustar pphaneufpphaneufxplc-0.3.13/xplc-cxx/CVS/0040755000204300020430000000000010167100622015132 5ustar pphaneufpphaneufxplc-0.3.13/xplc-cxx/CVS/Repository0100644000204300020430000000001610075346774017250 0ustar pphaneufpphaneufxplc/xplc-cxx xplc-0.3.13/xplc-cxx/CVS/Entries0100644000204300020430000000046510167100622016470 0ustar pphaneufpphaneuf/.cvsignore/1.1/Sat Nov 30 07:57:22 2002// /factory.cpp/1.3/Fri Jun 25 18:23:30 2004// /getiface.cpp/1.5/Fri Jun 25 18:23:30 2004// /rules.mk/1.2/Wed Dec 11 15:54:52 2002// /strtouuid.cpp/1.6/Fri Jun 25 18:23:30 2004// /xplc.cpp/1.11/Sat Jul 31 03:31:26 2004// /uuidtostr.cpp/1.4/Wed Jan 5 23:50:22 2005// D xplc-0.3.13/xplc-cxx/CVS/Root0100644000204300020430000000006510331536343016004 0ustar pphaneufpphaneuf:pserver:anonymous@cvs.sourceforge.net:/cvsroot/xplc xplc-0.3.13/xplc-cxx/strtouuid.cpp0100644000204300020430000000557610067066642017273 0ustar pphaneufpphaneuf/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- * * XPLC - Cross-Platform Lightweight Components * Copyright (C) 2002-2003, Pierre Phaneuf * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License * as published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA * * As a special exception, you may use this file as part of a free * software library without restriction. Specifically, if other files * instantiate templates or use macros or inline functions from this * file, or you compile this file and link it with other files to * produce an executable, this file does not by itself cause the * resulting executable to be covered by the GNU Lesser General Public * License. This exception does not however invalidate any other * reasons why the executable file might be covered by the GNU Lesser * General Public License. */ #include #include #include const UUID UuidFromString(const char* str) { UUID rv; char tmp[3]; char* end; bool format1 = false; bool ok = false; do { if(*str == '{') { format1 = true; ++str; } rv.Data1 = strtoul(str, &end, 16); if(end != str + 8) break; str = end; if(*str != '-') break; ++str; rv.Data2 = static_cast(strtoul(str, &end, 16)); if(end != str + 4) break; str = end; if(*str != '-') break; ++str; rv.Data3 = static_cast(strtoul(str, &end, 16)); if(end != str + 4) break; str = end; if(*str != '-') break; ++str; tmp[2] = 0; strncpy(tmp, str, 2); rv.Data4[0] = static_cast(strtoul(tmp, &end, 16)); if(end != tmp + 2) break; str += 2; strncpy(tmp, str, 2); rv.Data4[1] = static_cast(strtoul(tmp, &end, 16)); if(end != tmp + 2) break; str += 2; if(*str != '-') break; ++str; for(int i = 2; i < 8; ++i) { strncpy(tmp, str, 2); rv.Data4[i] = static_cast(strtoul(tmp, &end, 16)); if(end != tmp + 2) break; str += 2; } if(format1) { if(*str != '}') break; ++str; } if(*str != 0) break; ok = true; } while(0); if(!ok) rv = UUID_null; return rv; } xplc-0.3.13/xplc-cxx/.cvsignore0100644000204300020430000000000507572067542016512 0ustar pphaneufpphaneuf.*.d xplc-0.3.13/xplc-cxx/factory.cpp0100644000204300020430000000343410067066642016667 0ustar pphaneufpphaneuf/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- * * XPLC - Cross-Platform Lightweight Components * Copyright (C) 2003, Pierre Phaneuf * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License * as published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA * * As a special exception, you may use this file as part of a free * software library without restriction. Specifically, if other files * instantiate templates or use macros or inline functions from this * file, or you compile this file and link it with other files to * produce an executable, this file does not by itself cause the * resulting executable to be covered by the GNU Lesser General Public * License. This exception does not however invalidate any other * reasons why the executable file might be covered by the GNU Lesser * General Public License. */ #include #include #include UUID_MAP_BEGIN(GenericFactory) UUID_MAP_ENTRY(IObject) UUID_MAP_ENTRY(IFactory) UUID_MAP_END GenericFactory::GenericFactory(FactoryFunc aFactory): factory(aFactory) { assert(factory); } IObject* GenericFactory::createObject() { return factory(); } xplc-0.3.13/xplc-cxx/getiface.cpp0100644000204300020430000000403210067066642016762 0ustar pphaneufpphaneuf/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- * * XPLC - Cross-Platform Lightweight Components * Copyright (C) 2002, Pierre Phaneuf * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License * as published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA * * As a special exception, you may use this file as part of a free * software library without restriction. Specifically, if other files * instantiate templates or use macros or inline functions from this * file, or you compile this file and link it with other files to * produce an executable, this file does not by itself cause the * resulting executable to be covered by the GNU Lesser General Public * License. This exception does not however invalidate any other * reasons why the executable file might be covered by the GNU Lesser * General Public License. */ #include #include UUID_MAP_BEGIN(WeakRef) UUID_MAP_ENTRY(IObject) UUID_MAP_ENTRY(IWeakRef) UUID_MAP_END IObject* IObjectImplInternal::getInterface(void* self, const UUID& uuid, const UUID_Info* uuidlist) { IObject* rv; while(uuidlist->iid) { if(*(uuidlist->iid) == uuid) { rv = reinterpret_cast (reinterpret_cast(self) + uuidlist->delta); rv->addRef(); return rv; } uuidlist++; } return 0; } xplc-0.3.13/xplc-cxx/rules.mk0100644000204300020430000000176707575657714016226 0ustar pphaneufpphaneuf# XPLC - Cross-Platform Lightweight Components # Copyright (C) 2002, Pierre Phaneuf # Copyright (C) 2002, Net Integration Technologies, Inc. # # This library is free software; you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as # published by the Free Software Foundation; either version 2.1 of the # License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 # USA # # $Id: rules.mk,v 1.2 2002/12/11 15:54:52 pphaneuf Exp $ default: libxplc-cxx.a libxplc-cxx.a: $(patsubst %.cpp,%.o,$(wildcard xplc-cxx/*.cpp)) xplc-0.3.13/xplc-cxx/uuidtostr.cpp0100644000204300020430000000354110167076476017270 0ustar pphaneufpphaneuf/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- * * XPLC - Cross-Platform Lightweight Components * Copyright (C) 2002, Pierre Phaneuf * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License * as published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA * * As a special exception, you may use this file as part of a free * software library without restriction. Specifically, if other files * instantiate templates or use macros or inline functions from this * file, or you compile this file and link it with other files to * produce an executable, this file does not by itself cause the * resulting executable to be covered by the GNU Lesser General Public * License. This exception does not however invalidate any other * reasons why the executable file might be covered by the GNU Lesser * General Public License. */ #include #include #include char* UuidToString(const UUID& uuid, char* str) { assert(str); sprintf(str, "{%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}", uuid.Data1, uuid.Data2, uuid.Data3, uuid.Data4[0], uuid.Data4[1], uuid.Data4[2], uuid.Data4[3], uuid.Data4[4], uuid.Data4[5], uuid.Data4[6], uuid.Data4[7]); return str; } xplc-0.3.13/xplc-cxx/xplc.cpp0100644000204300020430000000501110102611216016136 0ustar pphaneufpphaneuf/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- * * XPLC - Cross-Platform Lightweight Components * Copyright (C) 2002-2004, Net Integration Technologies, Inc. * Copyright (C) 2003-2004, Pierre Phaneuf * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License * as published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA * * As a special exception, you may use this file as part of a free * software library without restriction. Specifically, if other files * instantiate templates or use macros or inline functions from this * file, or you compile this file and link it with other files to * produce an executable, this file does not by itself cause the * resulting executable to be covered by the GNU Lesser General Public * License. This exception does not however invalidate any other * reasons why the executable file might be covered by the GNU Lesser * General Public License. */ #include #include #include #include #include void XPLC::addModuleDirectory(const char* directory) { xplc_ptr factory(get(XPLC_moduleManagerFactory)); if(!factory) return; xplc_ptr modulemgr(factory->createModuleManager(directory)); if(!modulemgr) return; servmgr->addHandler(modulemgr); } IObject* XPLC::create(const UUID& cid) { if(!servmgr) return 0; xplc_ptr factory(mutate(servmgr->getObject(cid))); if(!factory) return 0; return factory->createObject(); } IObject* XPLC::create(const char* aMoniker) { if(!servmgr) return 0; xplc_ptr moniker(mutate(servmgr->getObject(XPLC_monikers))); if(!moniker) return 0; xplc_ptr factory(mutate(moniker->resolve(aMoniker))); if(!factory) return 0; return factory->createObject(); } xplc-0.3.13/configure0100755000204300020430000073346610331523220014654 0ustar pphaneufpphaneuf#! /bin/sh # From configure.ac Id: configure.ac. # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.59 for XPLC 0.3.13. # # Report bugs to . # # Copyright (C) 2003 Free Software Foundation, Inc. # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## # Be Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then set -o posix fi DUALCASE=1; export DUALCASE # for MKS sh # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then as_unset=unset else as_unset=false fi # Work around bugs in pre-3.0 UWIN ksh. $as_unset ENV MAIL MAILPATH PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. for as_var in \ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ LC_TELEPHONE LC_TIME do if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else $as_unset $as_var fi done # Required to use basename. if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi # Name of the executable. as_me=`$as_basename "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)$' \| \ . : '\(.\)' 2>/dev/null || echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } /^X\/\(\/\/\)$/{ s//\1/; q; } /^X\/\(\/\).*/{ s//\1/; q; } s/.*/./; q'` # PATH needs CR, and LINENO needs CR and PATH. # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then echo "#! /bin/sh" >conf$$.sh echo "exit 0" >>conf$$.sh chmod +x conf$$.sh if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then PATH_SEPARATOR=';' else PATH_SEPARATOR=: fi rm -f conf$$.sh fi as_lineno_1=$LINENO as_lineno_2=$LINENO as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && test "x$as_lineno_3" = "x$as_lineno_2" || { # Find who we are. Look in the path if we contain no path at all # relative or not. case $0 in *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2 { (exit 1); exit 1; }; } fi case $CONFIG_SHELL in '') as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for as_base in sh bash ksh sh5; do case $as_dir in /*) if ("$as_dir/$as_base" -c ' as_lineno_1=$LINENO as_lineno_2=$LINENO as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } CONFIG_SHELL=$as_dir/$as_base export CONFIG_SHELL exec "$CONFIG_SHELL" "$0" ${1+"$@"} fi;; esac done done ;; esac # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a # line-number line before each line; the second 'sed' does the real # work. The second script uses 'N' to pair each line-number line # with the numbered line, and appends trailing '-' during # substitution so that $LINENO is not a special case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) sed '=' <$as_myself | sed ' N s,$,-, : loop s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, t loop s,-$,, s,^['$as_cr_digits']*\n,, ' >$as_me.lineno && chmod +x $as_me.lineno || { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensible to this). . ./$as_me.lineno # Exit status is that of the last command. exit } case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in *c*,-n*) ECHO_N= ECHO_C=' ' ECHO_T=' ' ;; *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; *) ECHO_N= ECHO_C='\c' ECHO_T= ;; esac if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file echo >conf$$.file if ln -s conf$$.file conf$$ 2>/dev/null; then # We could just check for DJGPP; but this test a) works b) is more generic # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). if test -f conf$$.exe; then # Don't use ln at all; we don't have any links as_ln_s='cp -p' else as_ln_s='ln -s' fi elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.file if mkdir -p . 2>/dev/null; then as_mkdir_p=: else test -d ./-p && rmdir ./-p as_mkdir_p=false fi as_executable_p="test -f" # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" # IFS # We need space, tab and new line, in precisely that order. as_nl=' ' IFS=" $as_nl" # CDPATH. $as_unset CDPATH # Name of the host. # hostname on some systems (SVR3.2, Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` exec 6>&1 # # Initializations. # ac_default_prefix=/usr/local ac_config_libobj_dir=. cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= SHELL=${CONFIG_SHELL-/bin/sh} # Maximum number of lines to put in a shell here document. # This variable seems obsolete. It should probably be removed, and # only ac_max_sed_lines should be used. : ${ac_max_here_lines=38} # Identity of this package. PACKAGE_NAME='XPLC' PACKAGE_TARNAME='xplc' PACKAGE_VERSION='0.3.13' PACKAGE_STRING='XPLC 0.3.13' PACKAGE_BUGREPORT='pp@ludusdesign.com' ac_unique_file="include/xplc/xplc.h" # Factoring default headers for most tests. ac_includes_default="\ #include #if HAVE_SYS_TYPES_H # include #endif #if HAVE_SYS_STAT_H # include #endif #if STDC_HEADERS # include # include #else # if HAVE_STDLIB_H # include # endif #endif #if HAVE_STRING_H # if !STDC_HEADERS && HAVE_MEMORY_H # include # endif # include #endif #if HAVE_STRINGS_H # include #endif #if HAVE_INTTYPES_H # include #else # if HAVE_STDINT_H # include # endif #endif #if HAVE_UNISTD_H # include #endif" ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CXX CXXFLAGS ac_ct_CXX INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA LN_S CXXCPP EGREP CVS2CL SIZEOF_SHORT SIZEOF_INT SIZEOF_LONG SIZEOF_LONG_LONG pc_version xplcdir_version lib_prefix_version enable_loader with_dlopen so_style with_uuid with_uuid_static LIBOBJS LTLIBOBJS' ac_subst_files='' # Initialize some variables set by options. ac_init_help= ac_init_version=false # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null exec_prefix=NONE no_create= no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= verbose= x_includes=NONE x_libraries=NONE # Installation directory options. # These are left unexpanded so users can "make install exec_prefix=/foo" # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datadir='${prefix}/share' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' libdir='${exec_prefix}/lib' includedir='${prefix}/include' oldincludedir='/usr/include' infodir='${prefix}/info' mandir='${prefix}/man' ac_prev= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval "$ac_prev=\$ac_option" ac_prev= continue fi ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'` # Accept the important Cygnus configure options, so we can diagnose typos. case $ac_option in -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file=$ac_optarg ;; --config-cache | -C) cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad | --data | --dat | --da) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ | --da=*) datadir=$ac_optarg ;; -disable-* | --disable-*) ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } ac_feature=`echo $ac_feature | sed 's/-/_/g'` eval "enable_$ac_feature=no" ;; -enable-* | --enable-*) ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } ac_feature=`echo $ac_feature | sed 's/-/_/g'` case $ac_option in *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; *) ac_optarg=yes ;; esac eval "enable_$ac_feature='$ac_optarg'" ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he | -h) ac_init_help=long ;; -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ac_init_help=recursive ;; -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ac_init_help=short ;; -host | --host | --hos | --ho) ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst \ | --locals | --local | --loca | --loc | --lo) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* \ | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers | -V) ac_init_version=: ;; -with-* | --with-*) ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } ac_package=`echo $ac_package| sed 's/-/_/g'` case $ac_option in *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; *) ac_optarg=yes ;; esac eval "with_$ac_package='$ac_optarg'" ;; -without-* | --without-*) ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } ac_package=`echo $ac_package | sed 's/-/_/g'` eval "with_$ac_package=no" ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; -*) { echo "$as_me: error: unrecognized option: $ac_option Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; } ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 { (exit 1); exit 1; }; } ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` eval "$ac_envvar='$ac_optarg'" export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} ;; esac done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` { echo "$as_me: error: missing argument to $ac_option" >&2 { (exit 1); exit 1; }; } fi # Be sure to have absolute paths. for ac_var in exec_prefix prefix do eval ac_val=$`echo $ac_var` case $ac_val in [\\/$]* | ?:[\\/]* | NONE | '' ) ;; *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 { (exit 1); exit 1; }; };; esac done # Be sure to have absolute paths. for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \ localstatedir libdir includedir oldincludedir infodir mandir do eval ac_val=$`echo $ac_var` case $ac_val in [\\/$]* | ?:[\\/]* ) ;; *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 { (exit 1); exit 1; }; };; esac done # There might be people who depend on the old broken behavior: `$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias # FIXME: To remove some day. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. If a cross compiler is detected then cross compile mode will be used." >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi fi ac_tool_prefix= test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then its parent. ac_confdir=`(dirname "$0") 2>/dev/null || $as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$0" : 'X\(//\)[^/]' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$0" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` srcdir=$ac_confdir if test ! -r $srcdir/$ac_unique_file; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r $srcdir/$ac_unique_file; then if test "$ac_srcdir_defaulted" = yes; then { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2 { (exit 1); exit 1; }; } else { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 { (exit 1); exit 1; }; } fi fi (cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null || { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2 { (exit 1); exit 1; }; } srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'` ac_env_build_alias_set=${build_alias+set} ac_env_build_alias_value=$build_alias ac_cv_env_build_alias_set=${build_alias+set} ac_cv_env_build_alias_value=$build_alias ac_env_host_alias_set=${host_alias+set} ac_env_host_alias_value=$host_alias ac_cv_env_host_alias_set=${host_alias+set} ac_cv_env_host_alias_value=$host_alias ac_env_target_alias_set=${target_alias+set} ac_env_target_alias_value=$target_alias ac_cv_env_target_alias_set=${target_alias+set} ac_cv_env_target_alias_value=$target_alias ac_env_CC_set=${CC+set} ac_env_CC_value=$CC ac_cv_env_CC_set=${CC+set} ac_cv_env_CC_value=$CC ac_env_CFLAGS_set=${CFLAGS+set} ac_env_CFLAGS_value=$CFLAGS ac_cv_env_CFLAGS_set=${CFLAGS+set} ac_cv_env_CFLAGS_value=$CFLAGS ac_env_LDFLAGS_set=${LDFLAGS+set} ac_env_LDFLAGS_value=$LDFLAGS ac_cv_env_LDFLAGS_set=${LDFLAGS+set} ac_cv_env_LDFLAGS_value=$LDFLAGS ac_env_CPPFLAGS_set=${CPPFLAGS+set} ac_env_CPPFLAGS_value=$CPPFLAGS ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set} ac_cv_env_CPPFLAGS_value=$CPPFLAGS ac_env_CXX_set=${CXX+set} ac_env_CXX_value=$CXX ac_cv_env_CXX_set=${CXX+set} ac_cv_env_CXX_value=$CXX ac_env_CXXFLAGS_set=${CXXFLAGS+set} ac_env_CXXFLAGS_value=$CXXFLAGS ac_cv_env_CXXFLAGS_set=${CXXFLAGS+set} ac_cv_env_CXXFLAGS_value=$CXXFLAGS ac_env_CXXCPP_set=${CXXCPP+set} ac_env_CXXCPP_value=$CXXCPP ac_cv_env_CXXCPP_set=${CXXCPP+set} ac_cv_env_CXXCPP_value=$CXXCPP # # Report the --help message. # if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF \`configure' configures XPLC 0.3.13 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. Configuration: -h, --help display this help and exit --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit -q, --quiet, --silent do not print \`checking...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] _ACEOF cat <<_ACEOF Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify an installation prefix other than \`$ac_default_prefix' using \`--prefix', for instance \`--prefix=\$HOME'. For better control, use the options below. Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] --datadir=DIR read-only architecture-independent data [PREFIX/share] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] --infodir=DIR info documentation [PREFIX/info] --mandir=DIR man documentation [PREFIX/man] _ACEOF cat <<\_ACEOF System types: --build=BUILD configure for building on BUILD [guessed] --host=HOST cross-compile to build programs to run on HOST [BUILD] _ACEOF fi if test -n "$ac_init_help"; then case $ac_init_help in short | recursive ) echo "Configuration of XPLC 0.3.13:";; esac cat <<\_ACEOF Optional Features: --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --enable-debug debugging options --enable-fatal-warnings turn warnings into errors --disable-optimization optimization options --disable-warnings extra warnings --enable-unstable allow unstable interfaces in stable version --enable-rtti C++ run-time type identification (compiler) --enable-exceptions C++ exceptions (compiler) --disable-pic generation of position-independent code --disable-loader dynamic loading Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-dlopen dlopen --with-dyld dyld --with-libuuid libuuid Some influential environment variables: CC C compiler command CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory CPPFLAGS C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory CXX C++ compiler command CXXFLAGS C++ compiler flags CXXCPP C++ preprocessor Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. Report bugs to . _ACEOF fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. ac_popdir=`pwd` for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d $ac_dir || continue ac_builddir=. if test "$ac_dir" != .; then ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` # A "../" for each directory in $ac_dir_suffix. ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` else ac_dir_suffix= ac_top_builddir= fi case $srcdir in .) # No --srcdir option. We are building in place. ac_srcdir=. if test -z "$ac_top_builddir"; then ac_top_srcdir=. else ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` fi ;; [\\/]* | ?:[\\/]* ) # Absolute path. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ;; *) # Relative path. ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_builddir$srcdir ;; esac # Do not use `cd foo && pwd` to compute absolute paths, because # the directories may not exist. case `pwd` in .) ac_abs_builddir="$ac_dir";; *) case "$ac_dir" in .) ac_abs_builddir=`pwd`;; [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; *) ac_abs_builddir=`pwd`/"$ac_dir";; esac;; esac case $ac_abs_builddir in .) ac_abs_top_builddir=${ac_top_builddir}.;; *) case ${ac_top_builddir}. in .) ac_abs_top_builddir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; esac;; esac case $ac_abs_builddir in .) ac_abs_srcdir=$ac_srcdir;; *) case $ac_srcdir in .) ac_abs_srcdir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; esac;; esac case $ac_abs_builddir in .) ac_abs_top_srcdir=$ac_top_srcdir;; *) case $ac_top_srcdir in .) ac_abs_top_srcdir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; esac;; esac cd $ac_dir # Check for guested configure; otherwise get Cygnus style configure. if test -f $ac_srcdir/configure.gnu; then echo $SHELL $ac_srcdir/configure.gnu --help=recursive elif test -f $ac_srcdir/configure; then echo $SHELL $ac_srcdir/configure --help=recursive elif test -f $ac_srcdir/configure.ac || test -f $ac_srcdir/configure.in; then echo $ac_configure --help else echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi cd $ac_popdir done fi test -n "$ac_init_help" && exit 0 if $ac_init_version; then cat <<\_ACEOF XPLC configure 0.3.13 generated by GNU Autoconf 2.59 Copyright (C) 2003 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF exit 0 fi exec 5>config.log cat >&5 <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by XPLC $as_me 0.3.13, which was generated by GNU Autoconf 2.59. Invocation command line was $ $0 $@ _ACEOF { cat <<_ASUNAME ## --------- ## ## Platform. ## ## --------- ## hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` hostinfo = `(hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` _ASUNAME as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. echo "PATH: $as_dir" done } >&5 cat >&5 <<_ACEOF ## ----------- ## ## Core tests. ## ## ----------- ## _ACEOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. # Strip out --silent because we don't want to record it for future runs. # Also quote any args containing shell meta-characters. # Make two passes to allow for proper duplicate-argument suppression. ac_configure_args= ac_configure_args0= ac_configure_args1= ac_sep= ac_must_keep_next=false for ac_pass in 1 2 do for ac_arg do case $ac_arg in -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; 2) ac_configure_args1="$ac_configure_args1 '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else case $ac_arg in *=* | --config-cache | -C | -disable-* | --disable-* \ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | -with-* | --with-* | -without-* | --without-* | --x) case "$ac_configure_args0 " in "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; esac ;; -* ) ac_must_keep_next=true ;; esac fi ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'" # Get rid of the leading space. ac_sep=" " ;; esac done done $as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; } # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. # WARNING: Be sure not to use single quotes in there, as some shells, # such as our DU 5.0 friend, will then `close' the trap. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { echo cat <<\_ASBOX ## ---------------- ## ## Cache variables. ## ## ---------------- ## _ASBOX echo # The following way of writing the cache mishandles newlines in values, { (set) 2>&1 | case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in *ac_space=\ *) sed -n \ "s/'"'"'/'"'"'\\\\'"'"''"'"'/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p" ;; *) sed -n \ "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" ;; esac; } echo cat <<\_ASBOX ## ----------------- ## ## Output variables. ## ## ----------------- ## _ASBOX echo for ac_var in $ac_subst_vars do eval ac_val=$`echo $ac_var` echo "$ac_var='"'"'$ac_val'"'"'" done | sort echo if test -n "$ac_subst_files"; then cat <<\_ASBOX ## ------------- ## ## Output files. ## ## ------------- ## _ASBOX echo for ac_var in $ac_subst_files do eval ac_val=$`echo $ac_var` echo "$ac_var='"'"'$ac_val'"'"'" done | sort echo fi if test -s confdefs.h; then cat <<\_ASBOX ## ----------- ## ## confdefs.h. ## ## ----------- ## _ASBOX echo sed "/^$/d" confdefs.h | sort echo fi test "$ac_signal" != 0 && echo "$as_me: caught signal $ac_signal" echo "$as_me: exit $exit_status" } >&5 rm -f core *.core && rm -rf conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -rf conftest* confdefs.h # AIX cpp loses on an empty file, so make sure it contains at least a newline. echo >confdefs.h # Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF #define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer explicitly selected file to automatically selected ones. if test -z "$CONFIG_SITE"; then if test "x$prefix" != xNONE; then CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" else CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" fi fi for ac_site_file in $CONFIG_SITE; do if test -r "$ac_site_file"; then { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" fi done if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special # files actually), so we avoid doing that. if test -f "$cache_file"; then { echo "$as_me:$LINENO: loading cache $cache_file" >&5 echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . $cache_file;; *) . ./$cache_file;; esac fi else { echo "$as_me:$LINENO: creating cache $cache_file" >&5 echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false for ac_var in `(set) 2>&1 | sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set eval ac_old_val="\$ac_cv_env_${ac_var}_value" eval ac_new_val="\$ac_env_${ac_var}_value" case $ac_old_set,$ac_new_set in set,) { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} { echo "$as_me:$LINENO: former value: $ac_old_val" >&5 echo "$as_me: former value: $ac_old_val" >&2;} { echo "$as_me:$LINENO: current value: $ac_new_val" >&5 echo "$as_me: current value: $ac_new_val" >&2;} ac_cache_corrupted=: fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 echo "$as_me: error: changes in the environment can compromise the build" >&2;} { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} { (exit 1); exit 1; }; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_aux_dir= for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do if test -f $ac_dir/install-sh; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" break elif test -f $ac_dir/install.sh; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break elif test -f $ac_dir/shtool; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/shtool install -c" break fi done if test -z "$ac_aux_dir"; then { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;} { (exit 1); exit 1; }; } fi ac_config_guess="$SHELL $ac_aux_dir/config.guess" ac_config_sub="$SHELL $ac_aux_dir/config.sub" ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure. # Make sure we can run config.sub. $ac_config_sub sun4 >/dev/null 2>&1 || { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5 echo "$as_me: error: cannot run $ac_config_sub" >&2;} { (exit 1); exit 1; }; } echo "$as_me:$LINENO: checking build system type" >&5 echo $ECHO_N "checking build system type... $ECHO_C" >&6 if test "${ac_cv_build+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_build_alias=$build_alias test -z "$ac_cv_build_alias" && ac_cv_build_alias=`$ac_config_guess` test -z "$ac_cv_build_alias" && { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5 echo "$as_me: error: cannot guess build type; you must specify one" >&2;} { (exit 1); exit 1; }; } ac_cv_build=`$ac_config_sub $ac_cv_build_alias` || { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;} { (exit 1); exit 1; }; } fi echo "$as_me:$LINENO: result: $ac_cv_build" >&5 echo "${ECHO_T}$ac_cv_build" >&6 build=$ac_cv_build build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` echo "$as_me:$LINENO: checking host system type" >&5 echo $ECHO_N "checking host system type... $ECHO_C" >&6 if test "${ac_cv_host+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_host_alias=$host_alias test -z "$ac_cv_host_alias" && ac_cv_host_alias=$ac_cv_build_alias ac_cv_host=`$ac_config_sub $ac_cv_host_alias` || { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;} { (exit 1); exit 1; }; } fi echo "$as_me:$LINENO: result: $ac_cv_host" >&5 echo "${ECHO_T}$ac_cv_host" >&6 host=$ac_cv_host host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` # Check whether --enable-debug or --disable-debug was given. if test "${enable_debug+set}" = set; then enableval="$enable_debug" fi; # Check whether --enable-fatal-warnings or --disable-fatal-warnings was given. if test "${enable_fatal_warnings+set}" = set; then enableval="$enable_fatal_warnings" fi; # Check whether --enable-optimization or --disable-optimization was given. if test "${enable_optimization+set}" = set; then enableval="$enable_optimization" fi; # Check whether --enable-warnings or --disable-warnings was given. if test "${enable_warnings+set}" = set; then enableval="$enable_warnings" fi; # Check whether --enable-unstable or --disable-unstable was given. if test "${enable_unstable+set}" = set; then enableval="$enable_unstable" fi; # Check whether --enable-rtti or --disable-rtti was given. if test "${enable_rtti+set}" = set; then enableval="$enable_rtti" fi; # Check whether --enable-exceptions or --disable-exceptions was given. if test "${enable_exceptions+set}" = set; then enableval="$enable_exceptions" fi; # Check whether --enable-pic or --disable-pic was given. if test "${enable_pic+set}" = set; then enableval="$enable_pic" fi; # Check whether --enable-loader or --disable-loader was given. if test "${enable_loader+set}" = set; then enableval="$enable_loader" fi; # Check whether --with-dlopen or --without-dlopen was given. if test "${with_dlopen+set}" = set; then withval="$with_dlopen" fi; # Check whether --with-dyld or --without-dyld was given. if test "${with_dyld+set}" = set; then withval="$with_dyld" fi; # Check whether --with-libuuid or --without-libuuid was given. if test "${with_libuuid+set}" = set; then withval="$with_libuuid" fi; ac_ext=cc ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi CC=$ac_ct_CC else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi CC=$ac_ct_CC else CC="$ac_cv_prog_CC" fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$ac_ct_CC" && break done CC=$ac_ct_CC fi fi test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&5 echo "$as_me: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } # Provide some information about the compiler. echo "$as_me:$LINENO:" \ "checking for C compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` { (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 (eval $ac_compiler --version &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5 (eval $ac_compiler -v &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5 (eval $ac_compiler -V &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files a.out a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5 (eval $ac_link_default) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # Find the output, starting from the most likely. This scheme is # not robust to junk in `.', hence go to wildcards (a.*) only as a last # resort. # Be careful to initialize this variable, since it used to be cached. # Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile. ac_cv_exeext= # b.out is created by i960 compilers. for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;; conftest.$ac_ext ) # This is the source file. ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` # FIXME: I believe we export ac_cv_exeext for Libtool, # but it would be cool to find out if it's true. Does anybody # maintain Libtool? --akim. export ac_cv_exeext break;; * ) break;; esac done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { echo "$as_me:$LINENO: error: C compiler cannot create executables See \`config.log' for more details." >&5 echo "$as_me: error: C compiler cannot create executables See \`config.log' for more details." >&2;} { (exit 77); exit 77; }; } fi ac_exeext=$ac_cv_exeext echo "$as_me:$LINENO: result: $ac_file" >&5 echo "${ECHO_T}$ac_file" >&6 # Check the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. echo "$as_me:$LINENO: checking whether the C compiler works" >&5 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0 # If not cross compiling, check that we can run a simple program. if test "$cross_compiling" != yes; then if { ac_try='./$ac_file' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else { { echo "$as_me:$LINENO: error: cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details." >&5 echo "$as_me: error: cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi fi fi echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 rm -f a.out a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save # Check the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6 echo "$as_me:$LINENO: result: $cross_compiling" >&5 echo "${ECHO_T}$cross_compiling" >&6 echo "$as_me:$LINENO: checking for suffix of executables" >&5 echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with # `rm'. for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` export ac_cv_exeext break;; * ) break;; esac done else { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link See \`config.log' for more details." >&5 echo "$as_me: error: cannot compute suffix of executables: cannot compile and link See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi rm -f conftest$ac_cv_exeext echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 echo "${ECHO_T}$ac_cv_exeext" >&6 rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT echo "$as_me:$LINENO: checking for suffix of object files" >&5 echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6 if test "${ac_cv_objext+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.o conftest.obj if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile See \`config.log' for more details." >&5 echo "$as_me: error: cannot compute suffix of object files: cannot compile See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 echo "${ECHO_T}$ac_cv_objext" >&6 OBJEXT=$ac_cv_objext ac_objext=$OBJEXT echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6 if test "${ac_cv_c_compiler_gnu+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_compiler_gnu=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_compiler_gnu=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6 GCC=`test $ac_compiler_gnu = yes && echo yes` ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS CFLAGS="-g" echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6 if test "${ac_cv_prog_cc_g+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_prog_cc_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_prog_cc_g=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6 if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6 if test "${ac_cv_prog_cc_stdc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_prog_cc_stdc=no ac_save_CC=$CC cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std1 is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std1. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF # Don't try gcc -ansi; that turns off useful extensions and # breaks some systems' header files. # AIX -qlanglvl=ansi # Ultrix and OSF/1 -std1 # HP-UX 10.20 and later -Ae # HP-UX older versions -Aa -D_HPUX_SOURCE # SVR4 -Xc -D__EXTENSIONS__ for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_prog_cc_stdc=$ac_arg break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext done rm -f conftest.$ac_ext conftest.$ac_objext CC=$ac_save_CC fi case "x$ac_cv_prog_cc_stdc" in x|xno) echo "$as_me:$LINENO: result: none needed" >&5 echo "${ECHO_T}none needed" >&6 ;; *) echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6 CC="$CC $ac_cv_prog_cc_stdc" ;; esac # Some people use a C++ compiler to compile C. Since we use `exit', # in C++ we need to declare it. In case someone uses the same compiler # for both compiling C and C++ we need to have the C++ compiler decide # the declaration of exit, since it's the most demanding environment. cat >conftest.$ac_ext <<_ACEOF #ifndef __cplusplus choke me #endif _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then for ac_declaration in \ '' \ 'extern "C" void std::exit (int) throw (); using std::exit;' \ 'extern "C" void std::exit (int); using std::exit;' \ 'extern "C" void exit (int) throw ();' \ 'extern "C" void exit (int);' \ 'void exit (int);' do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_declaration #include int main () { exit (42); ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 continue fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_declaration int main () { exit (42); ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext done rm -f conftest* if test -n "$ac_declaration"; then echo '#ifdef __cplusplus' >>confdefs.h echo $ac_declaration >>confdefs.h echo '#endif' >>confdefs.h fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ac_ext=cc ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu ac_ext=cc ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu if test -n "$ac_tool_prefix"; then for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CXX+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CXX"; then ac_cv_prog_CXX="$CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi CXX=$ac_cv_prog_CXX if test -n "$CXX"; then echo "$as_me:$LINENO: result: $CXX" >&5 echo "${ECHO_T}$CXX" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$CXX" && break done fi if test -z "$CXX"; then ac_ct_CXX=$CXX for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CXX"; then ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CXX="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi ac_ct_CXX=$ac_cv_prog_ac_ct_CXX if test -n "$ac_ct_CXX"; then echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5 echo "${ECHO_T}$ac_ct_CXX" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$ac_ct_CXX" && break done test -n "$ac_ct_CXX" || ac_ct_CXX="g++" CXX=$ac_ct_CXX fi # Provide some information about the compiler. echo "$as_me:$LINENO:" \ "checking for C++ compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` { (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 (eval $ac_compiler --version &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5 (eval $ac_compiler -v &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5 (eval $ac_compiler -V &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_compiler_gnu=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_compiler_gnu=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_cxx_compiler_gnu=$ac_compiler_gnu fi echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6 GXX=`test $ac_compiler_gnu = yes && echo yes` ac_test_CXXFLAGS=${CXXFLAGS+set} ac_save_CXXFLAGS=$CXXFLAGS CXXFLAGS="-g" echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6 if test "${ac_cv_prog_cxx_g+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_prog_cxx_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_prog_cxx_g=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6 if test "$ac_test_CXXFLAGS" = set; then CXXFLAGS=$ac_save_CXXFLAGS elif test $ac_cv_prog_cxx_g = yes; then if test "$GXX" = yes; then CXXFLAGS="-g -O2" else CXXFLAGS="-g" fi else if test "$GXX" = yes; then CXXFLAGS="-O2" else CXXFLAGS= fi fi for ac_declaration in \ '' \ 'extern "C" void std::exit (int) throw (); using std::exit;' \ 'extern "C" void std::exit (int); using std::exit;' \ 'extern "C" void exit (int) throw ();' \ 'extern "C" void exit (int);' \ 'void exit (int);' do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_declaration #include int main () { exit (42); ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 continue fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_declaration int main () { exit (42); ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext done rm -f conftest* if test -n "$ac_declaration"; then echo '#ifdef __cplusplus' >>confdefs.h echo $ac_declaration >>confdefs.h echo '#endif' >>confdefs.h fi ac_ext=cc ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6 if test -z "$INSTALL"; then if test "${ac_cv_path_install+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. case $as_dir/ in ./ | .// | /cC/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi done done ;; esac done fi if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. We don't cache a # path for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the path is relative. INSTALL=$ac_install_sh fi fi echo "$as_me:$LINENO: result: $INSTALL" >&5 echo "${ECHO_T}$INSTALL" >&6 # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' echo "$as_me:$LINENO: checking whether ln -s works" >&5 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6 LN_S=$as_ln_s if test "$LN_S" = "ln -s"; then echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 else echo "$as_me:$LINENO: result: no, using $LN_S" >&5 echo "${ECHO_T}no, using $LN_S" >&6 fi ac_header_dirent=no for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh` echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include <$ac_hdr> int main () { if ((DIR *) 0) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_Header=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_Header=no" fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1 _ACEOF ac_header_dirent=$ac_hdr; break fi done # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. if test $ac_header_dirent = dirent.h; then echo "$as_me:$LINENO: checking for library containing opendir" >&5 echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6 if test "${ac_cv_search_opendir+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_func_search_save_LIBS=$LIBS ac_cv_search_opendir=no cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char opendir (); int main () { opendir (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_search_opendir="none required" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test "$ac_cv_search_opendir" = no; then for ac_lib in dir; do LIBS="-l$ac_lib $ac_func_search_save_LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char opendir (); int main () { opendir (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_search_opendir="-l$ac_lib" break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext done fi LIBS=$ac_func_search_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5 echo "${ECHO_T}$ac_cv_search_opendir" >&6 if test "$ac_cv_search_opendir" != no; then test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS" fi else echo "$as_me:$LINENO: checking for library containing opendir" >&5 echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6 if test "${ac_cv_search_opendir+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_func_search_save_LIBS=$LIBS ac_cv_search_opendir=no cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char opendir (); int main () { opendir (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_search_opendir="none required" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test "$ac_cv_search_opendir" = no; then for ac_lib in x; do LIBS="-l$ac_lib $ac_func_search_save_LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char opendir (); int main () { opendir (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_search_opendir="-l$ac_lib" break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext done fi LIBS=$ac_func_search_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5 echo "${ECHO_T}$ac_cv_search_opendir" >&6 if test "$ac_cv_search_opendir" != no; then test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS" fi fi ac_ext=cc ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu echo "$as_me:$LINENO: checking how to run the C++ preprocessor" >&5 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6 if test -z "$CXXCPP"; then if test "${ac_cv_prog_CXXCPP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # Double quotes because CXXCPP needs to be expanded for CXXCPP in "$CXX -E" "/lib/cpp" do ac_preproc_ok=false for ac_cxx_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_cxx_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether non-existent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_cxx_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then # Broken: success on invalid input. continue else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then break fi done ac_cv_prog_CXXCPP=$CXXCPP fi CXXCPP=$ac_cv_prog_CXXCPP else ac_cv_prog_CXXCPP=$CXXCPP fi echo "$as_me:$LINENO: result: $CXXCPP" >&5 echo "${ECHO_T}$CXXCPP" >&6 ac_preproc_ok=false for ac_cxx_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_cxx_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether non-existent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_cxx_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then # Broken: success on invalid input. continue else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { echo "$as_me:$LINENO: error: C++ preprocessor \"$CXXCPP\" fails sanity check See \`config.log' for more details." >&5 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi ac_ext=cc ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu echo "$as_me:$LINENO: checking for egrep" >&5 echo $ECHO_N "checking for egrep... $ECHO_C" >&6 if test "${ac_cv_prog_egrep+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if echo a | (grep -E '(a|b)') >/dev/null 2>&1 then ac_cv_prog_egrep='grep -E' else ac_cv_prog_egrep='egrep' fi fi echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5 echo "${ECHO_T}$ac_cv_prog_egrep" >&6 EGREP=$ac_cv_prog_egrep echo "$as_me:$LINENO: checking for ANSI C header files" >&5 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 if test "${ac_cv_header_stdc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_header_stdc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_header_stdc=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } _ACEOF rm -f conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_header_stdc=no fi rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi fi echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 echo "${ECHO_T}$ac_cv_header_stdc" >&6 if test $ac_cv_header_stdc = yes; then cat >>confdefs.h <<\_ACEOF #define STDC_HEADERS 1 _ACEOF fi # On IRIX 5.3, sys/types and inttypes.h are conflicting. for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_Header=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_Header=no" fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_header in limits.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if eval "test \"\${$as_ac_Header+set}\" = set"; then echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_cxx_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## --------------------------------- ## ## Report this to pp@ludusdesign.com ## ## --------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_prog in cvs2cl.pl cvs2cl do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CVS2CL+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CVS2CL"; then ac_cv_prog_CVS2CL="$CVS2CL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CVS2CL="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi CVS2CL=$ac_cv_prog_CVS2CL if test -n "$CVS2CL"; then echo "$as_me:$LINENO: result: $CVS2CL" >&5 echo "${ECHO_T}$CVS2CL" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$CVS2CL" && break done test -n "$CVS2CL" || CVS2CL="no" case "$host_os" in darwin*|rhapsody*) so_style=darwin ;; *) so_style=sysv ;; esac # Make sure we link in libc. LDFLAGS="$LDFLAGS -lc" if test "$with_dlopen" != "no"; then for ac_header in dlfcn.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if eval "test \"\${$as_ac_Header+set}\" = set"; then echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_cxx_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## --------------------------------- ## ## Report this to pp@ludusdesign.com ## ## --------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done echo "$as_me:$LINENO: checking for library containing dlopen" >&5 echo $ECHO_N "checking for library containing dlopen... $ECHO_C" >&6 if test "${ac_cv_search_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_func_search_save_LIBS=$LIBS ac_cv_search_dlopen=no cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char dlopen (); int main () { dlopen (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_search_dlopen="none required" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test "$ac_cv_search_dlopen" = no; then for ac_lib in dl; do LIBS="-l$ac_lib $ac_func_search_save_LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char dlopen (); int main () { dlopen (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_search_dlopen="-l$ac_lib" break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext done fi LIBS=$ac_func_search_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_search_dlopen" >&5 echo "${ECHO_T}$ac_cv_search_dlopen" >&6 if test "$ac_cv_search_dlopen" != no; then test "$ac_cv_search_dlopen" = "none required" || LIBS="$ac_cv_search_dlopen $LIBS" with_dlopen=$ac_cv_search_dlopen else with_dlopen=no fi test "$with_dlopen" = "none required" && with_dlopen= test "$with_dlopen" = "no" || cat >>confdefs.h <<\_ACEOF #define WITH_DLOPEN 1 _ACEOF fi if test "$with_dyld" != "no"; then for ac_header in mach-o/dyld.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if eval "test \"\${$as_ac_Header+set}\" = set"; then echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_cxx_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## --------------------------------- ## ## Report this to pp@ludusdesign.com ## ## --------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done echo "$as_me:$LINENO: checking for library containing NSCreateObjectFileImageFromFile" >&5 echo $ECHO_N "checking for library containing NSCreateObjectFileImageFromFile... $ECHO_C" >&6 if test "${ac_cv_search_NSCreateObjectFileImageFromFile+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_func_search_save_LIBS=$LIBS ac_cv_search_NSCreateObjectFileImageFromFile=no cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char NSCreateObjectFileImageFromFile (); int main () { NSCreateObjectFileImageFromFile (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_search_NSCreateObjectFileImageFromFile="none required" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test "$ac_cv_search_NSCreateObjectFileImageFromFile" = no; then for ac_lib in System; do LIBS="-l$ac_lib $ac_func_search_save_LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char NSCreateObjectFileImageFromFile (); int main () { NSCreateObjectFileImageFromFile (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_search_NSCreateObjectFileImageFromFile="-l$ac_lib" break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext done fi LIBS=$ac_func_search_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_search_NSCreateObjectFileImageFromFile" >&5 echo "${ECHO_T}$ac_cv_search_NSCreateObjectFileImageFromFile" >&6 if test "$ac_cv_search_NSCreateObjectFileImageFromFile" != no; then test "$ac_cv_search_NSCreateObjectFileImageFromFile" = "none required" || LIBS="$ac_cv_search_NSCreateObjectFileImageFromFile $LIBS" with_dyld=$ac_cv_search_NSCreateObjectFileImageFromFile else with_dyld=no fi test "$with_dyld" = "none required" && with_dyld= test "$with_dyld" = "no" || cat >>confdefs.h <<\_ACEOF #define WITH_DYLD 1 _ACEOF fi # dyld not really supported yet if test "$with_dlopen" = "no" && test "$with_dyld" = "no"; then enable_loader=no fi if test "$enable_loader" != "no"; then cat >>confdefs.h <<\_ACEOF #define ENABLE_LOADER 1 _ACEOF fi with_uuid=no if test "$with_uuid" == "no" && test "$with_libuuid" != "no"; then for ac_header in uuid/uuid.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if eval "test \"\${$as_ac_Header+set}\" = set"; then echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_cxx_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## --------------------------------- ## ## Report this to pp@ludusdesign.com ## ## --------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF echo "$as_me:$LINENO: checking for uuid_unparse in -luuid" >&5 echo $ECHO_N "checking for uuid_unparse in -luuid... $ECHO_C" >&6 if test "${ac_cv_lib_uuid_uuid_unparse+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luuid $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char uuid_unparse (); int main () { uuid_unparse (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_uuid_uuid_unparse=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_uuid_uuid_unparse=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_uuid_uuid_unparse" >&5 echo "${ECHO_T}$ac_cv_lib_uuid_uuid_unparse" >&6 if test $ac_cv_lib_uuid_uuid_unparse = yes; then with_uuid=-luuid fi fi done fi if test "$with_uuid" == "no"; then echo "$as_me:$LINENO: checking for short" >&5 echo $ECHO_N "checking for short... $ECHO_C" >&6 if test "${ac_cv_type_short+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { if ((short *) 0) return 0; if (sizeof (short)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_type_short=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_short=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5 echo "${ECHO_T}$ac_cv_type_short" >&6 echo "$as_me:$LINENO: checking size of short" >&5 echo $ECHO_N "checking size of short... $ECHO_C" >&6 if test "${ac_cv_sizeof_short+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$ac_cv_type_short" = yes; then # The cast to unsigned long works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. if test "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { static int test_array [1 - 2 * !(((long) (sizeof (short))) >= 0)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_lo=0 ac_mid=0 while :; do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_hi=$ac_mid; break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr $ac_mid + 1` if test $ac_lo -le $ac_mid; then ac_lo= ac_hi= break fi ac_mid=`expr 2 '*' $ac_mid + 1` fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { static int test_array [1 - 2 * !(((long) (sizeof (short))) < 0)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_hi=-1 ac_mid=-1 while :; do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { static int test_array [1 - 2 * !(((long) (sizeof (short))) >= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_lo=$ac_mid; break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_hi=`expr '(' $ac_mid ')' - 1` if test $ac_mid -le $ac_hi; then ac_lo= ac_hi= break fi ac_mid=`expr 2 '*' $ac_mid` fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo= ac_hi= fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext # Binary search between lo and hi bounds. while test "x$ac_lo" != "x$ac_hi"; do ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_hi=$ac_mid else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr '(' $ac_mid ')' + 1` fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext done case $ac_lo in ?*) ac_cv_sizeof_short=$ac_lo;; '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77 See \`config.log' for more details." >&5 echo "$as_me: error: cannot compute sizeof (short), 77 See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } ;; esac else if test "$cross_compiling" = yes; then { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling See \`config.log' for more details." >&5 echo "$as_me: error: cannot run test program while cross compiling See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default long longval () { return (long) (sizeof (short)); } unsigned long ulongval () { return (long) (sizeof (short)); } #include #include int main () { FILE *f = fopen ("conftest.val", "w"); if (! f) exit (1); if (((long) (sizeof (short))) < 0) { long i = longval (); if (i != ((long) (sizeof (short)))) exit (1); fprintf (f, "%ld\n", i); } else { unsigned long i = ulongval (); if (i != ((long) (sizeof (short)))) exit (1); fprintf (f, "%lu\n", i); } exit (ferror (f) || fclose (f) != 0); ; return 0; } _ACEOF rm -f conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_sizeof_short=`cat conftest.val` else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) { { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77 See \`config.log' for more details." >&5 echo "$as_me: error: cannot compute sizeof (short), 77 See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi rm -f conftest.val else ac_cv_sizeof_short=0 fi fi echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5 echo "${ECHO_T}$ac_cv_sizeof_short" >&6 cat >>confdefs.h <<_ACEOF #define SIZEOF_SHORT $ac_cv_sizeof_short _ACEOF echo "$as_me:$LINENO: checking for int" >&5 echo $ECHO_N "checking for int... $ECHO_C" >&6 if test "${ac_cv_type_int+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { if ((int *) 0) return 0; if (sizeof (int)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_type_int=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_int=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5 echo "${ECHO_T}$ac_cv_type_int" >&6 echo "$as_me:$LINENO: checking size of int" >&5 echo $ECHO_N "checking size of int... $ECHO_C" >&6 if test "${ac_cv_sizeof_int+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$ac_cv_type_int" = yes; then # The cast to unsigned long works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. if test "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { static int test_array [1 - 2 * !(((long) (sizeof (int))) >= 0)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_lo=0 ac_mid=0 while :; do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_hi=$ac_mid; break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr $ac_mid + 1` if test $ac_lo -le $ac_mid; then ac_lo= ac_hi= break fi ac_mid=`expr 2 '*' $ac_mid + 1` fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { static int test_array [1 - 2 * !(((long) (sizeof (int))) < 0)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_hi=-1 ac_mid=-1 while :; do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { static int test_array [1 - 2 * !(((long) (sizeof (int))) >= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_lo=$ac_mid; break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_hi=`expr '(' $ac_mid ')' - 1` if test $ac_mid -le $ac_hi; then ac_lo= ac_hi= break fi ac_mid=`expr 2 '*' $ac_mid` fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo= ac_hi= fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext # Binary search between lo and hi bounds. while test "x$ac_lo" != "x$ac_hi"; do ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_hi=$ac_mid else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr '(' $ac_mid ')' + 1` fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext done case $ac_lo in ?*) ac_cv_sizeof_int=$ac_lo;; '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77 See \`config.log' for more details." >&5 echo "$as_me: error: cannot compute sizeof (int), 77 See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } ;; esac else if test "$cross_compiling" = yes; then { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling See \`config.log' for more details." >&5 echo "$as_me: error: cannot run test program while cross compiling See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default long longval () { return (long) (sizeof (int)); } unsigned long ulongval () { return (long) (sizeof (int)); } #include #include int main () { FILE *f = fopen ("conftest.val", "w"); if (! f) exit (1); if (((long) (sizeof (int))) < 0) { long i = longval (); if (i != ((long) (sizeof (int)))) exit (1); fprintf (f, "%ld\n", i); } else { unsigned long i = ulongval (); if (i != ((long) (sizeof (int)))) exit (1); fprintf (f, "%lu\n", i); } exit (ferror (f) || fclose (f) != 0); ; return 0; } _ACEOF rm -f conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_sizeof_int=`cat conftest.val` else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77 See \`config.log' for more details." >&5 echo "$as_me: error: cannot compute sizeof (int), 77 See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi rm -f conftest.val else ac_cv_sizeof_int=0 fi fi echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5 echo "${ECHO_T}$ac_cv_sizeof_int" >&6 cat >>confdefs.h <<_ACEOF #define SIZEOF_INT $ac_cv_sizeof_int _ACEOF echo "$as_me:$LINENO: checking for long" >&5 echo $ECHO_N "checking for long... $ECHO_C" >&6 if test "${ac_cv_type_long+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { if ((long *) 0) return 0; if (sizeof (long)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_type_long=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_long=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5 echo "${ECHO_T}$ac_cv_type_long" >&6 echo "$as_me:$LINENO: checking size of long" >&5 echo $ECHO_N "checking size of long... $ECHO_C" >&6 if test "${ac_cv_sizeof_long+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$ac_cv_type_long" = yes; then # The cast to unsigned long works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. if test "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { static int test_array [1 - 2 * !(((long) (sizeof (long))) >= 0)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_lo=0 ac_mid=0 while :; do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_hi=$ac_mid; break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr $ac_mid + 1` if test $ac_lo -le $ac_mid; then ac_lo= ac_hi= break fi ac_mid=`expr 2 '*' $ac_mid + 1` fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { static int test_array [1 - 2 * !(((long) (sizeof (long))) < 0)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_hi=-1 ac_mid=-1 while :; do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { static int test_array [1 - 2 * !(((long) (sizeof (long))) >= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_lo=$ac_mid; break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_hi=`expr '(' $ac_mid ')' - 1` if test $ac_mid -le $ac_hi; then ac_lo= ac_hi= break fi ac_mid=`expr 2 '*' $ac_mid` fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo= ac_hi= fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext # Binary search between lo and hi bounds. while test "x$ac_lo" != "x$ac_hi"; do ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_hi=$ac_mid else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr '(' $ac_mid ')' + 1` fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext done case $ac_lo in ?*) ac_cv_sizeof_long=$ac_lo;; '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77 See \`config.log' for more details." >&5 echo "$as_me: error: cannot compute sizeof (long), 77 See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } ;; esac else if test "$cross_compiling" = yes; then { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling See \`config.log' for more details." >&5 echo "$as_me: error: cannot run test program while cross compiling See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default long longval () { return (long) (sizeof (long)); } unsigned long ulongval () { return (long) (sizeof (long)); } #include #include int main () { FILE *f = fopen ("conftest.val", "w"); if (! f) exit (1); if (((long) (sizeof (long))) < 0) { long i = longval (); if (i != ((long) (sizeof (long)))) exit (1); fprintf (f, "%ld\n", i); } else { unsigned long i = ulongval (); if (i != ((long) (sizeof (long)))) exit (1); fprintf (f, "%lu\n", i); } exit (ferror (f) || fclose (f) != 0); ; return 0; } _ACEOF rm -f conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_sizeof_long=`cat conftest.val` else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77 See \`config.log' for more details." >&5 echo "$as_me: error: cannot compute sizeof (long), 77 See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi rm -f conftest.val else ac_cv_sizeof_long=0 fi fi echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5 echo "${ECHO_T}$ac_cv_sizeof_long" >&6 cat >>confdefs.h <<_ACEOF #define SIZEOF_LONG $ac_cv_sizeof_long _ACEOF echo "$as_me:$LINENO: checking for long long" >&5 echo $ECHO_N "checking for long long... $ECHO_C" >&6 if test "${ac_cv_type_long_long+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { if ((long long *) 0) return 0; if (sizeof (long long)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_type_long_long=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_long_long=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5 echo "${ECHO_T}$ac_cv_type_long_long" >&6 echo "$as_me:$LINENO: checking size of long long" >&5 echo $ECHO_N "checking size of long long... $ECHO_C" >&6 if test "${ac_cv_sizeof_long_long+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$ac_cv_type_long_long" = yes; then # The cast to unsigned long works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. if test "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= 0)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_lo=0 ac_mid=0 while :; do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_hi=$ac_mid; break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr $ac_mid + 1` if test $ac_lo -le $ac_mid; then ac_lo= ac_hi= break fi ac_mid=`expr 2 '*' $ac_mid + 1` fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { static int test_array [1 - 2 * !(((long) (sizeof (long long))) < 0)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_hi=-1 ac_mid=-1 while :; do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_lo=$ac_mid; break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_hi=`expr '(' $ac_mid ')' - 1` if test $ac_mid -le $ac_hi; then ac_lo= ac_hi= break fi ac_mid=`expr 2 '*' $ac_mid` fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo= ac_hi= fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext # Binary search between lo and hi bounds. while test "x$ac_lo" != "x$ac_hi"; do ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_hi=$ac_mid else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr '(' $ac_mid ')' + 1` fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext done case $ac_lo in ?*) ac_cv_sizeof_long_long=$ac_lo;; '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77 See \`config.log' for more details." >&5 echo "$as_me: error: cannot compute sizeof (long long), 77 See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } ;; esac else if test "$cross_compiling" = yes; then { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling See \`config.log' for more details." >&5 echo "$as_me: error: cannot run test program while cross compiling See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default long longval () { return (long) (sizeof (long long)); } unsigned long ulongval () { return (long) (sizeof (long long)); } #include #include int main () { FILE *f = fopen ("conftest.val", "w"); if (! f) exit (1); if (((long) (sizeof (long long))) < 0) { long i = longval (); if (i != ((long) (sizeof (long long)))) exit (1); fprintf (f, "%ld\n", i); } else { unsigned long i = ulongval (); if (i != ((long) (sizeof (long long)))) exit (1); fprintf (f, "%lu\n", i); } exit (ferror (f) || fclose (f) != 0); ; return 0; } _ACEOF rm -f conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_sizeof_long_long=`cat conftest.val` else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77 See \`config.log' for more details." >&5 echo "$as_me: error: cannot compute sizeof (long long), 77 See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi rm -f conftest.val else ac_cv_sizeof_long_long=0 fi fi echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5 echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6 cat >>confdefs.h <<_ACEOF #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long _ACEOF SIZEOF_SHORT=$ac_cv_sizeof_short SIZEOF_INT=$ac_cv_sizeof_int SIZEOF_LONG=$ac_cv_sizeof_long SIZEOF_LONG_LONG=$ac_cv_sizeof_long_long for ac_header in inttypes.h stdlib.h unistd.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if eval "test \"\${$as_ac_Header+set}\" = set"; then echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_cxx_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## --------------------------------- ## ## Report this to pp@ludusdesign.com ## ## --------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_header in net/if.h net/if_dl.h netinet/in.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if eval "test \"\${$as_ac_Header+set}\" = set"; then echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_cxx_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## --------------------------------- ## ## Report this to pp@ludusdesign.com ## ## --------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_header in sys/ioctl.h sys/socket.h sys/sockio.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if eval "test \"\${$as_ac_Header+set}\" = set"; then echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_cxx_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## --------------------------------- ## ## Report this to pp@ludusdesign.com ## ## --------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_func in srandom do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" { #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else char (*f) () = $ac_func; #endif #ifdef __cplusplus } #endif int main () { return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done echo "$as_me:$LINENO: checking for struct sockaddr.sa_len" >&5 echo $ECHO_N "checking for struct sockaddr.sa_len... $ECHO_C" >&6 if test "${ac_cv_member_struct_sockaddr_sa_len+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include int main () { static struct sockaddr ac_aggr; if (ac_aggr.sa_len) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_member_struct_sockaddr_sa_len=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include int main () { static struct sockaddr ac_aggr; if (sizeof ac_aggr.sa_len) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_member_struct_sockaddr_sa_len=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_member_struct_sockaddr_sa_len=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_member_struct_sockaddr_sa_len" >&5 echo "${ECHO_T}$ac_cv_member_struct_sockaddr_sa_len" >&6 if test $ac_cv_member_struct_sockaddr_sa_len = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_SA_LEN 1 _ACEOF fi with_uuid= with_uuid_static=uuid/libuuid.a fi if test "$enable_optimization" != "no"; then CFLAGS="$CFLAGS -O2" fi if test -z "$enable_debug"; then enable_debug=no fi if test "$enable_debug" != "no"; then CFLAGS="$CFLAGS -ggdb -DDEBUG" if test "$enable_debug" != "yes"; then CFLAGS="$CFLAGS -DDEBUG_$enable_debug" fi else CFLAGS="$CFLAGS -DNDEBUG" fi if test "$enable_fatal_warnings" = "yes"; then CFLAGS="$CFLAGS -Werror" fi if test "$enable_warnings" != "no"; then CFLAGS="$CFLAGS -Wall" CXXFLAGS="$CXXFLAGS -Woverloaded-virtual" if test "$enable_warnings" = "yes"; then CXXFLAGS="$CXXFLAGS -Wold-style-cast" fi fi if test "$enable_rtti" != "yes"; then CXXFLAGS="$CXXFLAGS -fno-rtti" fi if test "$enable_exceptions" != "yes"; then CXXFLAGS="$CXXFLAGS -fno-exceptions" fi if test "$enable_pic" != "no"; then CFLAGS="$CFLAGS -fpic" fi pc_version= xplcdir_version= lib_prefix_version= if test "$(echo $PACKAGE_VERSION | awk -F. '{ print $2 % 2}')" -eq 1; then enable_unstable=yes pc_version="-${PACKAGE_VERSION}" xplcdir_version="/xplc-${PACKAGE_VERSION}" lib_prefix_version="../" fi if test "$enable_unstable" = "yes"; then CFLAGS="$CFLAGS -DUNSTABLE" fi CXXFLAGS="$CXXFLAGS $CFLAGS" ac_config_files="$ac_config_files config/config.mk" ac_config_files="$ac_config_files dist/xplc.pc dist/xplc-uninstalled.pc" ac_config_files="$ac_config_files examples/simple-module/Makefile" ac_config_files="$ac_config_files examples/simple-module-user/Makefile" ac_config_files="$ac_config_files uuid/uuid_types.h" ac_config_headers="$ac_config_headers include/autoconf.h" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs, see configure's option --config-cache. # It is not useful on other systems. If it contains results you don't # want to keep, you may remove or edit it. # # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # # `ac_cv_env_foo' variables (set or unset) will be overridden when # loading this file, other *unset* `ac_cv_foo' will be assigned the # following values. _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, don't put newlines in cache variables' values. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. { (set) 2>&1 | case `(ac_space=' '; set | grep ac_space) 2>&1` in *ac_space=\ *) # `set' does not quote correctly, so add quotes (double-quote # substitution turns \\\\ into \\, and sed turns \\ into \). sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n \ "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" ;; esac; } | sed ' t clear : clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ : end' >>confcache if diff $cache_file confcache >/dev/null 2>&1; then :; else if test -w $cache_file; then test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file" cat confcache >$cache_file else echo "not updating unwritable cache $cache_file" fi fi rm -f confcache test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' # VPATH may cause trouble with some makes, so we remove $(srcdir), # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=/{ s/:*\$(srcdir):*/:/; s/:*\${srcdir}:*/:/; s/:*@srcdir@:*/:/; s/^\([^=]*=[ ]*\):*/\1/; s/:*$//; s/^[^=]*=[ ]*$//; }' fi DEFS=-DHAVE_CONFIG_H ac_libobjs= ac_ltlibobjs= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_i=`echo "$ac_i" | sed 's/\$U\././;s/\.o$//;s/\.obj$//'` # 2. Add them. ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext" ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs : ${CONFIG_STATUS=./config.status} ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 echo "$as_me: creating $CONFIG_STATUS" >&6;} cat >$CONFIG_STATUS <<_ACEOF #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false ac_cs_recheck=false ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## # Be Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then set -o posix fi DUALCASE=1; export DUALCASE # for MKS sh # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then as_unset=unset else as_unset=false fi # Work around bugs in pre-3.0 UWIN ksh. $as_unset ENV MAIL MAILPATH PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. for as_var in \ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ LC_TELEPHONE LC_TIME do if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else $as_unset $as_var fi done # Required to use basename. if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi # Name of the executable. as_me=`$as_basename "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)$' \| \ . : '\(.\)' 2>/dev/null || echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } /^X\/\(\/\/\)$/{ s//\1/; q; } /^X\/\(\/\).*/{ s//\1/; q; } s/.*/./; q'` # PATH needs CR, and LINENO needs CR and PATH. # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then echo "#! /bin/sh" >conf$$.sh echo "exit 0" >>conf$$.sh chmod +x conf$$.sh if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then PATH_SEPARATOR=';' else PATH_SEPARATOR=: fi rm -f conf$$.sh fi as_lineno_1=$LINENO as_lineno_2=$LINENO as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && test "x$as_lineno_3" = "x$as_lineno_2" || { # Find who we are. Look in the path if we contain no path at all # relative or not. case $0 in *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5 echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;} { (exit 1); exit 1; }; } fi case $CONFIG_SHELL in '') as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for as_base in sh bash ksh sh5; do case $as_dir in /*) if ("$as_dir/$as_base" -c ' as_lineno_1=$LINENO as_lineno_2=$LINENO as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } CONFIG_SHELL=$as_dir/$as_base export CONFIG_SHELL exec "$CONFIG_SHELL" "$0" ${1+"$@"} fi;; esac done done ;; esac # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a # line-number line before each line; the second 'sed' does the real # work. The second script uses 'N' to pair each line-number line # with the numbered line, and appends trailing '-' during # substitution so that $LINENO is not a special case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) sed '=' <$as_myself | sed ' N s,$,-, : loop s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, t loop s,-$,, s,^['$as_cr_digits']*\n,, ' >$as_me.lineno && chmod +x $as_me.lineno || { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5 echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;} { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensible to this). . ./$as_me.lineno # Exit status is that of the last command. exit } case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in *c*,-n*) ECHO_N= ECHO_C=' ' ECHO_T=' ' ;; *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; *) ECHO_N= ECHO_C='\c' ECHO_T= ;; esac if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file echo >conf$$.file if ln -s conf$$.file conf$$ 2>/dev/null; then # We could just check for DJGPP; but this test a) works b) is more generic # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). if test -f conf$$.exe; then # Don't use ln at all; we don't have any links as_ln_s='cp -p' else as_ln_s='ln -s' fi elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.file if mkdir -p . 2>/dev/null; then as_mkdir_p=: else test -d ./-p && rmdir ./-p as_mkdir_p=false fi as_executable_p="test -f" # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" # IFS # We need space, tab and new line, in precisely that order. as_nl=' ' IFS=" $as_nl" # CDPATH. $as_unset CDPATH exec 6>&1 # Open the log real soon, to keep \$[0] and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. Logging --version etc. is OK. exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX } >&5 cat >&5 <<_CSEOF This file was extended by XPLC $as_me 0.3.13, which was generated by GNU Autoconf 2.59. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ _CSEOF echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5 echo >&5 _ACEOF # Files that config.status was made for. if test -n "$ac_config_files"; then echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS fi if test -n "$ac_config_headers"; then echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS fi if test -n "$ac_config_links"; then echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS fi if test -n "$ac_config_commands"; then echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS fi cat >>$CONFIG_STATUS <<\_ACEOF ac_cs_usage="\ \`$as_me' instantiates files from templates according to the current configuration. Usage: $0 [OPTIONS] [FILE]... -h, --help print this help, then exit -V, --version print version number, then exit -q, --quiet do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE --header=FILE[:TEMPLATE] instantiate the configuration header FILE Configuration files: $config_files Configuration headers: $config_headers Report bugs to ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ XPLC config.status 0.3.13 configured by $0, generated by GNU Autoconf 2.59, with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" Copyright (C) 2003 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." srcdir=$srcdir INSTALL="$INSTALL" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # If no file are specified by the user, then we need to provide default # value. By we need to know if files were specified by the user. ac_need_defaults=: while test $# != 0 do case $1 in --*=*) ac_option=`expr "x$1" : 'x\([^=]*\)='` ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'` ac_shift=: ;; -*) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; *) # This is not an option, so the user has probably given explicit # arguments. ac_option=$1 ac_need_defaults=false;; esac case $ac_option in # Handling of the options. _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --vers* | -V ) echo "$ac_cs_version"; exit 0 ;; --he | --h) # Conflict between --help and --header { { echo "$as_me:$LINENO: error: ambiguous option: $1 Try \`$0 --help' for more information." >&5 echo "$as_me: error: ambiguous option: $1 Try \`$0 --help' for more information." >&2;} { (exit 1); exit 1; }; };; --help | --hel | -h ) echo "$ac_cs_usage"; exit 0 ;; --debug | --d* | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift CONFIG_FILES="$CONFIG_FILES $ac_optarg" ac_need_defaults=false;; --header | --heade | --head | --hea ) $ac_shift CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" ac_need_defaults=false;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1 Try \`$0 --help' for more information." >&5 echo "$as_me: error: unrecognized option: $1 Try \`$0 --help' for more information." >&2;} { (exit 1); exit 1; }; } ;; *) ac_config_targets="$ac_config_targets $1" ;; esac shift done ac_configure_extra_args= if $ac_cs_silent; then exec 6>/dev/null ac_configure_extra_args="$ac_configure_extra_args --silent" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF if \$ac_cs_recheck; then echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion fi _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF for ac_config_target in $ac_config_targets do case "$ac_config_target" in # Handling of arguments. "config/config.mk" ) CONFIG_FILES="$CONFIG_FILES config/config.mk" ;; "dist/xplc.pc" ) CONFIG_FILES="$CONFIG_FILES dist/xplc.pc" ;; "dist/xplc-uninstalled.pc" ) CONFIG_FILES="$CONFIG_FILES dist/xplc-uninstalled.pc" ;; "examples/simple-module/Makefile" ) CONFIG_FILES="$CONFIG_FILES examples/simple-module/Makefile" ;; "examples/simple-module-user/Makefile" ) CONFIG_FILES="$CONFIG_FILES examples/simple-module-user/Makefile" ;; "uuid/uuid_types.h" ) CONFIG_FILES="$CONFIG_FILES uuid/uuid_types.h" ;; "include/autoconf.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/autoconf.h" ;; *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 echo "$as_me: error: invalid argument: $ac_config_target" >&2;} { (exit 1); exit 1; }; };; esac done # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers fi # Have a temporary directory for convenience. Make it in the build tree # simply because there is no reason to put it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Create a temporary directory, and hook for its removal unless debugging. $debug || { trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0 trap '{ (exit 1); exit 1; }' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" } || { tmp=./confstat$$-$RANDOM (umask 077 && mkdir $tmp) } || { echo "$me: cannot create a temporary directory in ." >&2 { (exit 1); exit 1; } } _ACEOF cat >>$CONFIG_STATUS <<_ACEOF # # CONFIG_FILES section. # # No need to generate the scripts if there are no CONFIG_FILES. # This happens for instance when ./config.status config.h if test -n "\$CONFIG_FILES"; then # Protect against being on the right side of a sed subst in config.status. sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g; s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF s,@SHELL@,$SHELL,;t t s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t s,@exec_prefix@,$exec_prefix,;t t s,@prefix@,$prefix,;t t s,@program_transform_name@,$program_transform_name,;t t s,@bindir@,$bindir,;t t s,@sbindir@,$sbindir,;t t s,@libexecdir@,$libexecdir,;t t s,@datadir@,$datadir,;t t s,@sysconfdir@,$sysconfdir,;t t s,@sharedstatedir@,$sharedstatedir,;t t s,@localstatedir@,$localstatedir,;t t s,@libdir@,$libdir,;t t s,@includedir@,$includedir,;t t s,@oldincludedir@,$oldincludedir,;t t s,@infodir@,$infodir,;t t s,@mandir@,$mandir,;t t s,@build_alias@,$build_alias,;t t s,@host_alias@,$host_alias,;t t s,@target_alias@,$target_alias,;t t s,@DEFS@,$DEFS,;t t s,@ECHO_C@,$ECHO_C,;t t s,@ECHO_N@,$ECHO_N,;t t s,@ECHO_T@,$ECHO_T,;t t s,@LIBS@,$LIBS,;t t s,@build@,$build,;t t s,@build_cpu@,$build_cpu,;t t s,@build_vendor@,$build_vendor,;t t s,@build_os@,$build_os,;t t s,@host@,$host,;t t s,@host_cpu@,$host_cpu,;t t s,@host_vendor@,$host_vendor,;t t s,@host_os@,$host_os,;t t s,@CC@,$CC,;t t s,@CFLAGS@,$CFLAGS,;t t s,@LDFLAGS@,$LDFLAGS,;t t s,@CPPFLAGS@,$CPPFLAGS,;t t s,@ac_ct_CC@,$ac_ct_CC,;t t s,@EXEEXT@,$EXEEXT,;t t s,@OBJEXT@,$OBJEXT,;t t s,@CXX@,$CXX,;t t s,@CXXFLAGS@,$CXXFLAGS,;t t s,@ac_ct_CXX@,$ac_ct_CXX,;t t s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t s,@INSTALL_DATA@,$INSTALL_DATA,;t t s,@LN_S@,$LN_S,;t t s,@CXXCPP@,$CXXCPP,;t t s,@EGREP@,$EGREP,;t t s,@CVS2CL@,$CVS2CL,;t t s,@SIZEOF_SHORT@,$SIZEOF_SHORT,;t t s,@SIZEOF_INT@,$SIZEOF_INT,;t t s,@SIZEOF_LONG@,$SIZEOF_LONG,;t t s,@SIZEOF_LONG_LONG@,$SIZEOF_LONG_LONG,;t t s,@pc_version@,$pc_version,;t t s,@xplcdir_version@,$xplcdir_version,;t t s,@lib_prefix_version@,$lib_prefix_version,;t t s,@enable_loader@,$enable_loader,;t t s,@with_dlopen@,$with_dlopen,;t t s,@so_style@,$so_style,;t t s,@with_uuid@,$with_uuid,;t t s,@with_uuid_static@,$with_uuid_static,;t t s,@LIBOBJS@,$LIBOBJS,;t t s,@LTLIBOBJS@,$LTLIBOBJS,;t t CEOF _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # Split the substitutions into bite-sized pieces for seds with # small command number limits, like on Digital OSF/1 and HP-UX. ac_max_sed_lines=48 ac_sed_frag=1 # Number of current file. ac_beg=1 # First line for current file. ac_end=$ac_max_sed_lines # Line after last line for current file. ac_more_lines=: ac_sed_cmds= while $ac_more_lines; do if test $ac_beg -gt 1; then sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag else sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag fi if test ! -s $tmp/subs.frag; then ac_more_lines=false else # The purpose of the label and of the branching condition is to # speed up the sed processing (if there are no `@' at all, there # is no need to browse any of the substitutions). # These are the two extra sed commands mentioned above. (echo ':t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed if test -z "$ac_sed_cmds"; then ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed" else ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed" fi ac_sed_frag=`expr $ac_sed_frag + 1` ac_beg=$ac_end ac_end=`expr $ac_end + $ac_max_sed_lines` fi done if test -z "$ac_sed_cmds"; then ac_sed_cmds=cat fi fi # test -n "$CONFIG_FILES" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". case $ac_file in - | *:- | *:-:* ) # input from stdin cat >$tmp/stdin ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; * ) ac_file_in=$ac_file.in ;; esac # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories. ac_dir=`(dirname "$ac_file") 2>/dev/null || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` { if $as_mkdir_p; then mkdir -p "$ac_dir" else as_dir="$ac_dir" as_dirs= while test ! -d "$as_dir"; do as_dirs="$as_dir $as_dirs" as_dir=`(dirname "$as_dir") 2>/dev/null || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` done test ! -n "$as_dirs" || mkdir $as_dirs fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} { (exit 1); exit 1; }; }; } ac_builddir=. if test "$ac_dir" != .; then ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` # A "../" for each directory in $ac_dir_suffix. ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` else ac_dir_suffix= ac_top_builddir= fi case $srcdir in .) # No --srcdir option. We are building in place. ac_srcdir=. if test -z "$ac_top_builddir"; then ac_top_srcdir=. else ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` fi ;; [\\/]* | ?:[\\/]* ) # Absolute path. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ;; *) # Relative path. ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_builddir$srcdir ;; esac # Do not use `cd foo && pwd` to compute absolute paths, because # the directories may not exist. case `pwd` in .) ac_abs_builddir="$ac_dir";; *) case "$ac_dir" in .) ac_abs_builddir=`pwd`;; [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; *) ac_abs_builddir=`pwd`/"$ac_dir";; esac;; esac case $ac_abs_builddir in .) ac_abs_top_builddir=${ac_top_builddir}.;; *) case ${ac_top_builddir}. in .) ac_abs_top_builddir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; esac;; esac case $ac_abs_builddir in .) ac_abs_srcdir=$ac_srcdir;; *) case $ac_srcdir in .) ac_abs_srcdir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; esac;; esac case $ac_abs_builddir in .) ac_abs_top_srcdir=$ac_top_srcdir;; *) case $ac_top_srcdir in .) ac_abs_top_srcdir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; esac;; esac case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_builddir$INSTALL ;; esac if test x"$ac_file" != x-; then { echo "$as_me:$LINENO: creating $ac_file" >&5 echo "$as_me: creating $ac_file" >&6;} rm -f "$ac_file" fi # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ if test x"$ac_file" = x-; then configure_input= else configure_input="$ac_file. " fi configure_input=$configure_input"Generated from `echo $ac_file_in | sed 's,.*/,,'` by configure." # First look for the input files in the build tree, otherwise in the # src tree. ac_file_inputs=`IFS=: for f in $ac_file_in; do case $f in -) echo $tmp/stdin ;; [\\/$]*) # Absolute (can't be DOS-style, as IFS=:) test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } echo "$f";; *) # Relative if test -f "$f"; then # Build tree echo "$f" elif test -f "$srcdir/$f"; then # Source tree echo "$srcdir/$f" else # /dev/null tree { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } fi;; esac done` || { (exit 1); exit 1; } _ACEOF cat >>$CONFIG_STATUS <<_ACEOF sed "$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s,@configure_input@,$configure_input,;t t s,@srcdir@,$ac_srcdir,;t t s,@abs_srcdir@,$ac_abs_srcdir,;t t s,@top_srcdir@,$ac_top_srcdir,;t t s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t s,@builddir@,$ac_builddir,;t t s,@abs_builddir@,$ac_abs_builddir,;t t s,@top_builddir@,$ac_top_builddir,;t t s,@abs_top_builddir@,$ac_abs_top_builddir,;t t s,@INSTALL@,$ac_INSTALL,;t t " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out rm -f $tmp/stdin if test x"$ac_file" != x-; then mv $tmp/out $ac_file else cat $tmp/out rm -f $tmp/out fi done _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # # CONFIG_HEADER section. # # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where # NAME is the cpp macro being defined and VALUE is the value it is being given. # # ac_d sets the value in "#define NAME VALUE" lines. ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)' ac_dB='[ ].*$,\1#\2' ac_dC=' ' ac_dD=',;t' # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE". ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' ac_uB='$,\1#\2define\3' ac_uC=' ' ac_uD=',;t' for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". case $ac_file in - | *:- | *:-:* ) # input from stdin cat >$tmp/stdin ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; * ) ac_file_in=$ac_file.in ;; esac test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5 echo "$as_me: creating $ac_file" >&6;} # First look for the input files in the build tree, otherwise in the # src tree. ac_file_inputs=`IFS=: for f in $ac_file_in; do case $f in -) echo $tmp/stdin ;; [\\/$]*) # Absolute (can't be DOS-style, as IFS=:) test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } # Do quote $f, to prevent DOS paths from being IFS'd. echo "$f";; *) # Relative if test -f "$f"; then # Build tree echo "$f" elif test -f "$srcdir/$f"; then # Source tree echo "$srcdir/$f" else # /dev/null tree { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } fi;; esac done` || { (exit 1); exit 1; } # Remove the trailing spaces. sed 's/[ ]*$//' $ac_file_inputs >$tmp/in _ACEOF # Transform confdefs.h into two sed scripts, `conftest.defines' and # `conftest.undefs', that substitutes the proper values into # config.h.in to produce config.h. The first handles `#define' # templates, and the second `#undef' templates. # And first: Protect against being on the right side of a sed subst in # config.status. Protect against being in an unquoted here document # in config.status. rm -f conftest.defines conftest.undefs # Using a here document instead of a string reduces the quoting nightmare. # Putting comments in sed scripts is not portable. # # `end' is used to avoid that the second main sed command (meant for # 0-ary CPP macros) applies to n-ary macro definitions. # See the Autoconf documentation for `clear'. cat >confdef2sed.sed <<\_ACEOF s/[\\&,]/\\&/g s,[\\$`],\\&,g t clear : clear s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp t end s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp : end _ACEOF # If some macros were called several times there might be several times # the same #defines, which is useless. Nevertheless, we may not want to # sort them, since we want the *last* AC-DEFINE to be honored. uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs rm -f confdef2sed.sed # This sed command replaces #undef with comments. This is necessary, for # example, in the case of _POSIX_SOURCE, which is predefined and required # on some systems where configure will not decide to define it. cat >>conftest.undefs <<\_ACEOF s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */, _ACEOF # Break up conftest.defines because some shells have a limit on the size # of here documents, and old seds have small limits too (100 cmds). echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS echo ' :' >>$CONFIG_STATUS rm -f conftest.tail while grep . conftest.defines >/dev/null do # Write a limited-size here document to $tmp/defines.sed. echo ' cat >$tmp/defines.sed <>$CONFIG_STATUS # Speed up: don't consider the non `#define' lines. echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS # Work around the forget-to-reset-the-flag bug. echo 't clr' >>$CONFIG_STATUS echo ': clr' >>$CONFIG_STATUS sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS echo 'CEOF sed -f $tmp/defines.sed $tmp/in >$tmp/out rm -f $tmp/in mv $tmp/out $tmp/in ' >>$CONFIG_STATUS sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail rm -f conftest.defines mv conftest.tail conftest.defines done rm -f conftest.defines echo ' fi # grep' >>$CONFIG_STATUS echo >>$CONFIG_STATUS # Break up conftest.undefs because some shells have a limit on the size # of here documents, and old seds have small limits too (100 cmds). echo ' # Handle all the #undef templates' >>$CONFIG_STATUS rm -f conftest.tail while grep . conftest.undefs >/dev/null do # Write a limited-size here document to $tmp/undefs.sed. echo ' cat >$tmp/undefs.sed <>$CONFIG_STATUS # Speed up: don't consider the non `#undef' echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS # Work around the forget-to-reset-the-flag bug. echo 't clr' >>$CONFIG_STATUS echo ': clr' >>$CONFIG_STATUS sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS echo 'CEOF sed -f $tmp/undefs.sed $tmp/in >$tmp/out rm -f $tmp/in mv $tmp/out $tmp/in ' >>$CONFIG_STATUS sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail rm -f conftest.undefs mv conftest.tail conftest.undefs done rm -f conftest.undefs cat >>$CONFIG_STATUS <<\_ACEOF # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ if test x"$ac_file" = x-; then echo "/* Generated by configure. */" >$tmp/config.h else echo "/* $ac_file. Generated by configure. */" >$tmp/config.h fi cat $tmp/in >>$tmp/config.h rm -f $tmp/in if test x"$ac_file" != x-; then if diff $ac_file $tmp/config.h >/dev/null 2>&1; then { echo "$as_me:$LINENO: $ac_file is unchanged" >&5 echo "$as_me: $ac_file is unchanged" >&6;} else ac_dir=`(dirname "$ac_file") 2>/dev/null || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` { if $as_mkdir_p; then mkdir -p "$ac_dir" else as_dir="$ac_dir" as_dirs= while test ! -d "$as_dir"; do as_dirs="$as_dir $as_dirs" as_dir=`(dirname "$as_dir") 2>/dev/null || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` done test ! -n "$as_dirs" || mkdir $as_dirs fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} { (exit 1); exit 1; }; }; } rm -f $ac_file mv $tmp/config.h $ac_file fi else cat $tmp/config.h rm -f $tmp/config.h fi done _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF { (exit 0); exit 0; } _ACEOF chmod +x $CONFIG_STATUS ac_clean_files=$ac_clean_files_save # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open # by configure, so config.status won't be able to write to it; its # output is simply discarded. So we exec the FD to /dev/null, # effectively closing config.log, so it can be properly (re)opened and # appended to by config.status. When coming back to configure, we # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: ac_config_status_args= test "$silent" = yes && ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. $ac_cs_success || { (exit 1); exit 1; } fi if test "$(echo $PACKAGE_VERSION | awk -F. '{ print $2 % 2}')" -eq 1; then { echo "$as_me:$LINENO: WARNING: Unstable release, the API might change in the next release." >&5 echo "$as_me: WARNING: Unstable release, the API might change in the next release." >&2;} fi if test "$enable_loader" = "no"; then { echo "$as_me:$LINENO: WARNING: Dynamic loading is disabled." >&5 echo "$as_me: WARNING: Dynamic loading is disabled." >&2;} fi xplc-0.3.13/.cvsignore0100644000204300020430000000025010053462316014730 0ustar pphaneufpphaneufChangeLog configure config.cache config.log config.status doxygen Debug Release README *.dsw *.opt *.pc *.ncb Tags.WW libxplc.so.* autom4te.cache xplc.spec xplc-[0-9]* xplc-0.3.13/CREDITS0100644000204300020430000000027510035321246013753 0ustar pphaneufpphaneufThe following persons have worked on XPLC: Pierre Phaneuf Stéphane Lajoie James Morrison Avery Pennarun xplc-0.3.13/Doxyfile0100644000204300020430000011507507764225425014467 0ustar pphaneufpphaneuf# Doxyfile 1.2.18 # This file describes the settings to be used by the documentation system # doxygen (www.doxygen.org) for a project # # All text after a hash (#) is considered a comment and will be ignored # The format is: # TAG = value [value, ...] # For lists items can also be appended using: # TAG += value [value, ...] # Values that contain spaces should be placed between quotes (" ") #--------------------------------------------------------------------------- # General configuration options #--------------------------------------------------------------------------- # The PROJECT_NAME tag is a single word (or a sequence of words surrounded # by quotes) that should identify the project. PROJECT_NAME = XPLC # The PROJECT_NUMBER tag can be used to enter a project or revision number. # This could be handy for archiving the generated documentation or # if some version control system is used. PROJECT_NUMBER = # The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) # base path where the generated documentation will be put. # If a relative path is entered, it will be relative to the location # where doxygen was started. If left blank the current directory will be used. OUTPUT_DIRECTORY = doxygen # The OUTPUT_LANGUAGE tag is used to specify the language in which all # documentation generated by doxygen is written. Doxygen will use this # information to generate all constant output in the proper language. # The default language is English, other supported languages are: # Brazilian, Catalan, Chinese, Chinese-Traditional, Croatian, Czech, Danish, Dutch, # Finnish, French, German, Greek, Hungarian, Italian, Japanese, Japanese-en # (Japanese with english messages), Korean, Norwegian, Polish, Portuguese, # Romanian, Russian, Serbian, Slovak, Slovene, Spanish, Swedish and Ukrainian. OUTPUT_LANGUAGE = English # If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in # documentation are documented, even if no documentation was available. # Private class members and static file members will be hidden unless # the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES EXTRACT_ALL = NO # If the EXTRACT_PRIVATE tag is set to YES all private members of a class # will be included in the documentation. EXTRACT_PRIVATE = NO # If the EXTRACT_STATIC tag is set to YES all static members of a file # will be included in the documentation. EXTRACT_STATIC = NO # If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) # defined locally in source files will be included in the documentation. # If set to NO only classes defined in header files are included. EXTRACT_LOCAL_CLASSES = YES # If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all # undocumented members of documented classes, files or namespaces. # If set to NO (the default) these members will be included in the # various overviews, but no documentation section is generated. # This option has no effect if EXTRACT_ALL is enabled. HIDE_UNDOC_MEMBERS = NO # If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all # undocumented classes that are normally visible in the class hierarchy. # If set to NO (the default) these class will be included in the various # overviews. This option has no effect if EXTRACT_ALL is enabled. HIDE_UNDOC_CLASSES = NO # If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all # friend (class|struct|union) declarations. # If set to NO (the default) these declarations will be included in the # documentation. HIDE_FRIEND_COMPOUNDS = NO # If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will # include brief member descriptions after the members that are listed in # the file and class documentation (similar to JavaDoc). # Set to NO to disable this. BRIEF_MEMBER_DESC = YES # If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend # the brief description of a member or function before the detailed description. # Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the # brief descriptions will be completely suppressed. REPEAT_BRIEF = YES # If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then # Doxygen will generate a detailed section even if there is only a brief # description. ALWAYS_DETAILED_SEC = NO # If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all inherited # members of a class in the documentation of that class as if those members were # ordinary class members. Constructors, destructors and assignment operators of # the base classes will not be shown. INLINE_INHERITED_MEMB = YES # If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full # path before files name in the file list and in the header files. If set # to NO the shortest path that makes the file name unique will be used. FULL_PATH_NAMES = NO # If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag # can be used to strip a user defined part of the path. Stripping is # only done if one of the specified strings matches the left-hand part of # the path. It is allowed to use relative paths in the argument list. STRIP_FROM_PATH = # The INTERNAL_DOCS tag determines if documentation # that is typed after a \internal command is included. If the tag is set # to NO (the default) then the documentation will be excluded. # Set it to YES to include the internal documentation. INTERNAL_DOCS = NO # Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct # doxygen to hide any special comment blocks from generated source code # fragments. Normal C and C++ comments will always remain visible. STRIP_CODE_COMMENTS = YES # If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate # file names in lower case letters. If set to YES upper case letters are also # allowed. This is useful if you have classes or files whose names only differ # in case and if your file system supports case sensitive file names. Windows # users are adviced to set this option to NO. CASE_SENSE_NAMES = YES # If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter # (but less readable) file names. This can be useful is your file systems # doesn't support long names like on DOS, Mac, or CD-ROM. SHORT_NAMES = NO # If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen # will show members with their full class and namespace scopes in the # documentation. If set to YES the scope will be hidden. HIDE_SCOPE_NAMES = NO # If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen # will generate a verbatim copy of the header file for each class for # which an include is specified. Set to NO to disable this. VERBATIM_HEADERS = YES # If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen # will put list of the files that are included by a file in the documentation # of that file. SHOW_INCLUDE_FILES = NO # If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen # will interpret the first line (until the first dot) of a JavaDoc-style # comment as the brief description. If set to NO, the JavaDoc # comments will behave just like the Qt-style comments (thus requiring an # explict @brief command for a brief description. JAVADOC_AUTOBRIEF = YES # The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen # treat a multi-line C++ special comment block (i.e. a block of //! or /// # comments) as a brief description. This used to be the default behaviour. # The new default is to treat a multi-line C++ comment block as a detailed # description. Set this tag to YES if you prefer the old behaviour instead. MULTILINE_CPP_IS_BRIEF = NO # If the DETAILS_AT_TOP tag is set to YES then Doxygen # will output the detailed description near the top, like JavaDoc. # If set to NO, the detailed description appears after the member # documentation. DETAILS_AT_TOP = NO # If the INHERIT_DOCS tag is set to YES (the default) then an undocumented # member inherits the documentation from any documented member that it # reimplements. INHERIT_DOCS = YES # If the INLINE_INFO tag is set to YES (the default) then a tag [inline] # is inserted in the documentation for inline members. INLINE_INFO = YES # If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen # will sort the (detailed) documentation of file and class members # alphabetically by member name. If set to NO the members will appear in # declaration order. SORT_MEMBER_DOCS = YES # If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC # tag is set to YES, then doxygen will reuse the documentation of the first # member in the group (if any) for the other members of the group. By default # all members of a group must be documented explicitly. DISTRIBUTE_GROUP_DOC = NO # The TAB_SIZE tag can be used to set the number of spaces in a tab. # Doxygen uses this value to replace tabs by spaces in code fragments. TAB_SIZE = 8 # The GENERATE_TODOLIST tag can be used to enable (YES) or # disable (NO) the todo list. This list is created by putting \todo # commands in the documentation. GENERATE_TODOLIST = YES # The GENERATE_TESTLIST tag can be used to enable (YES) or # disable (NO) the test list. This list is created by putting \test # commands in the documentation. GENERATE_TESTLIST = YES # The GENERATE_BUGLIST tag can be used to enable (YES) or # disable (NO) the bug list. This list is created by putting \bug # commands in the documentation. GENERATE_BUGLIST = YES # The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or # disable (NO) the deprecated list. This list is created by putting \deprecated commands in the documentation. GENERATE_DEPRECATEDLIST= YES # This tag can be used to specify a number of aliases that acts # as commands in the documentation. An alias has the form "name=value". # For example adding "sideeffect=\par Side Effects:\n" will allow you to # put the command \sideeffect (or @sideeffect) in the documentation, which # will result in a user defined paragraph with heading "Side Effects:". # You can put \n's in the value part of an alias to insert newlines. ALIASES = # The ENABLED_SECTIONS tag can be used to enable conditional # documentation sections, marked by \if sectionname ... \endif. ENABLED_SECTIONS = # The MAX_INITIALIZER_LINES tag determines the maximum number of lines # the initial value of a variable or define consist of for it to appear in # the documentation. If the initializer consists of more lines than specified # here it will be hidden. Use a value of 0 to hide initializers completely. # The appearance of the initializer of individual variables and defines in the # documentation can be controlled using \showinitializer or \hideinitializer # command in the documentation regardless of this setting. MAX_INITIALIZER_LINES = 30 # Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources # only. Doxygen will then generate output that is more tailored for C. # For instance some of the names that are used will be different. The list # of all members will be omitted, etc. OPTIMIZE_OUTPUT_FOR_C = NO # Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java sources # only. Doxygen will then generate output that is more tailored for Java. # For instance namespaces will be presented as packages, qualified scopes # will look different, etc. OPTIMIZE_OUTPUT_JAVA = NO # Set the SHOW_USED_FILES tag to NO to disable the list of files generated # at the bottom of the documentation of classes and structs. If set to YES the # list will mention the files that were used to generate the documentation. SHOW_USED_FILES = YES #--------------------------------------------------------------------------- # configuration options related to warning and progress messages #--------------------------------------------------------------------------- # The QUIET tag can be used to turn on/off the messages that are generated # by doxygen. Possible values are YES and NO. If left blank NO is used. QUIET = YES # The WARNINGS tag can be used to turn on/off the warning messages that are # generated by doxygen. Possible values are YES and NO. If left blank # NO is used. WARNINGS = YES # If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings # for undocumented members. If EXTRACT_ALL is set to YES then this flag will # automatically be disabled. WARN_IF_UNDOCUMENTED = YES # The WARN_FORMAT tag determines the format of the warning messages that # doxygen can produce. The string should contain the $file, $line, and $text # tags, which will be replaced by the file and line number from which the # warning originated and the warning text. WARN_FORMAT = "$file:$line: $text" # The WARN_LOGFILE tag can be used to specify a file to which warning # and error messages should be written. If left blank the output is written # to stderr. WARN_LOGFILE = #--------------------------------------------------------------------------- # configuration options related to the input files #--------------------------------------------------------------------------- # The INPUT tag can be used to specify the files and/or directories that contain # documented source files. You may enter file names like "myfile.cpp" or # directories like "/usr/src/myproject". Separate the files or directories # with spaces. INPUT = include # If the value of the INPUT tag contains directories, you can use the # FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp # and *.h) to filter out the source-files in the directories. If left # blank the following patterns are tested: # *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx *.hpp # *.h++ *.idl *.odl FILE_PATTERNS = # The RECURSIVE tag can be used to turn specify whether or not subdirectories # should be searched for input files as well. Possible values are YES and NO. # If left blank NO is used. RECURSIVE = YES # The EXCLUDE tag can be used to specify files and/or directories that should # excluded from the INPUT source files. This way you can easily exclude a # subdirectory from a directory tree whose root is specified with the INPUT tag. EXCLUDE = # The EXCLUDE_SYMLINKS tag can be used select whether or not files or directories # that are symbolic links (a Unix filesystem feature) are excluded from the input. EXCLUDE_SYMLINKS = NO # If the value of the INPUT tag contains directories, you can use the # EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude # certain files from those directories. EXCLUDE_PATTERNS = # The EXAMPLE_PATH tag can be used to specify one or more files or # directories that contain example code fragments that are included (see # the \include command). EXAMPLE_PATH = # If the value of the EXAMPLE_PATH tag contains directories, you can use the # EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp # and *.h) to filter out the source-files in the directories. If left # blank all files are included. EXAMPLE_PATTERNS = # If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be # searched for input files to be used with the \include or \dontinclude # commands irrespective of the value of the RECURSIVE tag. # Possible values are YES and NO. If left blank NO is used. EXAMPLE_RECURSIVE = NO # The IMAGE_PATH tag can be used to specify one or more files or # directories that contain image that are included in the documentation (see # the \image command). IMAGE_PATH = # The INPUT_FILTER tag can be used to specify a program that doxygen should # invoke to filter for each input file. Doxygen will invoke the filter program # by executing (via popen()) the command , where # is the value of the INPUT_FILTER tag, and is the name of an # input file. Doxygen will then use the output that the filter program writes # to standard output. INPUT_FILTER = # If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using # INPUT_FILTER) will be used to filter the input files when producing source # files to browse (i.e. when SOURCE_BROWSER is set to YES). FILTER_SOURCE_FILES = NO #--------------------------------------------------------------------------- # configuration options related to source browsing #--------------------------------------------------------------------------- # If the SOURCE_BROWSER tag is set to YES then a list of source files will # be generated. Documented entities will be cross-referenced with these sources. SOURCE_BROWSER = NO # Setting the INLINE_SOURCES tag to YES will include the body # of functions and classes directly in the documentation. INLINE_SOURCES = NO # If the REFERENCED_BY_RELATION tag is set to YES (the default) # then for each documented function all documented # functions referencing it will be listed. REFERENCED_BY_RELATION = YES # If the REFERENCES_RELATION tag is set to YES (the default) # then for each documented function all documented entities # called/used by that function will be listed. REFERENCES_RELATION = YES #--------------------------------------------------------------------------- # configuration options related to the alphabetical class index #--------------------------------------------------------------------------- # If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index # of all compounds will be generated. Enable this if the project # contains a lot of classes, structs, unions or interfaces. ALPHABETICAL_INDEX = NO # If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then # the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns # in which this list will be split (can be a number in the range [1..20]) COLS_IN_ALPHA_INDEX = 5 # In case all classes in a project start with a common prefix, all # classes will be put under the same header in the alphabetical index. # The IGNORE_PREFIX tag can be used to specify one or more prefixes that # should be ignored while generating the index headers. IGNORE_PREFIX = #--------------------------------------------------------------------------- # configuration options related to the HTML output #--------------------------------------------------------------------------- # If the GENERATE_HTML tag is set to YES (the default) Doxygen will # generate HTML output. GENERATE_HTML = YES # The HTML_OUTPUT tag is used to specify where the HTML docs will be put. # If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `html' will be used as the default path. HTML_OUTPUT = html # The HTML_FILE_EXTENSION tag can be used to specify the file extension for # each generated HTML page (for example: .htm,.php,.asp). If it is left blank # doxygen will generate files with .html extension. HTML_FILE_EXTENSION = .html # The HTML_HEADER tag can be used to specify a personal HTML header for # each generated HTML page. If it is left blank doxygen will generate a # standard header. HTML_HEADER = # The HTML_FOOTER tag can be used to specify a personal HTML footer for # each generated HTML page. If it is left blank doxygen will generate a # standard footer. HTML_FOOTER = # The HTML_STYLESHEET tag can be used to specify a user defined cascading # style sheet that is used by each HTML page. It can be used to # fine-tune the look of the HTML output. If the tag is left blank doxygen # will generate a default style sheet HTML_STYLESHEET = # If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, # files or namespaces will be aligned in HTML using tables. If set to # NO a bullet list will be used. HTML_ALIGN_MEMBERS = YES # If the GENERATE_HTMLHELP tag is set to YES, additional index files # will be generated that can be used as input for tools like the # Microsoft HTML help workshop to generate a compressed HTML help file (.chm) # of the generated HTML documentation. GENERATE_HTMLHELP = NO # If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can # be used to specify the file name of the resulting .chm file. You # can add a path in front of the file if the result should not be # written to the html output dir. CHM_FILE = # If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can # be used to specify the location (absolute path including file name) of # the HTML help compiler (hhc.exe). If non empty doxygen will try to run # the html help compiler on the generated index.hhp. HHC_LOCATION = # If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag # controls if a separate .chi index file is generated (YES) or that # it should be included in the master .chm file (NO). GENERATE_CHI = NO # If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag # controls whether a binary table of contents is generated (YES) or a # normal table of contents (NO) in the .chm file. BINARY_TOC = NO # The TOC_EXPAND flag can be set to YES to add extra items for group members # to the contents of the Html help documentation and to the tree view. TOC_EXPAND = NO # The DISABLE_INDEX tag can be used to turn on/off the condensed index at # top of each HTML page. The value NO (the default) enables the index and # the value YES disables it. DISABLE_INDEX = NO # This tag can be used to set the number of enum values (range [1..20]) # that doxygen will group on one line in the generated HTML documentation. ENUM_VALUES_PER_LINE = 4 # If the GENERATE_TREEVIEW tag is set to YES, a side panel will be # generated containing a tree-like index structure (just like the one that # is generated for HTML Help). For this to work a browser that supports # JavaScript and frames is required (for instance Mozilla, Netscape 4.0+, # or Internet explorer 4.0+). Note that for large projects the tree generation # can take a very long time. In such cases it is better to disable this feature. # Windows users are probably better off using the HTML help feature. GENERATE_TREEVIEW = NO # If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be # used to set the initial width (in pixels) of the frame in which the tree # is shown. TREEVIEW_WIDTH = 250 #--------------------------------------------------------------------------- # configuration options related to the LaTeX output #--------------------------------------------------------------------------- # If the GENERATE_LATEX tag is set to YES (the default) Doxygen will # generate Latex output. GENERATE_LATEX = YES # The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. # If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `latex' will be used as the default path. LATEX_OUTPUT = latex # The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be invoked. If left blank `latex' will be used as the default command name. LATEX_CMD_NAME = latex # The MAKEINDEX_CMD_NAME tag can be used to specify the command name to # generate index for LaTeX. If left blank `makeindex' will be used as the # default command name. MAKEINDEX_CMD_NAME = makeindex # If the COMPACT_LATEX tag is set to YES Doxygen generates more compact # LaTeX documents. This may be useful for small projects and may help to # save some trees in general. COMPACT_LATEX = NO # The PAPER_TYPE tag can be used to set the paper type that is used # by the printer. Possible values are: a4, a4wide, letter, legal and # executive. If left blank a4wide will be used. PAPER_TYPE = letter # The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX # packages that should be included in the LaTeX output. EXTRA_PACKAGES = # The LATEX_HEADER tag can be used to specify a personal LaTeX header for # the generated latex document. The header should contain everything until # the first chapter. If it is left blank doxygen will generate a # standard header. Notice: only use this tag if you know what you are doing! LATEX_HEADER = # If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated # is prepared for conversion to pdf (using ps2pdf). The pdf file will # contain links (just like the HTML output) instead of page references # This makes the output suitable for online browsing using a pdf viewer. PDF_HYPERLINKS = NO # If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of # plain latex in the generated Makefile. Set this option to YES to get a # higher quality PDF documentation. USE_PDFLATEX = YES # If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. # command to the generated LaTeX files. This will instruct LaTeX to keep # running if errors occur, instead of asking the user for help. # This option is also used when generating formulas in HTML. LATEX_BATCHMODE = NO #--------------------------------------------------------------------------- # configuration options related to the RTF output #--------------------------------------------------------------------------- # If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output # The RTF output is optimised for Word 97 and may not look very pretty with # other RTF readers or editors. GENERATE_RTF = NO # The RTF_OUTPUT tag is used to specify where the RTF docs will be put. # If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `rtf' will be used as the default path. RTF_OUTPUT = rtf # If the COMPACT_RTF tag is set to YES Doxygen generates more compact # RTF documents. This may be useful for small projects and may help to # save some trees in general. COMPACT_RTF = NO # If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated # will contain hyperlink fields. The RTF file will # contain links (just like the HTML output) instead of page references. # This makes the output suitable for online browsing using WORD or other # programs which support those fields. # Note: wordpad (write) and others do not support links. RTF_HYPERLINKS = NO # Load stylesheet definitions from file. Syntax is similar to doxygen's # config file, i.e. a series of assigments. You only have to provide # replacements, missing definitions are set to their default value. RTF_STYLESHEET_FILE = # Set optional variables used in the generation of an rtf document. # Syntax is similar to doxygen's config file. RTF_EXTENSIONS_FILE = #--------------------------------------------------------------------------- # configuration options related to the man page output #--------------------------------------------------------------------------- # If the GENERATE_MAN tag is set to YES (the default) Doxygen will # generate man pages GENERATE_MAN = NO # The MAN_OUTPUT tag is used to specify where the man pages will be put. # If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `man' will be used as the default path. MAN_OUTPUT = man # The MAN_EXTENSION tag determines the extension that is added to # the generated man pages (default is the subroutine's section .3) MAN_EXTENSION = .3 # If the MAN_LINKS tag is set to YES and Doxygen generates man output, # then it will generate one additional man file for each entity # documented in the real man page(s). These additional files # only source the real man page, but without them the man command # would be unable to find the correct page. The default is NO. MAN_LINKS = NO #--------------------------------------------------------------------------- # configuration options related to the XML output #--------------------------------------------------------------------------- # If the GENERATE_XML tag is set to YES Doxygen will # generate an XML file that captures the structure of # the code including all documentation. Note that this # feature is still experimental and incomplete at the # moment. GENERATE_XML = NO # The XML_SCHEMA tag can be used to specify an XML schema, # which can be used by a validating XML parser to check the # syntax of the XML files. XML_SCHEMA = # The XML_DTD tag can be used to specify an XML DTD, # which can be used by a validating XML parser to check the # syntax of the XML files. XML_DTD = #--------------------------------------------------------------------------- # configuration options for the AutoGen Definitions output #--------------------------------------------------------------------------- # If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will # generate an AutoGen Definitions (see autogen.sf.net) file # that captures the structure of the code including all # documentation. Note that this feature is still experimental # and incomplete at the moment. GENERATE_AUTOGEN_DEF = NO #--------------------------------------------------------------------------- # Configuration options related to the preprocessor #--------------------------------------------------------------------------- # If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will # evaluate all C-preprocessor directives found in the sources and include # files. ENABLE_PREPROCESSING = YES # If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro # names in the source code. If set to NO (the default) only conditional # compilation will be performed. Macro expansion can be done in a controlled # way by setting EXPAND_ONLY_PREDEF to YES. MACRO_EXPANSION = NO # If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES # then the macro expansion is limited to the macros specified with the # PREDEFINED and EXPAND_AS_PREDEFINED tags. EXPAND_ONLY_PREDEF = NO # If the SEARCH_INCLUDES tag is set to YES (the default) the includes files # in the INCLUDE_PATH (see below) will be search if a #include is found. SEARCH_INCLUDES = YES # The INCLUDE_PATH tag can be used to specify one or more directories that # contain include files that are not input files but should be processed by # the preprocessor. INCLUDE_PATH = # You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard # patterns (like *.h and *.hpp) to filter out the header-files in the # directories. If left blank, the patterns specified with FILE_PATTERNS will # be used. INCLUDE_FILE_PATTERNS = # The PREDEFINED tag can be used to specify one or more macro names that # are defined before the preprocessor is started (similar to the -D option of # gcc). The argument of the tag is a list of macros of the form: name # or name=definition (no spaces). If the definition and the = are # omitted =1 is assumed. PREDEFINED = # If the MACRO_EXPANSION and EXPAND_PREDEF_ONLY tags are set to YES then # this tag can be used to specify a list of macro names that should be expanded. # The macro definition that is found in the sources will be used. # Use the PREDEFINED tag if you want to use a different macro definition. EXPAND_AS_DEFINED = # If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then # doxygen's preprocessor will remove all function-like macros that are alone # on a line, have an all uppercase name, and do not end with a semicolon. Such # function macros are typically used for boiler-plate code, and will confuse the # parser if not removed. SKIP_FUNCTION_MACROS = YES #--------------------------------------------------------------------------- # Configuration::addtions related to external references #--------------------------------------------------------------------------- # The TAGFILES tag can be used to specify one or more tagfiles. TAGFILES = # When a file name is specified after GENERATE_TAGFILE, doxygen will create # a tag file that is based on the input files it reads. GENERATE_TAGFILE = # If the ALLEXTERNALS tag is set to YES all external classes will be listed # in the class index. If set to NO only the inherited external classes # will be listed. ALLEXTERNALS = NO # If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed # in the modules index. If set to NO, only the current project's groups will # be listed. EXTERNAL_GROUPS = YES # The PERL_PATH should be the absolute path and name of the perl script # interpreter (i.e. the result of `which perl'). PERL_PATH = /usr/bin/perl #--------------------------------------------------------------------------- # Configuration options related to the dot tool #--------------------------------------------------------------------------- # If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will # generate a inheritance diagram (in Html, RTF and LaTeX) for classes with base or # super classes. Setting the tag to NO turns the diagrams off. Note that this # option is superceded by the HAVE_DOT option below. This is only a fallback. It is # recommended to install and use dot, since it yield more powerful graphs. CLASS_DIAGRAMS = YES # If set to YES, the inheritance and collaboration graphs will hide # inheritance and usage relations if the target is undocumented # or is not a class. HIDE_UNDOC_RELATIONS = YES # If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is # available from the path. This tool is part of Graphviz, a graph visualization # toolkit from AT&T and Lucent Bell Labs. The other options in this section # have no effect if this option is set to NO (the default) HAVE_DOT = NO # If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen # will generate a graph for each documented class showing the direct and # indirect inheritance relations. Setting this tag to YES will force the # the CLASS_DIAGRAMS tag to NO. CLASS_GRAPH = YES # If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen # will generate a graph for each documented class showing the direct and # indirect implementation dependencies (inheritance, containment, and # class references variables) of the class with other documented classes. COLLABORATION_GRAPH = YES # If set to YES, the inheritance and collaboration graphs will show the # relations between templates and their instances. TEMPLATE_RELATIONS = YES # If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT # tags are set to YES then doxygen will generate a graph for each documented # file showing the direct and indirect include dependencies of the file with # other documented files. INCLUDE_GRAPH = YES # If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and # HAVE_DOT tags are set to YES then doxygen will generate a graph for each # documented header file showing the documented files that directly or # indirectly include this file. INCLUDED_BY_GRAPH = YES # If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen # will graphical hierarchy of all classes instead of a textual one. GRAPHICAL_HIERARCHY = YES # The DOT_IMAGE_FORMAT tag can be used to set the image format of the images # generated by dot. Possible values are png, jpg, or gif # If left blank png will be used. DOT_IMAGE_FORMAT = png # The tag DOT_PATH can be used to specify the path where the dot tool can be # found. If left blank, it is assumed the dot tool can be found on the path. DOT_PATH = # The DOTFILE_DIRS tag can be used to specify one or more directories that # contain dot files that are included in the documentation (see the # \dotfile command). DOTFILE_DIRS = # The MAX_DOT_GRAPH_WIDTH tag can be used to set the maximum allowed width # (in pixels) of the graphs generated by dot. If a graph becomes larger than # this value, doxygen will try to truncate the graph, so that it fits within # the specified constraint. Beware that most browsers cannot cope with very # large images. MAX_DOT_GRAPH_WIDTH = 1024 # The MAX_DOT_GRAPH_HEIGHT tag can be used to set the maximum allows height # (in pixels) of the graphs generated by dot. If a graph becomes larger than # this value, doxygen will try to truncate the graph, so that it fits within # the specified constraint. Beware that most browsers cannot cope with very # large images. MAX_DOT_GRAPH_HEIGHT = 1024 # If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will # generate a legend page explaining the meaning of the various boxes and # arrows in the dot generated graphs. GENERATE_LEGEND = YES # If the DOT_CLEANUP tag is set to YES (the default) Doxygen will # remove the intermedate dot files that are used to generate # the various graphs. DOT_CLEANUP = YES #--------------------------------------------------------------------------- # Configuration::addtions related to the search engine #--------------------------------------------------------------------------- # The SEARCHENGINE tag specifies whether or not a search engine should be # used. If set to NO the values of all tags below this one will be ignored. SEARCHENGINE = NO # The CGI_NAME tag should be the name of the CGI script that # starts the search engine (doxysearch) with the correct parameters. # A script with this name will be generated by doxygen. # obsolete #CGI_NAME = search.cgi # The CGI_URL tag should be the absolute URL to the directory where the # cgi binaries are located. See the documentation of your http daemon for # details. # obsolete #CGI_URL = # The DOC_URL tag should be the absolute URL to the directory where the # documentation is located. If left blank the absolute path to the # documentation, with file:// prepended to it, will be used. # obsolete #DOC_URL = # The DOC_ABSPATH tag should be the absolute path to the directory where the # documentation is located. If left blank the directory on the local machine # will be used. # obsolete #DOC_ABSPATH = # The BIN_ABSPATH tag must point to the directory where the doxysearch binary # is installed. # obsolete #BIN_ABSPATH = /usr/local/bin/ # The EXT_DOC_PATHS tag can be used to specify one or more paths to # documentation generated for other projects. This allows doxysearch to search # the documentation for these projects as well. # obsolete #EXT_DOC_PATHS = xplc-0.3.13/INSTALL0100644000204300020430000000030207451175140013763 0ustar pphaneufpphaneufXPLC Installation ================= Quick Start ----------- - ./configure - make - make tests (optional) - make install You might have to use "ldconfig" to finish setting up the system. xplc-0.3.13/LICENSE0100644000204300020430000006347607307551774013777 0ustar pphaneufpphaneuf GNU LESSER GENERAL PUBLIC LICENSE Version 2.1, February 1999 Copyright (C) 1991, 1999 Free Software Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. [This is the first released version of the Lesser GPL. It also counts as the successor of the GNU Library Public License, version 2, hence the version number 2.1.] Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public Licenses are intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This license, the Lesser General Public License, applies to some specially designated software packages--typically libraries--of the Free Software Foundation and other authors who decide to use it. You can use it too, but we suggest you first think carefully about whether this license or the ordinary General Public License is the better strategy to use in any particular case, based on the explanations below. When we speak of free software, we are referring to freedom of use, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish); that you receive source code or can get it if you want it; that you can change the software and use pieces of it in new free programs; and that you are informed that you can do these things. To protect your rights, we need to make restrictions that forbid distributors to deny you these rights or to ask you to surrender these rights. These restrictions translate to certain responsibilities for you if you distribute copies of the library or if you modify it. For example, if you distribute copies of the library, whether gratis or for a fee, you must give the recipients all the rights that we gave you. You must make sure that they, too, receive or can get the source code. If you link other code with the library, you must provide complete object files to the recipients, so that they can relink them with the library after making changes to the library and recompiling it. And you must show them these terms so they know their rights. We protect your rights with a two-step method: (1) we copyright the library, and (2) we offer you this license, which gives you legal permission to copy, distribute and/or modify the library. To protect each distributor, we want to make it very clear that there is no warranty for the free library. Also, if the library is modified by someone else and passed on, the recipients should know that what they have is not the original version, so that the original author's reputation will not be affected by problems that might be introduced by others. Finally, software patents pose a constant threat to the existence of any free program. We wish to make sure that a company cannot effectively restrict the users of a free program by obtaining a restrictive license from a patent holder. Therefore, we insist that any patent license obtained for a version of the library must be consistent with the full freedom of use specified in this license. Most GNU software, including some libraries, is covered by the ordinary GNU General Public License. This license, the GNU Lesser General Public License, applies to certain designated libraries, and is quite different from the ordinary General Public License. We use this license for certain libraries in order to permit linking those libraries into non-free programs. When a program is linked with a library, whether statically or using a shared library, the combination of the two is legally speaking a combined work, a derivative of the original library. The ordinary General Public License therefore permits such linking only if the entire combination fits its criteria of freedom. The Lesser General Public License permits more lax criteria for linking other code with the library. We call this license the "Lesser" General Public License because it does Less to protect the user's freedom than the ordinary General Public License. It also provides other free software developers Less of an advantage over competing non-free programs. These disadvantages are the reason we use the ordinary General Public License for many libraries. However, the Lesser license provides advantages in certain special circumstances. For example, on rare occasions, there may be a special need to encourage the widest possible use of a certain library, so that it becomes a de-facto standard. To achieve this, non-free programs must be allowed to use the library. A more frequent case is that a free library does the same job as widely used non-free libraries. In this case, there is little to gain by limiting the free library to free software only, so we use the Lesser General Public License. In other cases, permission to use a particular library in non-free programs enables a greater number of people to use a large body of free software. For example, permission to use the GNU C Library in non-free programs enables many more people to use the whole GNU operating system, as well as its variant, the GNU/Linux operating system. Although the Lesser General Public License is Less protective of the users' freedom, it does ensure that the user of a program that is linked with the Library has the freedom and the wherewithal to run that program using a modified version of the Library. The precise terms and conditions for copying, distribution and modification follow. Pay close attention to the difference between a "work based on the library" and a "work that uses the library". The former contains code derived from the library, whereas the latter must be combined with the library in order to run. GNU LESSER GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License Agreement applies to any software library or other program which contains a notice placed by the copyright holder or other authorized party saying it may be distributed under the terms of this Lesser General Public License (also called "this License"). Each licensee is addressed as "you". A "library" means a collection of software functions and/or data prepared so as to be conveniently linked with application programs (which use some of those functions and data) to form executables. The "Library", below, refers to any such software library or work which has been distributed under these terms. A "work based on the Library" means either the Library or any derivative work under copyright law: that is to say, a work containing the Library or a portion of it, either verbatim or with modifications and/or translated straightforwardly into another language. (Hereinafter, translation is included without limitation in the term "modification".) "Source code" for a work means the preferred form of the work for making modifications to it. For a library, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the library. Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running a program using the Library is not restricted, and output from such a program is covered only if its contents constitute a work based on the Library (independent of the use of the Library in a tool for writing it). Whether that is true depends on what the Library does and what the program that uses the Library does. 1. You may copy and distribute verbatim copies of the Library's complete source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and distribute a copy of this License along with the Library. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Library or any portion of it, thus forming a work based on the Library, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) The modified work must itself be a software library. b) You must cause the files modified to carry prominent notices stating that you changed the files and the date of any change. c) You must cause the whole of the work to be licensed at no charge to all third parties under the terms of this License. d) If a facility in the modified Library refers to a function or a table of data to be supplied by an application program that uses the facility, other than as an argument passed when the facility is invoked, then you must make a good faith effort to ensure that, in the event an application does not supply such function or table, the facility still operates, and performs whatever part of its purpose remains meaningful. (For example, a function in a library to compute square roots has a purpose that is entirely well-defined independent of the application. Therefore, Subsection 2d requires that any application-supplied function or table used by this function must be optional: if the application does not supply it, the square root function must still compute square roots.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Library, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Library, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Library. In addition, mere aggregation of another work not based on the Library with the Library (or with a work based on the Library) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may opt to apply the terms of the ordinary GNU General Public License instead of this License to a given copy of the Library. To do this, you must alter all the notices that refer to this License, so that they refer to the ordinary GNU General Public License, version 2, instead of to this License. (If a newer version than version 2 of the ordinary GNU General Public License has appeared, then you can specify that version instead if you wish.) Do not make any other change in these notices. Once this change is made in a given copy, it is irreversible for that copy, so the ordinary GNU General Public License applies to all subsequent copies and derivative works made from that copy. This option is useful when you wish to copy part of the code of the Library into a program that is not a library. 4. You may copy and distribute the Library (or a portion or derivative of it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange. If distribution of object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place satisfies the requirement to distribute the source code, even though third parties are not compelled to copy the source along with the object code. 5. A program that contains no derivative of any portion of the Library, but is designed to work with the Library by being compiled or linked with it, is called a "work that uses the Library". Such a work, in isolation, is not a derivative work of the Library, and therefore falls outside the scope of this License. However, linking a "work that uses the Library" with the Library creates an executable that is a derivative of the Library (because it contains portions of the Library), rather than a "work that uses the library". The executable is therefore covered by this License. Section 6 states terms for distribution of such executables. When a "work that uses the Library" uses material from a header file that is part of the Library, the object code for the work may be a derivative work of the Library even though the source code is not. Whether this is true is especially significant if the work can be linked without the Library, or if the work is itself a library. The threshold for this to be true is not precisely defined by law. If such an object file uses only numerical parameters, data structure layouts and accessors, and small macros and small inline functions (ten lines or less in length), then the use of the object file is unrestricted, regardless of whether it is legally a derivative work. (Executables containing this object code plus portions of the Library will still fall under Section 6.) Otherwise, if the work is a derivative of the Library, you may distribute the object code for the work under the terms of Section 6. Any executables containing that work also fall under Section 6, whether or not they are linked directly with the Library itself. 6. As an exception to the Sections above, you may also combine or link a "work that uses the Library" with the Library to produce a work containing portions of the Library, and distribute that work under terms of your choice, provided that the terms permit modification of the work for the customer's own use and reverse engineering for debugging such modifications. You must give prominent notice with each copy of the work that the Library is used in it and that the Library and its use are covered by this License. You must supply a copy of this License. If the work during execution displays copyright notices, you must include the copyright notice for the Library among them, as well as a reference directing the user to the copy of this License. Also, you must do one of these things: a) Accompany the work with the complete corresponding machine-readable source code for the Library including whatever changes were used in the work (which must be distributed under Sections 1 and 2 above); and, if the work is an executable linked with the Library, with the complete machine-readable "work that uses the Library", as object code and/or source code, so that the user can modify the Library and then relink to produce a modified executable containing the modified Library. (It is understood that the user who changes the contents of definitions files in the Library will not necessarily be able to recompile the application to use the modified definitions.) b) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (1) uses at run time a copy of the library already present on the user's computer system, rather than copying library functions into the executable, and (2) will operate properly with a modified version of the library, if the user installs one, as long as the modified version is interface-compatible with the version that the work was made with. c) Accompany the work with a written offer, valid for at least three years, to give the same user the materials specified in Subsection 6a, above, for a charge no more than the cost of performing this distribution. d) If distribution of the work is made by offering access to copy from a designated place, offer equivalent access to copy the above specified materials from the same place. e) Verify that the user has already received a copy of these materials or that you have already sent this user a copy. For an executable, the required form of the "work that uses the Library" must include any data and utility programs needed for reproducing the executable from it. However, as a special exception, the materials to be distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. It may happen that this requirement contradicts the license restrictions of other proprietary libraries that do not normally accompany the operating system. Such a contradiction means you cannot use both them and the Library together in an executable that you distribute. 7. You may place library facilities that are a work based on the Library side-by-side in a single library together with other library facilities not covered by this License, and distribute such a combined library, provided that the separate distribution of the work based on the Library and of the other library facilities is otherwise permitted, and provided that you do these two things: a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities. This must be distributed under the terms of the Sections above. b) Give prominent notice with the combined library of the fact that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work. 8. You may not copy, modify, sublicense, link with, or distribute the Library except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, link with, or distribute the Library is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 9. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Library or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Library (or any work based on the Library), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Library or works based on it. 10. Each time you redistribute the Library (or any work based on the Library), the recipient automatically receives a license from the original licensor to copy, distribute, link with or modify the Library subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties with this License. 11. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Library at all. For example, if a patent license would not permit royalty-free redistribution of the Library by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Library. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply, and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 12. If the distribution and/or use of the Library is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Library under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 13. The Free Software Foundation may publish revised and/or new versions of the Lesser General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Library specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Library does not specify a license version number, you may choose any version ever published by the Free Software Foundation. 14. If you wish to incorporate parts of the Library into other free programs whose distribution conditions are incompatible with these, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Libraries If you develop a new library, and you want it to be of the greatest possible use to the public, we recommend making it free software that everyone can redistribute and change. You can do so by permitting redistribution under these terms (or, alternatively, under the terms of the ordinary General Public License). To apply these terms, attach the following notices to the library. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Also add information on how to contact you by electronic and paper mail. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the library, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the library `Frob' (a library for tweaking knobs) written by James Random Hacker. , 1 April 1990 Ty Coon, President of Vice That's all there is to it! xplc-0.3.13/Makefile0100644000204300020430000000236610267276111014405 0ustar pphaneufpphaneuf# XPLC - Cross-Platform Lightweight Components # Copyright (C) 2000, Pierre Phaneuf # Copyright (C) 2002-2004, Net Integration Technologies, Inc. # # This library is free software; you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as # published by the Free Software Foundation; either version 2.1 of the # License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 # USA # # $Id: Makefile,v 1.14 2005/07/06 18:11:15 sfllaw Exp $ .PHONY: default default: -include config/config.mk CLEAN+=$(wildcard libxplc*.a libxplc.so.* doxygen) DISTCLEAN+=config.cache config.log config.status dist/xplc.pc dist/xplc-uninstalled.pc xplc-uninstalled.pc REALCLEAN+=configure README xplc.spec PATH:=$(PWD)/dist:$(PATH) include $(wildcard */vars.mk) include $(wildcard */rules.mk) xplc-0.3.13/NEWS0100644000204300020430000001540410331523105013427 0ustar pphaneufpphaneufNew in 0.3.13 ------------- * Added a uuidgen program. * Suppress warnings in GCC 4. * Put headers in a versioned location. * Fixed building of XPLC on FreeBSD. New in 0.3.12 ------------- * Additional work done on the category system. * Improved the module loader. New in 0.3.11 ------------- * Fixed an AMD64 portability issue (possibly affected other 64 bit systems). * Improved the test framework. * Improved the Debian package. New in 0.3.10 ------------- * Made it easy to install multiple versions of XPLC in parallel. * Fixed compilation problems with Darwin/Mac OS X. * Fixed a problem with Debian package uninstallation. * Simon Law took over maintenance of the Debian package. New in 0.3.9 ------------ * Fixed a compile problem in the "illegal delete detector". New in 0.3.8 ------------ * Refactored the module loading mechanism, sharing more code and making it simpler to use. * Fixed some bugs in the unit tests. * Improved the examples a bit to make lifting of code easier. New in 0.3.7 ------------ * Some example code to show the basic use of XPLC. * Added an addModuleDirectory method to the XPLC helper class. * Added missing Doxygen documentation. New in 0.3.6 ------------ * Added a clause to the license on the C++ bindings, to allow closed-source programs and libraries to use the XPLC C++ bindings. * Build XPLC as a DLL on Windows, and put the C++ bindings in a separate statically linked library, as on Unix. * Fixed some interaction between xplc_ptr and the "illegal delete detector". * Fixed an issue when building XPLC with GCC 3.4. New in 0.3.5 ------------ * Rewrote and finished the xplc_ptr smart pointer templated class. * Mostly implemented component categories (missing IFactory behavior). * Fixed a few details in the pkg-config support. * Updated the README. New in 0.3.4 ------------ * Added an "illegal delete detector". * Added support for pkg-config. * Re-enabled support for dyld on Mac OS X/Darwin. * Avoid leaking autoconf headers in the installed headers. New in 0.3.3 ------------ * Major improvements to the Win32 port, including compatibility with windows.h. * Continuing work on the module loader subsystem. New in 0.3.2 ------------ * Made the UUID structure compatible with the one in Windows. * Improved the Doxygen documentation. * Changed the way loadable modules are defined. * Moved the generic factory to the C++ binding, making it feel more natural to use in C++ in the process. * Replaced the GenericComponent macro with a more efficient and easier to use IMPLEMENT_IOBJECT macro. * Fixed a leak when using weak reference. New in 0.3.1 ------------ * Added a good deal of Doxygen documentation. * Fixed a bug where some symbols where missing from libxplc.so. * Added a Debian package setup. * Restricted exported symbols, made libxplc.so resistant to changes in libxplc-cxx.a. * Various optimizations to decrease the size of libxplc.so. * Fixed build system for Visual C++.NET. * Started the category support. * Improved testing suite. New in 0.3.0 ------------ * Added weak references and appropriate tests. * Improved GenericComponent to handle weak reference support automatically. * The XPLC helper class can now create objects directly from a moniker. * Fixed a problem in the RPM package. New in 0.1.7 ------------ * We now support the dyld found on Mac OS X/Darwin. * Optimized IID storage for space and time as best as humanly possible and usable. * Enabled generation of position-independent code (allows for more sharing between processes, but is almost 20% bigger, can be disabled). * Added an XPLC helper class, that provides shortcuts to many often used operations and also takes care of proper lifetime of the service manager reference. * Some bugs fixed. New in 0.1.6 ------------ * Added a (still experimental) smart pointer templated class. * Fixed a large number of leaks, thanks to Valgrind. * Simplified building on Windows. * Added support for number of new platforms. * Switched to autoconf 2.5x. * Added support for building without dynamic loading support. * Code cleanups. * Improved Standard C++ correctness. * Created a new libxplc-cxx.a library that contains the code for the C++ bindings. * Added a "create" templated helper function to create instances of components quickly and easily. * Improved GenericComponent to also automate getInterface implementation. * Added a Perl script to convert the output of "uuidgen" to a C definition. * Improved the dependencies generation (now compatible with gcc 3). * Fixed various small bugs and warnings. New in 0.1.5 ------------ * Added an RPM package spec file. * Improved general portability. * Fixed the Win32 port and added Visual Studio 2002 project files. New in 0.1.4 ------------ * Added the long awaited module loader, that will load modules from a given directory. * Combined the unit tests into a single binary. * Fixed a number of bugs, including a number of memory leaks found using Valgrind. * Various evolutive reorganizations and clarifications. * Added support for FreeBSD. New in 0.1.3 ------------ * Added a way to mark unstable interfaces as such, so that you cannot accidentally use an unstable interface (there is a 'configure' switch to allow unstable interfaces, and unstable releases of XPLC have it enabled by default). * Added an "uninstall" make target. * Renamed the static library libxplc.a and added a libxplc_s.a symbolic link pointing to it. * Added a platform-independent dlopen/LoadLibrary abstraction. * Changed the simple dynamic loader so that it does not require a different binary interface from modules. * Started laying down a binary interface for modules. * Improved testing suite. New in 0.1.2 ------------ * Added a moniker interface and resolving service. * Added a "new" moniker that creates an instance from a factory moniker. * Changed the "getInterface" and "mutateInterface" templated functions name to "get" and "mutate", respectively. * Fixed a bug where the static service handler would hold a reference to itself and never release it. * Added a template mix-in that traces addRef/release calls. * Added methods to convert UUID to/from strings. * Improved the testing suite to catch more errors. * Added developer-specific debugging hooks. New in 0.1.1 ------------ * Added the missing test for the generic component template. * Automated some of the release work. * Added 'configure' switches for a number of compiler behaviors. * The simple dynamic loader does not append the platform-specific extension for shared objects anymore. * Added addFirstHandler and addLastHandler methods to the IServiceManager interface (bug #431200). * Enabled more warnings and fixed them. * Bug fixes. xplc-0.3.13/TODO0100644000204300020430000000132407755333570013441 0ustar pphaneufpphaneuf These are what we need before we do a milestone release, meaning that the first part is what is currently what is being worked on, and the release number is the one that will have these features. Of course, this is subject to revision! * 0.5.0 - some documentation - examples - add an autoconf test for linker version script - categories - proper module meta-info - fix dynamic loading on Mac OS X - (proper) dynamic loading on Mac OS X (dlopen-style) * 0.7.0 - IDL compiler - cache module meta-info * 0.9.0 - BSD port - Mac OS X package - Windows package * 1.0.0 - fix dlerror() leak (impossible?) * future - event loop component - stream component - proplist component - XFree86 module loader xplc-0.3.13/config.guess0100755000204300020430000012546610331515666015277 0ustar pphaneufpphaneuf#! /bin/sh # Attempt to guess a canonical system name. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. timestamp='2005-04-22' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Originally written by Per Bothner . # Please send patches to . Submit a context # diff and a properly formatted ChangeLog entry. # # This script attempts to guess a canonical system name similar to # config.sub. If it succeeds, it prints the system name on stdout, and # exits with 0. Otherwise, it exits with 1. # # The plan is that this can be called by configure scripts if you # don't specify an explicit build system type. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] Output the configuration name of the system \`$me' is run on. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit 0 ;; --version | -v ) echo "$version" ; exit 0 ;; --help | --h* | -h ) echo "$usage"; exit 0 ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" >&2 exit 1 ;; * ) break ;; esac done if test $# != 0; then echo "$me: too many arguments$help" >&2 exit 1 fi trap 'exit 1' 1 2 15 # CC_FOR_BUILD -- compiler used by this script. Note that the use of a # compiler to aid in system detection is discouraged as it requires # temporary files to be created and, as you can see below, it is a # headache to deal with in a portable fashion. # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still # use `HOST_CC' if defined, but it is deprecated. # Portable tmp directory creation inspired by the Autoconf team. set_cc_for_build=' trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; : ${TMPDIR=/tmp} ; { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; dummy=$tmp/dummy ; tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; case $CC_FOR_BUILD,$HOST_CC,$CC in ,,) echo "int x;" > $dummy.c ; for c in cc gcc c89 c99 ; do if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then CC_FOR_BUILD="$c"; break ; fi ; done ; if test x"$CC_FOR_BUILD" = x ; then CC_FOR_BUILD=no_compiler_found ; fi ;; ,,*) CC_FOR_BUILD=$CC ;; ,*,*) CC_FOR_BUILD=$HOST_CC ;; esac ;' # This is needed to find uname on a Pyramid OSx when run in the BSD universe. # (ghazi@noc.rutgers.edu 1994-08-24) if (test -f /.attbin/uname) >/dev/null 2>&1 ; then PATH=$PATH:/.attbin ; export PATH fi UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown # Note: order is significant - the case branches are not exclusive. case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in *:NetBSD:*:*) # NetBSD (nbsd) targets should (where applicable) match one or # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently # switched to ELF, *-*-netbsd* would select the old # object file format. This provides both forward # compatibility and a consistent mechanism for selecting the # object file format. # # Note: NetBSD doesn't particularly care about the vendor # portion of the name. We always set it to "unknown". sysctl="sysctl -n hw.machine_arch" UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ /usr/sbin/$sysctl 2>/dev/null || echo unknown)` case "${UNAME_MACHINE_ARCH}" in armeb) machine=armeb-unknown ;; arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; sh3eb) machine=sh-unknown ;; *) machine=${UNAME_MACHINE_ARCH}-unknown ;; esac # The Operating System including object format, if it has switched # to ELF recently, or will in the future. case "${UNAME_MACHINE_ARCH}" in arm*|i386|m68k|ns32k|sh3*|sparc|vax) eval $set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep __ELF__ >/dev/null then # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). # Return netbsd for either. FIX? os=netbsd else os=netbsdelf fi ;; *) os=netbsd ;; esac # The OS release # Debian GNU/NetBSD machines have a different userland, and # thus, need a distinct triplet. However, they do not need # kernel version information, so it can be replaced with a # suitable tag, in the style of linux-gnu. case "${UNAME_VERSION}" in Debian*) release='-gnu' ;; *) release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` ;; esac # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. echo "${machine}-${os}${release}" exit 0 ;; amd64:OpenBSD:*:*) echo x86_64-unknown-openbsd${UNAME_RELEASE} exit 0 ;; amiga:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; cats:OpenBSD:*:*) echo arm-unknown-openbsd${UNAME_RELEASE} exit 0 ;; hp300:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; luna88k:OpenBSD:*:*) echo m88k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; mac68k:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; macppc:OpenBSD:*:*) echo powerpc-unknown-openbsd${UNAME_RELEASE} exit 0 ;; mvme68k:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; mvme88k:OpenBSD:*:*) echo m88k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; mvmeppc:OpenBSD:*:*) echo powerpc-unknown-openbsd${UNAME_RELEASE} exit 0 ;; sgi:OpenBSD:*:*) echo mips64-unknown-openbsd${UNAME_RELEASE} exit 0 ;; sun3:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; *:OpenBSD:*:*) echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE} exit 0 ;; *:ekkoBSD:*:*) echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} exit 0 ;; macppc:MirBSD:*:*) echo powerppc-unknown-mirbsd${UNAME_RELEASE} exit 0 ;; *:MirBSD:*:*) echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} exit 0 ;; alpha:OSF1:*:*) case $UNAME_RELEASE in *4.0) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` ;; *5.*) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` ;; esac # According to Compaq, /usr/sbin/psrinfo has been available on # OSF/1 and Tru64 systems produced since 1995. I hope that # covers most systems running today. This code pipes the CPU # types through head -n 1, so we only detect the type of CPU 0. ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` case "$ALPHA_CPU_TYPE" in "EV4 (21064)") UNAME_MACHINE="alpha" ;; "EV4.5 (21064)") UNAME_MACHINE="alpha" ;; "LCA4 (21066/21068)") UNAME_MACHINE="alpha" ;; "EV5 (21164)") UNAME_MACHINE="alphaev5" ;; "EV5.6 (21164A)") UNAME_MACHINE="alphaev56" ;; "EV5.6 (21164PC)") UNAME_MACHINE="alphapca56" ;; "EV5.7 (21164PC)") UNAME_MACHINE="alphapca57" ;; "EV6 (21264)") UNAME_MACHINE="alphaev6" ;; "EV6.7 (21264A)") UNAME_MACHINE="alphaev67" ;; "EV6.8CB (21264C)") UNAME_MACHINE="alphaev68" ;; "EV6.8AL (21264B)") UNAME_MACHINE="alphaev68" ;; "EV6.8CX (21264D)") UNAME_MACHINE="alphaev68" ;; "EV6.9A (21264/EV69A)") UNAME_MACHINE="alphaev69" ;; "EV7 (21364)") UNAME_MACHINE="alphaev7" ;; "EV7.9 (21364A)") UNAME_MACHINE="alphaev79" ;; esac # A Pn.n version is a patched version. # A Vn.n version is a released version. # A Tn.n version is a released field test version. # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` exit 0 ;; Alpha\ *:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # Should we change UNAME_MACHINE based on the output of uname instead # of the specific Alpha model? echo alpha-pc-interix exit 0 ;; 21064:Windows_NT:50:3) echo alpha-dec-winnt3.5 exit 0 ;; Amiga*:UNIX_System_V:4.0:*) echo m68k-unknown-sysv4 exit 0;; *:[Aa]miga[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-amigaos exit 0 ;; *:[Mm]orph[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-morphos exit 0 ;; *:OS/390:*:*) echo i370-ibm-openedition exit 0 ;; *:z/VM:*:*) echo s390-ibm-zvmoe exit 0 ;; *:OS400:*:*) echo powerpc-ibm-os400 exit 0 ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} exit 0;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) echo hppa1.1-hitachi-hiuxmpp exit 0;; Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. if test "`(/bin/universe) 2>/dev/null`" = att ; then echo pyramid-pyramid-sysv3 else echo pyramid-pyramid-bsd fi exit 0 ;; NILE*:*:*:dcosx) echo pyramid-pyramid-svr4 exit 0 ;; DRS?6000:unix:4.0:6*) echo sparc-icl-nx6 exit 0 ;; DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) case `/usr/bin/uname -p` in sparc) echo sparc-icl-nx7 && exit 0 ;; esac ;; sun4H:SunOS:5.*:*) echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit 0 ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit 0 ;; i86pc:SunOS:5.*:*) echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit 0 ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize # SunOS6. Hard to guess exactly what SunOS6 will be like, but # it's likely to be more like Solaris than SunOS4. echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit 0 ;; sun4*:SunOS:*:*) case "`/usr/bin/arch -k`" in Series*|S4*) UNAME_RELEASE=`uname -v` ;; esac # Japanese Language versions have a version number like `4.1.3-JL'. echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` exit 0 ;; sun3*:SunOS:*:*) echo m68k-sun-sunos${UNAME_RELEASE} exit 0 ;; sun*:*:4.2BSD:*) UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 case "`/bin/arch`" in sun3) echo m68k-sun-sunos${UNAME_RELEASE} ;; sun4) echo sparc-sun-sunos${UNAME_RELEASE} ;; esac exit 0 ;; aushp:SunOS:*:*) echo sparc-auspex-sunos${UNAME_RELEASE} exit 0 ;; # The situation for MiNT is a little confusing. The machine name # can be virtually everything (everything which is not # "atarist" or "atariste" at least should have a processor # > m68000). The system name ranges from "MiNT" over "FreeMiNT" # to the lowercase version "mint" (or "freemint"). Finally # the system name "TOS" denotes a system which is actually not # MiNT. But MiNT is downward compatible to TOS, so this should # be no problem. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit 0 ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit 0 ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit 0 ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) echo m68k-milan-mint${UNAME_RELEASE} exit 0 ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) echo m68k-hades-mint${UNAME_RELEASE} exit 0 ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) echo m68k-unknown-mint${UNAME_RELEASE} exit 0 ;; m68k:machten:*:*) echo m68k-apple-machten${UNAME_RELEASE} exit 0 ;; powerpc:machten:*:*) echo powerpc-apple-machten${UNAME_RELEASE} exit 0 ;; RISC*:Mach:*:*) echo mips-dec-mach_bsd4.3 exit 0 ;; RISC*:ULTRIX:*:*) echo mips-dec-ultrix${UNAME_RELEASE} exit 0 ;; VAX*:ULTRIX*:*:*) echo vax-dec-ultrix${UNAME_RELEASE} exit 0 ;; 2020:CLIX:*:* | 2430:CLIX:*:*) echo clipper-intergraph-clix${UNAME_RELEASE} exit 0 ;; mips:*:*:UMIPS | mips:*:*:RISCos) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #ifdef __cplusplus #include /* for printf() prototype */ int main (int argc, char *argv[]) { #else int main (argc, argv) int argc; char *argv[]; { #endif #if defined (host_mips) && defined (MIPSEB) #if defined (SYSTYPE_SYSV) printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_SVR4) printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); #endif #endif exit (-1); } EOF $CC_FOR_BUILD -o $dummy $dummy.c \ && $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ && exit 0 echo mips-mips-riscos${UNAME_RELEASE} exit 0 ;; Motorola:PowerMAX_OS:*:*) echo powerpc-motorola-powermax exit 0 ;; Motorola:*:4.3:PL8-*) echo powerpc-harris-powermax exit 0 ;; Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) echo powerpc-harris-powermax exit 0 ;; Night_Hawk:Power_UNIX:*:*) echo powerpc-harris-powerunix exit 0 ;; m88k:CX/UX:7*:*) echo m88k-harris-cxux7 exit 0 ;; m88k:*:4*:R4*) echo m88k-motorola-sysv4 exit 0 ;; m88k:*:3*:R3*) echo m88k-motorola-sysv3 exit 0 ;; AViiON:dgux:*:*) # DG/UX returns AViiON for all architectures UNAME_PROCESSOR=`/usr/bin/uname -p` if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] then if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ [ ${TARGET_BINARY_INTERFACE}x = x ] then echo m88k-dg-dgux${UNAME_RELEASE} else echo m88k-dg-dguxbcs${UNAME_RELEASE} fi else echo i586-dg-dgux${UNAME_RELEASE} fi exit 0 ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) echo m88k-dolphin-sysv3 exit 0 ;; M88*:*:R3*:*) # Delta 88k system running SVR3 echo m88k-motorola-sysv3 exit 0 ;; XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) echo m88k-tektronix-sysv3 exit 0 ;; Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) echo m68k-tektronix-bsd exit 0 ;; *:IRIX*:*:*) echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` exit 0 ;; ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX ' i*86:AIX:*:*) echo i386-ibm-aix exit 0 ;; ia64:AIX:*:*) if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} exit 0 ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include main() { if (!__power_pc()) exit(1); puts("powerpc-ibm-aix3.2.5"); exit(0); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0 echo rs6000-ibm-aix3.2.5 elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then echo rs6000-ibm-aix3.2.4 else echo rs6000-ibm-aix3.2 fi exit 0 ;; *:AIX:*:[45]) IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then IBM_ARCH=rs6000 else IBM_ARCH=powerpc fi if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${IBM_ARCH}-ibm-aix${IBM_REV} exit 0 ;; *:AIX:*:*) echo rs6000-ibm-aix exit 0 ;; ibmrt:4.4BSD:*|romp-ibm:BSD:*) echo romp-ibm-bsd4.4 exit 0 ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to exit 0 ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) echo rs6000-bull-bosx exit 0 ;; DPX/2?00:B.O.S.:*:*) echo m68k-bull-sysv3 exit 0 ;; 9000/[34]??:4.3bsd:1.*:*) echo m68k-hp-bsd exit 0 ;; hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) echo m68k-hp-bsd4.4 exit 0 ;; 9000/[34678]??:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` case "${UNAME_MACHINE}" in 9000/31? ) HP_ARCH=m68000 ;; 9000/[34]?? ) HP_ARCH=m68k ;; 9000/[678][0-9][0-9]) if [ -x /usr/bin/getconf ]; then sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` case "${sc_cpu_version}" in 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 532) # CPU_PA_RISC2_0 case "${sc_kernel_bits}" in 32) HP_ARCH="hppa2.0n" ;; 64) HP_ARCH="hppa2.0w" ;; '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 esac ;; esac fi if [ "${HP_ARCH}" = "" ]; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #define _HPUX_SOURCE #include #include int main () { #if defined(_SC_KERNEL_BITS) long bits = sysconf(_SC_KERNEL_BITS); #endif long cpu = sysconf (_SC_CPU_VERSION); switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0"); break; case CPU_PA_RISC1_1: puts ("hppa1.1"); break; case CPU_PA_RISC2_0: #if defined(_SC_KERNEL_BITS) switch (bits) { case 64: puts ("hppa2.0w"); break; case 32: puts ("hppa2.0n"); break; default: puts ("hppa2.0"); break; } break; #else /* !defined(_SC_KERNEL_BITS) */ puts ("hppa2.0"); break; #endif default: puts ("hppa1.0"); break; } exit (0); } EOF (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` test -z "$HP_ARCH" && HP_ARCH=hppa fi ;; esac if [ ${HP_ARCH} = "hppa2.0w" ] then # avoid double evaluation of $set_cc_for_build test -n "$CC_FOR_BUILD" || eval $set_cc_for_build if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E -) | grep __LP64__ >/dev/null then HP_ARCH="hppa2.0w" else HP_ARCH="hppa64" fi fi echo ${HP_ARCH}-hp-hpux${HPUX_REV} exit 0 ;; ia64:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` echo ia64-hp-hpux${HPUX_REV} exit 0 ;; 3050*:HI-UX:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include int main () { long cpu = sysconf (_SC_CPU_VERSION); /* The order matters, because CPU_IS_HP_MC68K erroneously returns true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct results, however. */ if (CPU_IS_PA_RISC (cpu)) { switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; default: puts ("hppa-hitachi-hiuxwe2"); break; } } else if (CPU_IS_HP_MC68K (cpu)) puts ("m68k-hitachi-hiuxwe2"); else puts ("unknown-hitachi-hiuxwe2"); exit (0); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0 echo unknown-hitachi-hiuxwe2 exit 0 ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) echo hppa1.1-hp-bsd exit 0 ;; 9000/8??:4.3bsd:*:*) echo hppa1.0-hp-bsd exit 0 ;; *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) echo hppa1.0-hp-mpeix exit 0 ;; hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) echo hppa1.1-hp-osf exit 0 ;; hp8??:OSF1:*:*) echo hppa1.0-hp-osf exit 0 ;; i*86:OSF1:*:*) if [ -x /usr/sbin/sysversion ] ; then echo ${UNAME_MACHINE}-unknown-osf1mk else echo ${UNAME_MACHINE}-unknown-osf1 fi exit 0 ;; parisc*:Lites*:*:*) echo hppa1.1-hp-lites exit 0 ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) echo c1-convex-bsd exit 0 ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit 0 ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) echo c34-convex-bsd exit 0 ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) echo c38-convex-bsd exit 0 ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) echo c4-convex-bsd exit 0 ;; CRAY*Y-MP:*:*:*) echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; CRAY*[A-Z]90:*:*:*) echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ -e 's/\.[^.]*$/.X/' exit 0 ;; CRAY*TS:*:*:*) echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; CRAY*T3E:*:*:*) echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; CRAY*SV1:*:*:*) echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; *:UNICOS/mp:*:*) echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit 0 ;; 5000:UNIX_System_V:4.*:*) FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit 0 ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} exit 0 ;; sparc*:BSD/OS:*:*) echo sparc-unknown-bsdi${UNAME_RELEASE} exit 0 ;; *:BSD/OS:*:*) echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit 0 ;; *:FreeBSD:*:*) echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` exit 0 ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin exit 0 ;; i*:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit 0 ;; i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 exit 0 ;; x86:Interix*:[34]*) echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//' exit 0 ;; [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) echo i${UNAME_MACHINE}-pc-mks exit 0 ;; i*:Windows_NT*:* | Pentium*:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we # UNAME_MACHINE based on the output of uname instead of i386? echo i586-pc-interix exit 0 ;; i*:UWIN*:*) echo ${UNAME_MACHINE}-pc-uwin exit 0 ;; amd64:CYGWIN*:*:*) echo x86_64-unknown-cygwin exit 0 ;; p*:CYGWIN*:*) echo powerpcle-unknown-cygwin exit 0 ;; prep*:SunOS:5.*:*) echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit 0 ;; *:GNU:*:*) # the GNU system echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` exit 0 ;; *:GNU/*:*:*) # other systems with GNU libc and userland echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu exit 0 ;; i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix exit 0 ;; arm*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; cris:Linux:*:*) echo cris-axis-linux-gnu exit 0 ;; crisv32:Linux:*:*) echo crisv32-axis-linux-gnu exit 0 ;; frv:Linux:*:*) echo frv-unknown-linux-gnu exit 0 ;; ia64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; m32r*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; m68*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; mips:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #undef CPU #undef mips #undef mipsel #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) CPU=mipsel #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) CPU=mips #else CPU= #endif #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0 ;; mips64:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #undef CPU #undef mips64 #undef mips64el #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) CPU=mips64el #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) CPU=mips64 #else CPU= #endif #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0 ;; ppc:Linux:*:*) echo powerpc-unknown-linux-gnu exit 0 ;; ppc64:Linux:*:*) echo powerpc64-unknown-linux-gnu exit 0 ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in EV5) UNAME_MACHINE=alphaev5 ;; EV56) UNAME_MACHINE=alphaev56 ;; PCA56) UNAME_MACHINE=alphapca56 ;; PCA57) UNAME_MACHINE=alphapca56 ;; EV6) UNAME_MACHINE=alphaev6 ;; EV67) UNAME_MACHINE=alphaev67 ;; EV68*) UNAME_MACHINE=alphaev68 ;; esac objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} exit 0 ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in PA7*) echo hppa1.1-unknown-linux-gnu ;; PA8*) echo hppa2.0-unknown-linux-gnu ;; *) echo hppa-unknown-linux-gnu ;; esac exit 0 ;; parisc64:Linux:*:* | hppa64:Linux:*:*) echo hppa64-unknown-linux-gnu exit 0 ;; s390:Linux:*:* | s390x:Linux:*:*) echo ${UNAME_MACHINE}-ibm-linux exit 0 ;; sh64*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; sh*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; sparc:Linux:*:* | sparc64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; x86_64:Linux:*:*) echo x86_64-unknown-linux-gnu exit 0 ;; i*86:Linux:*:*) # The BFD linker knows what the default object file format is, so # first see if it will tell us. cd to the root directory to prevent # problems with other programs or directories called `ld' in the path. # Set LC_ALL=C to ensure ld outputs messages in English. ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ | sed -ne '/supported targets:/!d s/[ ][ ]*/ /g s/.*supported targets: *// s/ .*// p'` case "$ld_supported_targets" in elf32-i386) TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" ;; a.out-i386-linux) echo "${UNAME_MACHINE}-pc-linux-gnuaout" exit 0 ;; coff-i386) echo "${UNAME_MACHINE}-pc-linux-gnucoff" exit 0 ;; "") # Either a pre-BFD a.out linker (linux-gnuoldld) or # one that does not give us useful --help. echo "${UNAME_MACHINE}-pc-linux-gnuoldld" exit 0 ;; esac # Determine whether the default compiler is a.out or elf eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include #ifdef __ELF__ # ifdef __GLIBC__ # if __GLIBC__ >= 2 LIBC=gnu # else LIBC=gnulibc1 # endif # else LIBC=gnulibc1 # endif #else #ifdef __INTEL_COMPILER LIBC=gnu #else LIBC=gnuaout #endif #endif #ifdef __dietlibc__ LIBC=dietlibc #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0 test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0 ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. # earlier versions are messed up and put the nodename in both # sysname and nodename. echo i386-sequent-sysv4 exit 0 ;; i*86:UNIX_SV:4.2MP:2.*) # Unixware is an offshoot of SVR4, but it has its own version # number series starting with 2... # I am not positive that other SVR4 systems won't match this, # I just have to hope. -- rms. # Use sysv4.2uw... so that sysv4* matches it. echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} exit 0 ;; i*86:OS/2:*:*) # If we were able to find `uname', then EMX Unix compatibility # is probably installed. echo ${UNAME_MACHINE}-pc-os2-emx exit 0 ;; i*86:XTS-300:*:STOP) echo ${UNAME_MACHINE}-unknown-stop exit 0 ;; i*86:atheos:*:*) echo ${UNAME_MACHINE}-unknown-atheos exit 0 ;; i*86:syllable:*:*) echo ${UNAME_MACHINE}-pc-syllable exit 0 ;; i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) echo i386-unknown-lynxos${UNAME_RELEASE} exit 0 ;; i*86:*DOS:*:*) echo ${UNAME_MACHINE}-pc-msdosdjgpp exit 0 ;; i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} else echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} fi exit 0 ;; i*86:*:5:[78]*) case `/bin/uname -X | grep "^Machine"` in *486*) UNAME_MACHINE=i486 ;; *Pentium) UNAME_MACHINE=i586 ;; *Pent*|*Celeron) UNAME_MACHINE=i686 ;; esac echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} exit 0 ;; i*86:*:3.2:*) if test -f /usr/options/cb.name; then UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ && UNAME_MACHINE=i586 (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ && UNAME_MACHINE=i686 (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ && UNAME_MACHINE=i686 echo ${UNAME_MACHINE}-pc-sco$UNAME_REL else echo ${UNAME_MACHINE}-pc-sysv32 fi exit 0 ;; pc:*:*:*) # Left here for compatibility: # uname -m prints for DJGPP always 'pc', but it prints nothing about # the processor, so we play safe by assuming i386. echo i386-pc-msdosdjgpp exit 0 ;; Intel:Mach:3*:*) echo i386-pc-mach3 exit 0 ;; paragon:*:*:*) echo i860-intel-osf1 exit 0 ;; i860:*:4.*:*) # i860-SVR4 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 else # Add other i860-SVR4 vendors below as they are discovered. echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 fi exit 0 ;; mini*:CTIX:SYS*5:*) # "miniframe" echo m68010-convergent-sysv exit 0 ;; mc68k:UNIX:SYSTEM5:3.51m) echo m68k-convergent-sysv exit 0 ;; M680?0:D-NIX:5.3:*) echo m68k-diab-dnix exit 0 ;; M68*:*:R3V[5678]*:*) test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;; 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) OS_REL='' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && echo i486-ncr-sysv4.3${OS_REL} && exit 0 /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && echo i486-ncr-sysv4 && exit 0 ;; m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) echo m68k-unknown-lynxos${UNAME_RELEASE} exit 0 ;; mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 exit 0 ;; TSUNAMI:LynxOS:2.*:*) echo sparc-unknown-lynxos${UNAME_RELEASE} exit 0 ;; rs6000:LynxOS:2.*:*) echo rs6000-unknown-lynxos${UNAME_RELEASE} exit 0 ;; PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) echo powerpc-unknown-lynxos${UNAME_RELEASE} exit 0 ;; SM[BE]S:UNIX_SV:*:*) echo mips-dde-sysv${UNAME_RELEASE} exit 0 ;; RM*:ReliantUNIX-*:*:*) echo mips-sni-sysv4 exit 0 ;; RM*:SINIX-*:*:*) echo mips-sni-sysv4 exit 0 ;; *:SINIX-*:*:*) if uname -p 2>/dev/null >/dev/null ; then UNAME_MACHINE=`(uname -p) 2>/dev/null` echo ${UNAME_MACHINE}-sni-sysv4 else echo ns32k-sni-sysv fi exit 0 ;; PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort # says echo i586-unisys-sysv4 exit 0 ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes . # How about differentiating between stratus architectures? -djm echo hppa1.1-stratus-sysv4 exit 0 ;; *:*:*:FTX*) # From seanf@swdc.stratus.com. echo i860-stratus-sysv4 exit 0 ;; i*86:VOS:*:*) # From Paul.Green@stratus.com. echo ${UNAME_MACHINE}-stratus-vos exit 0 ;; *:VOS:*:*) # From Paul.Green@stratus.com. echo hppa1.1-stratus-vos exit 0 ;; mc68*:A/UX:*:*) echo m68k-apple-aux${UNAME_RELEASE} exit 0 ;; news*:NEWS-OS:6*:*) echo mips-sony-newsos6 exit 0 ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) if [ -d /usr/nec ]; then echo mips-nec-sysv${UNAME_RELEASE} else echo mips-unknown-sysv${UNAME_RELEASE} fi exit 0 ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. echo powerpc-be-beos exit 0 ;; BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. echo powerpc-apple-beos exit 0 ;; BePC:BeOS:*:*) # BeOS running on Intel PC compatible. echo i586-pc-beos exit 0 ;; SX-4:SUPER-UX:*:*) echo sx4-nec-superux${UNAME_RELEASE} exit 0 ;; SX-5:SUPER-UX:*:*) echo sx5-nec-superux${UNAME_RELEASE} exit 0 ;; SX-6:SUPER-UX:*:*) echo sx6-nec-superux${UNAME_RELEASE} exit 0 ;; Power*:Rhapsody:*:*) echo powerpc-apple-rhapsody${UNAME_RELEASE} exit 0 ;; *:Rhapsody:*:*) echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} exit 0 ;; *:Darwin:*:*) UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown case $UNAME_PROCESSOR in *86) UNAME_PROCESSOR=i686 ;; unknown) UNAME_PROCESSOR=powerpc ;; esac echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} exit 0 ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) UNAME_PROCESSOR=`uname -p` if test "$UNAME_PROCESSOR" = "x86"; then UNAME_PROCESSOR=i386 UNAME_MACHINE=pc fi echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} exit 0 ;; *:QNX:*:4*) echo i386-pc-qnx exit 0 ;; NSE-?:NONSTOP_KERNEL:*:*) echo nse-tandem-nsk${UNAME_RELEASE} exit 0 ;; NSR-?:NONSTOP_KERNEL:*:*) echo nsr-tandem-nsk${UNAME_RELEASE} exit 0 ;; *:NonStop-UX:*:*) echo mips-compaq-nonstopux exit 0 ;; BS2000:POSIX*:*:*) echo bs2000-siemens-sysv exit 0 ;; DS/*:UNIX_System_V:*:*) echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} exit 0 ;; *:Plan9:*:*) # "uname -m" is not consistent, so use $cputype instead. 386 # is converted to i386 for consistency with other x86 # operating systems. if test "$cputype" = "386"; then UNAME_MACHINE=i386 else UNAME_MACHINE="$cputype" fi echo ${UNAME_MACHINE}-unknown-plan9 exit 0 ;; *:TOPS-10:*:*) echo pdp10-unknown-tops10 exit 0 ;; *:TENEX:*:*) echo pdp10-unknown-tenex exit 0 ;; KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) echo pdp10-dec-tops20 exit 0 ;; XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) echo pdp10-xkl-tops20 exit 0 ;; *:TOPS-20:*:*) echo pdp10-unknown-tops20 exit 0 ;; *:ITS:*:*) echo pdp10-unknown-its exit 0 ;; SEI:*:*:SEIUX) echo mips-sei-seiux${UNAME_RELEASE} exit 0 ;; *:DragonFly:*:*) echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` exit 0 ;; *:*VMS:*:*) UNAME_MACHINE=`(uname -p) 2>/dev/null` case "${UNAME_MACHINE}" in A*) echo alpha-dec-vms && exit 0 ;; I*) echo ia64-dec-vms && exit 0 ;; V*) echo vax-dec-vms && exit 0 ;; esac ;; *:XENIX:*:SysV) echo i386-pc-xenix exit 0 ;; esac #echo '(No uname command or uname output not recognized.)' 1>&2 #echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 eval $set_cc_for_build cat >$dummy.c < # include #endif main () { #if defined (sony) #if defined (MIPSEB) /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, I don't know.... */ printf ("mips-sony-bsd\n"); exit (0); #else #include printf ("m68k-sony-newsos%s\n", #ifdef NEWSOS4 "4" #else "" #endif ); exit (0); #endif #endif #if defined (__arm) && defined (__acorn) && defined (__unix) printf ("arm-acorn-riscix"); exit (0); #endif #if defined (hp300) && !defined (hpux) printf ("m68k-hp-bsd\n"); exit (0); #endif #if defined (NeXT) #if !defined (__ARCHITECTURE__) #define __ARCHITECTURE__ "m68k" #endif int version; version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; if (version < 4) printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); else printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); exit (0); #endif #if defined (MULTIMAX) || defined (n16) #if defined (UMAXV) printf ("ns32k-encore-sysv\n"); exit (0); #else #if defined (CMU) printf ("ns32k-encore-mach\n"); exit (0); #else printf ("ns32k-encore-bsd\n"); exit (0); #endif #endif #endif #if defined (__386BSD__) printf ("i386-pc-bsd\n"); exit (0); #endif #if defined (sequent) #if defined (i386) printf ("i386-sequent-dynix\n"); exit (0); #endif #if defined (ns32000) printf ("ns32k-sequent-dynix\n"); exit (0); #endif #endif #if defined (_SEQUENT_) struct utsname un; uname(&un); if (strncmp(un.version, "V2", 2) == 0) { printf ("i386-sequent-ptx2\n"); exit (0); } if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ printf ("i386-sequent-ptx1\n"); exit (0); } printf ("i386-sequent-ptx\n"); exit (0); #endif #if defined (vax) # if !defined (ultrix) # include # if defined (BSD) # if BSD == 43 printf ("vax-dec-bsd4.3\n"); exit (0); # else # if BSD == 199006 printf ("vax-dec-bsd4.3reno\n"); exit (0); # else printf ("vax-dec-bsd\n"); exit (0); # endif # endif # else printf ("vax-dec-bsd\n"); exit (0); # endif # else printf ("vax-dec-ultrix\n"); exit (0); # endif #endif #if defined (alliant) && defined (i860) printf ("i860-alliant-bsd\n"); exit (0); #endif exit (1); } EOF $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && $dummy && exit 0 # Apollos put the system type in the environment. test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; } # Convex versions that predate uname can use getsysinfo(1) if [ -x /usr/convex/getsysinfo ] then case `getsysinfo -f cpu_type` in c1*) echo c1-convex-bsd exit 0 ;; c2*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit 0 ;; c34*) echo c34-convex-bsd exit 0 ;; c38*) echo c38-convex-bsd exit 0 ;; c4*) echo c4-convex-bsd exit 0 ;; esac fi cat >&2 < in order to provide the needed information to handle your system. config.guess timestamp = $timestamp uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` /bin/uname -X = `(/bin/uname -X) 2>/dev/null` hostinfo = `(hostinfo) 2>/dev/null` /bin/universe = `(/bin/universe) 2>/dev/null` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` /bin/arch = `(/bin/arch) 2>/dev/null` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` UNAME_MACHINE = ${UNAME_MACHINE} UNAME_RELEASE = ${UNAME_RELEASE} UNAME_SYSTEM = ${UNAME_SYSTEM} UNAME_VERSION = ${UNAME_VERSION} EOF exit 1 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: xplc-0.3.13/config.sub0100755000204300020430000007547010331515666014741 0ustar pphaneufpphaneuf#! /bin/sh # Configuration validation subroutine script. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. timestamp='2005-04-22' # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software # can handle that machine. It does not imply ALL GNU software can. # # This file is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, # Boston, MA 02111-1307, USA. # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Please send patches to . Submit a context # diff and a properly formatted ChangeLog entry. # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. # If it is invalid, we print an error message on stderr and exit with code 1. # Otherwise, we print the canonical config type on stdout and succeed. # This file is supposed to be the same for all GNU packages # and recognize all the CPU types, system types and aliases # that are meaningful with *any* GNU software. # Each package is responsible for reporting which valid configurations # it does not support. The user should be able to distinguish # a failure to support a valid configuration from a meaningless # configuration. # The goal of this file is to map all the various variations of a given # machine specification into a single specification in the form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM # or in some cases, the newer four-part form: # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # It is wrong to echo any other type of specification. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] CPU-MFR-OPSYS $0 [OPTION] ALIAS Canonicalize a configuration name. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.sub ($timestamp) Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit 0 ;; --version | -v ) echo "$version" ; exit 0 ;; --help | --h* | -h ) echo "$usage"; exit 0 ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" exit 1 ;; *local*) # First pass through any local machine types. echo $1 exit 0;; * ) break ;; esac done case $# in 0) echo "$me: missing argument$help" >&2 exit 1;; 1) ;; *) echo "$me: too many arguments$help" >&2 exit 1;; esac # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). # Here we must recognize all the valid KERNEL-OS combinations. maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in nto-qnx* | linux-gnu* | linux-dietlibc | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | \ kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; *) basic_machine=`echo $1 | sed 's/-[^-]*$//'` if [ $basic_machine != $1 ] then os=`echo $1 | sed 's/.*-/-/'` else os=; fi ;; esac ### Let's recognize common machines as not being operating systems so ### that things like config.sub decstation-3100 work. We also ### recognize some manufacturers as not being operating systems, so we ### can provide default operating systems below. case $os in -sun*os*) # Prevent following clause from handling this invalid input. ;; -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ -apple | -axis | -knuth | -cray) os= basic_machine=$1 ;; -sim | -cisco | -oki | -wec | -winbond) os= basic_machine=$1 ;; -scout) ;; -wrs) os=-vxworks basic_machine=$1 ;; -chorusos*) os=-chorusos basic_machine=$1 ;; -chorusrdb) os=-chorusrdb basic_machine=$1 ;; -hiux*) os=-hiuxwe2 ;; -sco5) os=-sco3.2v5 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco4) os=-sco3.2v4 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2.[4-9]*) os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2v[4-9]*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco*) os=-sco3.2v2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -udk*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -isc) os=-isc2.2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -clix*) basic_machine=clipper-intergraph ;; -isc*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -lynx*) os=-lynxos ;; -ptx*) basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` ;; -windowsnt*) os=`echo $os | sed -e 's/windowsnt/winnt/'` ;; -psos*) os=-psos ;; -mint | -mint[0-9]*) basic_machine=m68k-atari os=-mint ;; esac # Decode aliases for certain CPU-COMPANY combinations. case $basic_machine in # Recognize the basic CPU types without company name. # Some are omitted here because they have special meanings below. 1750a | 580 \ | a29k \ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | am33_2.0 \ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \ | bfin \ | c4x | clipper \ | d10v | d30v | dlx | dsp16xx \ | fr30 | frv \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | i370 | i860 | i960 | ia64 \ | ip2k | iq2000 \ | m32r | m32rle | m68000 | m68k | m88k | maxq | mcore \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ | mips64vr | mips64vrel \ | mips64orion | mips64orionel \ | mips64vr4100 | mips64vr4100el \ | mips64vr4300 | mips64vr4300el \ | mips64vr5000 | mips64vr5000el \ | mipsisa32 | mipsisa32el \ | mipsisa32r2 | mipsisa32r2el \ | mipsisa64 | mipsisa64el \ | mipsisa64r2 | mipsisa64r2el \ | mipsisa64sb1 | mipsisa64sb1el \ | mipsisa64sr71k | mipsisa64sr71kel \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ | msp430 \ | ns16k | ns32k \ | openrisc | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ | pyramid \ | sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ | sparc | sparc64 | sparc64b | sparc86x | sparclet | sparclite \ | sparcv8 | sparcv9 | sparcv9b \ | strongarm \ | tahoe | thumb | tic4x | tic80 | tron \ | v850 | v850e \ | we32k \ | x86 | xscale | xscalee[bl] | xstormy16 | xtensa \ | z8k) basic_machine=$basic_machine-unknown ;; m6811 | m68hc11 | m6812 | m68hc12) # Motorola 68HC11/12. basic_machine=$basic_machine-unknown os=-none ;; m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) ;; # We use `pc' rather than `unknown' # because (1) that's what they normally are, and # (2) the word "unknown" tends to confuse beginning users. i*86 | x86_64) basic_machine=$basic_machine-pc ;; # Object if more than one company name word. *-*-*) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; # Recognize the basic CPU types with company name. 580-* \ | a29k-* \ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | avr-* \ | bfin-* | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ | clipper-* | craynv-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ | elxsi-* \ | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | i*86-* | i860-* | i960-* | ia64-* \ | ip2k-* | iq2000-* \ | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ | m88110-* | m88k-* | maxq-* | mcore-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | mips16-* \ | mips64-* | mips64el-* \ | mips64vr-* | mips64vrel-* \ | mips64orion-* | mips64orionel-* \ | mips64vr4100-* | mips64vr4100el-* \ | mips64vr4300-* | mips64vr4300el-* \ | mips64vr5000-* | mips64vr5000el-* \ | mipsisa32-* | mipsisa32el-* \ | mipsisa32r2-* | mipsisa32r2el-* \ | mipsisa64-* | mipsisa64el-* \ | mipsisa64r2-* | mipsisa64r2el-* \ | mipsisa64sb1-* | mipsisa64sb1el-* \ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ | mipstx39-* | mipstx39el-* \ | mmix-* \ | msp430-* \ | none-* | np1-* | ns16k-* | ns32k-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ | pyramid-* \ | romp-* | rs6000-* \ | sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | sparc-* | sparc64-* | sparc64b-* | sparc86x-* | sparclet-* \ | sparclite-* \ | sparcv8-* | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \ | tahoe-* | thumb-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ | tron-* \ | v850-* | v850e-* | vax-* \ | we32k-* \ | x86-* | x86_64-* | xps100-* | xscale-* | xscalee[bl]-* \ | xstormy16-* | xtensa-* \ | ymp-* \ | z8k-*) ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. 386bsd) basic_machine=i386-unknown os=-bsd ;; 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) basic_machine=m68000-att ;; 3b*) basic_machine=we32k-att ;; a29khif) basic_machine=a29k-amd os=-udi ;; abacus) basic_machine=abacus-unknown ;; adobe68k) basic_machine=m68010-adobe os=-scout ;; alliant | fx80) basic_machine=fx80-alliant ;; altos | altos3068) basic_machine=m68k-altos ;; am29k) basic_machine=a29k-none os=-bsd ;; amd64) basic_machine=x86_64-pc ;; amd64-*) basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; amdahl) basic_machine=580-amdahl os=-sysv ;; amiga | amiga-*) basic_machine=m68k-unknown ;; amigaos | amigados) basic_machine=m68k-unknown os=-amigaos ;; amigaunix | amix) basic_machine=m68k-unknown os=-sysv4 ;; apollo68) basic_machine=m68k-apollo os=-sysv ;; apollo68bsd) basic_machine=m68k-apollo os=-bsd ;; aux) basic_machine=m68k-apple os=-aux ;; balance) basic_machine=ns32k-sequent os=-dynix ;; c90) basic_machine=c90-cray os=-unicos ;; convex-c1) basic_machine=c1-convex os=-bsd ;; convex-c2) basic_machine=c2-convex os=-bsd ;; convex-c32) basic_machine=c32-convex os=-bsd ;; convex-c34) basic_machine=c34-convex os=-bsd ;; convex-c38) basic_machine=c38-convex os=-bsd ;; cray | j90) basic_machine=j90-cray os=-unicos ;; craynv) basic_machine=craynv-cray os=-unicosmp ;; cr16c) basic_machine=cr16c-unknown os=-elf ;; crds | unos) basic_machine=m68k-crds ;; crisv32 | crisv32-* | etraxfs*) basic_machine=crisv32-axis ;; cris | cris-* | etrax*) basic_machine=cris-axis ;; crx) basic_machine=crx-unknown os=-elf ;; da30 | da30-*) basic_machine=m68k-da30 ;; decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) basic_machine=mips-dec ;; decsystem10* | dec10*) basic_machine=pdp10-dec os=-tops10 ;; decsystem20* | dec20*) basic_machine=pdp10-dec os=-tops20 ;; delta | 3300 | motorola-3300 | motorola-delta \ | 3300-motorola | delta-motorola) basic_machine=m68k-motorola ;; delta88) basic_machine=m88k-motorola os=-sysv3 ;; djgpp) basic_machine=i586-pc os=-msdosdjgpp ;; dpx20 | dpx20-*) basic_machine=rs6000-bull os=-bosx ;; dpx2* | dpx2*-bull) basic_machine=m68k-bull os=-sysv3 ;; ebmon29k) basic_machine=a29k-amd os=-ebmon ;; elxsi) basic_machine=elxsi-elxsi os=-bsd ;; encore | umax | mmax) basic_machine=ns32k-encore ;; es1800 | OSE68k | ose68k | ose | OSE) basic_machine=m68k-ericsson os=-ose ;; fx2800) basic_machine=i860-alliant ;; genix) basic_machine=ns32k-ns ;; gmicro) basic_machine=tron-gmicro os=-sysv ;; go32) basic_machine=i386-pc os=-go32 ;; h3050r* | hiux*) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; h8300hms) basic_machine=h8300-hitachi os=-hms ;; h8300xray) basic_machine=h8300-hitachi os=-xray ;; h8500hms) basic_machine=h8500-hitachi os=-hms ;; harris) basic_machine=m88k-harris os=-sysv3 ;; hp300-*) basic_machine=m68k-hp ;; hp300bsd) basic_machine=m68k-hp os=-bsd ;; hp300hpux) basic_machine=m68k-hp os=-hpux ;; hp3k9[0-9][0-9] | hp9[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k2[0-9][0-9] | hp9k31[0-9]) basic_machine=m68000-hp ;; hp9k3[2-9][0-9]) basic_machine=m68k-hp ;; hp9k6[0-9][0-9] | hp6[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k7[0-79][0-9] | hp7[0-79][0-9]) basic_machine=hppa1.1-hp ;; hp9k78[0-9] | hp78[0-9]) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[0-9][13679] | hp8[0-9][13679]) basic_machine=hppa1.1-hp ;; hp9k8[0-9][0-9] | hp8[0-9][0-9]) basic_machine=hppa1.0-hp ;; hppa-next) os=-nextstep3 ;; hppaosf) basic_machine=hppa1.1-hp os=-osf ;; hppro) basic_machine=hppa1.1-hp os=-proelf ;; i370-ibm* | ibm*) basic_machine=i370-ibm ;; # I'm not sure what "Sysv32" means. Should this be sysv3.2? i*86v32) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv32 ;; i*86v4*) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv4 ;; i*86v) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv ;; i*86sol2) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-solaris2 ;; i386mach) basic_machine=i386-mach os=-mach ;; i386-vsta | vsta) basic_machine=i386-unknown os=-vsta ;; iris | iris4d) basic_machine=mips-sgi case $os in -irix*) ;; *) os=-irix4 ;; esac ;; isi68 | isi) basic_machine=m68k-isi os=-sysv ;; m88k-omron*) basic_machine=m88k-omron ;; magnum | m3230) basic_machine=mips-mips os=-sysv ;; merlin) basic_machine=ns32k-utek os=-sysv ;; mingw32) basic_machine=i386-pc os=-mingw32 ;; miniframe) basic_machine=m68000-convergent ;; *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) basic_machine=m68k-atari os=-mint ;; mips3*-*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` ;; mips3*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown ;; monitor) basic_machine=m68k-rom68k os=-coff ;; morphos) basic_machine=powerpc-unknown os=-morphos ;; msdos) basic_machine=i386-pc os=-msdos ;; mvs) basic_machine=i370-ibm os=-mvs ;; ncr3000) basic_machine=i486-ncr os=-sysv4 ;; netbsd386) basic_machine=i386-unknown os=-netbsd ;; netwinder) basic_machine=armv4l-rebel os=-linux ;; news | news700 | news800 | news900) basic_machine=m68k-sony os=-newsos ;; news1000) basic_machine=m68030-sony os=-newsos ;; news-3600 | risc-news) basic_machine=mips-sony os=-newsos ;; necv70) basic_machine=v70-nec os=-sysv ;; next | m*-next ) basic_machine=m68k-next case $os in -nextstep* ) ;; -ns2*) os=-nextstep2 ;; *) os=-nextstep3 ;; esac ;; nh3000) basic_machine=m68k-harris os=-cxux ;; nh[45]000) basic_machine=m88k-harris os=-cxux ;; nindy960) basic_machine=i960-intel os=-nindy ;; mon960) basic_machine=i960-intel os=-mon960 ;; nonstopux) basic_machine=mips-compaq os=-nonstopux ;; np1) basic_machine=np1-gould ;; nsr-tandem) basic_machine=nsr-tandem ;; op50n-* | op60c-*) basic_machine=hppa1.1-oki os=-proelf ;; or32 | or32-*) basic_machine=or32-unknown os=-coff ;; os400) basic_machine=powerpc-ibm os=-os400 ;; OSE68000 | ose68000) basic_machine=m68000-ericsson os=-ose ;; os68k) basic_machine=m68k-none os=-os68k ;; pa-hitachi) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; paragon) basic_machine=i860-intel os=-osf ;; pbd) basic_machine=sparc-tti ;; pbb) basic_machine=m68k-tti ;; pc532 | pc532-*) basic_machine=ns32k-pc532 ;; pentium | p5 | k5 | k6 | nexgen | viac3) basic_machine=i586-pc ;; pentiumpro | p6 | 6x86 | athlon | athlon_*) basic_machine=i686-pc ;; pentiumii | pentium2 | pentiumiii | pentium3) basic_machine=i686-pc ;; pentium4) basic_machine=i786-pc ;; pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumpro-* | p6-* | 6x86-* | athlon-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentium4-*) basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pn) basic_machine=pn-gould ;; power) basic_machine=power-ibm ;; ppc) basic_machine=powerpc-unknown ;; ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppcle | powerpclittle | ppc-le | powerpc-little) basic_machine=powerpcle-unknown ;; ppcle-* | powerpclittle-*) basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64) basic_machine=powerpc64-unknown ;; ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64le | powerpc64little | ppc64-le | powerpc64-little) basic_machine=powerpc64le-unknown ;; ppc64le-* | powerpc64little-*) basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ps2) basic_machine=i386-ibm ;; pw32) basic_machine=i586-unknown os=-pw32 ;; rom68k) basic_machine=m68k-rom68k os=-coff ;; rm[46]00) basic_machine=mips-siemens ;; rtpc | rtpc-*) basic_machine=romp-ibm ;; s390 | s390-*) basic_machine=s390-ibm ;; s390x | s390x-*) basic_machine=s390x-ibm ;; sa29200) basic_machine=a29k-amd os=-udi ;; sb1) basic_machine=mipsisa64sb1-unknown ;; sb1el) basic_machine=mipsisa64sb1el-unknown ;; sei) basic_machine=mips-sei os=-seiux ;; sequent) basic_machine=i386-sequent ;; sh) basic_machine=sh-hitachi os=-hms ;; sh64) basic_machine=sh64-unknown ;; sparclite-wrs | simso-wrs) basic_machine=sparclite-wrs os=-vxworks ;; sps7) basic_machine=m68k-bull os=-sysv2 ;; spur) basic_machine=spur-unknown ;; st2000) basic_machine=m68k-tandem ;; stratus) basic_machine=i860-stratus os=-sysv4 ;; sun2) basic_machine=m68000-sun ;; sun2os3) basic_machine=m68000-sun os=-sunos3 ;; sun2os4) basic_machine=m68000-sun os=-sunos4 ;; sun3os3) basic_machine=m68k-sun os=-sunos3 ;; sun3os4) basic_machine=m68k-sun os=-sunos4 ;; sun4os3) basic_machine=sparc-sun os=-sunos3 ;; sun4os4) basic_machine=sparc-sun os=-sunos4 ;; sun4sol2) basic_machine=sparc-sun os=-solaris2 ;; sun3 | sun3-*) basic_machine=m68k-sun ;; sun4) basic_machine=sparc-sun ;; sun386 | sun386i | roadrunner) basic_machine=i386-sun ;; sv1) basic_machine=sv1-cray os=-unicos ;; symmetry) basic_machine=i386-sequent os=-dynix ;; t3e) basic_machine=alphaev5-cray os=-unicos ;; t90) basic_machine=t90-cray os=-unicos ;; tic54x | c54x*) basic_machine=tic54x-unknown os=-coff ;; tic55x | c55x*) basic_machine=tic55x-unknown os=-coff ;; tic6x | c6x*) basic_machine=tic6x-unknown os=-coff ;; tx39) basic_machine=mipstx39-unknown ;; tx39el) basic_machine=mipstx39el-unknown ;; toad1) basic_machine=pdp10-xkl os=-tops20 ;; tower | tower-32) basic_machine=m68k-ncr ;; tpf) basic_machine=s390x-ibm os=-tpf ;; udi29k) basic_machine=a29k-amd os=-udi ;; ultra3) basic_machine=a29k-nyu os=-sym1 ;; v810 | necv810) basic_machine=v810-nec os=-none ;; vaxv) basic_machine=vax-dec os=-sysv ;; vms) basic_machine=vax-dec os=-vms ;; vpp*|vx|vx-*) basic_machine=f301-fujitsu ;; vxworks960) basic_machine=i960-wrs os=-vxworks ;; vxworks68) basic_machine=m68k-wrs os=-vxworks ;; vxworks29k) basic_machine=a29k-wrs os=-vxworks ;; w65*) basic_machine=w65-wdc os=-none ;; w89k-*) basic_machine=hppa1.1-winbond os=-proelf ;; xbox) basic_machine=i686-pc os=-mingw32 ;; xps | xps100) basic_machine=xps100-honeywell ;; ymp) basic_machine=ymp-cray os=-unicos ;; z8k-*-coff) basic_machine=z8k-unknown os=-sim ;; none) basic_machine=none-none os=-none ;; # Here we handle the default manufacturer of certain CPU types. It is in # some cases the only manufacturer, in others, it is the most popular. w89k) basic_machine=hppa1.1-winbond ;; op50n) basic_machine=hppa1.1-oki ;; op60c) basic_machine=hppa1.1-oki ;; romp) basic_machine=romp-ibm ;; mmix) basic_machine=mmix-knuth ;; rs6000) basic_machine=rs6000-ibm ;; vax) basic_machine=vax-dec ;; pdp10) # there are many clones, so DEC is not a safe bet basic_machine=pdp10-unknown ;; pdp11) basic_machine=pdp11-dec ;; we32k) basic_machine=we32k-att ;; sh3 | sh4 | sh[34]eb | sh[1234]le | sh[23]ele) basic_machine=sh-unknown ;; sh64) basic_machine=sh64-unknown ;; sparc | sparcv8 | sparcv9 | sparcv9b) basic_machine=sparc-sun ;; cydra) basic_machine=cydra-cydrome ;; orion) basic_machine=orion-highlevel ;; orion105) basic_machine=clipper-highlevel ;; mac | mpw | mac-mpw) basic_machine=m68k-apple ;; pmac | pmac-mpw) basic_machine=powerpc-apple ;; *-unknown) # Make sure to match an already-canonicalized machine name. ;; *) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; esac # Here we canonicalize certain aliases for manufacturers. case $basic_machine in *-digital*) basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` ;; *-commodore*) basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` ;; *) ;; esac # Decode manufacturer-specific aliases for certain operating systems. if [ x"$os" != x"" ] then case $os in # First match some system type aliases # that might get confused with valid system types. # -solaris* is a basic system type, with this one exception. -solaris1 | -solaris1.*) os=`echo $os | sed -e 's|solaris1|sunos4|'` ;; -solaris) os=-solaris2 ;; -svr4*) os=-sysv4 ;; -unixware*) os=-sysv4.2uw ;; -gnu/linux*) os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` ;; # First accept the basic system types. # The portable systems comes first. # Each alternative MUST END IN A *, to match a version number. # -sysv* is not here because it comes later, after sysvr4. -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ | -aos* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* | -openbsd* \ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -chorusos* | -chorusrdb* \ | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -mingw32* | -linux-gnu* | -linux-uclibc* | -uxpv* | -beos* | -mpeix* | -udk* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) case $basic_machine in x86-* | i*86-*) ;; *) os=-nto$os ;; esac ;; -nto-qnx*) ;; -nto*) os=`echo $os | sed -e 's|nto|nto-qnx|'` ;; -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ | -windows* | -osx | -abug | -netware* | -os9* | -beos* \ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) ;; -mac*) os=`echo $os | sed -e 's|mac|macos|'` ;; -linux-dietlibc) os=-linux-dietlibc ;; -linux*) os=`echo $os | sed -e 's|linux|linux-gnu|'` ;; -sunos5*) os=`echo $os | sed -e 's|sunos5|solaris2|'` ;; -sunos6*) os=`echo $os | sed -e 's|sunos6|solaris3|'` ;; -opened*) os=-openedition ;; -os400*) os=-os400 ;; -wince*) os=-wince ;; -osfrose*) os=-osfrose ;; -osf*) os=-osf ;; -utek*) os=-bsd ;; -dynix*) os=-bsd ;; -acis*) os=-aos ;; -atheos*) os=-atheos ;; -syllable*) os=-syllable ;; -386bsd) os=-bsd ;; -ctix* | -uts*) os=-sysv ;; -nova*) os=-rtmk-nova ;; -ns2 ) os=-nextstep2 ;; -nsk*) os=-nsk ;; # Preserve the version number of sinix5. -sinix5.*) os=`echo $os | sed -e 's|sinix|sysv|'` ;; -sinix*) os=-sysv4 ;; -tpf*) os=-tpf ;; -triton*) os=-sysv3 ;; -oss*) os=-sysv3 ;; -svr4) os=-sysv4 ;; -svr3) os=-sysv3 ;; -sysvr4) os=-sysv4 ;; # This must come after -sysvr4. -sysv*) ;; -ose*) os=-ose ;; -es1800*) os=-ose ;; -xenix) os=-xenix ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) os=-mint ;; -aros*) os=-aros ;; -kaos*) os=-kaos ;; -zvmoe) os=-zvmoe ;; -none) ;; *) # Get rid of the `-' at the beginning of $os. os=`echo $os | sed 's/[^-]*-//'` echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 exit 1 ;; esac else # Here we handle the default operating systems that come with various machines. # The value should be what the vendor currently ships out the door with their # machine or put another way, the most popular os provided with the machine. # Note that if you're going to try to match "-MANUFACTURER" here (say, # "-sun"), then you have to tell the case statement up towards the top # that MANUFACTURER isn't an operating system. Otherwise, code above # will signal an error saying that MANUFACTURER isn't an operating # system, and we'll never get to this point. case $basic_machine in *-acorn) os=-riscix1.2 ;; arm*-rebel) os=-linux ;; arm*-semi) os=-aout ;; c4x-* | tic4x-*) os=-coff ;; # This must come before the *-dec entry. pdp10-*) os=-tops20 ;; pdp11-*) os=-none ;; *-dec | vax-*) os=-ultrix4.2 ;; m68*-apollo) os=-domain ;; i386-sun) os=-sunos4.0.2 ;; m68000-sun) os=-sunos3 # This also exists in the configure program, but was not the # default. # os=-sunos4 ;; m68*-cisco) os=-aout ;; mips*-cisco) os=-elf ;; mips*-*) os=-elf ;; or32-*) os=-coff ;; *-tti) # must be before sparc entry or we get the wrong os. os=-sysv3 ;; sparc-* | *-sun) os=-sunos4.1.1 ;; *-be) os=-beos ;; *-ibm) os=-aix ;; *-knuth) os=-mmixware ;; *-wec) os=-proelf ;; *-winbond) os=-proelf ;; *-oki) os=-proelf ;; *-hp) os=-hpux ;; *-hitachi) os=-hiux ;; i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) os=-sysv ;; *-cbm) os=-amigaos ;; *-dg) os=-dgux ;; *-dolphin) os=-sysv3 ;; m68k-ccur) os=-rtu ;; m88k-omron*) os=-luna ;; *-next ) os=-nextstep ;; *-sequent) os=-ptx ;; *-crds) os=-unos ;; *-ns) os=-genix ;; i370-*) os=-mvs ;; *-next) os=-nextstep3 ;; *-gould) os=-sysv ;; *-highlevel) os=-bsd ;; *-encore) os=-bsd ;; *-sgi) os=-irix ;; *-siemens) os=-sysv4 ;; *-masscomp) os=-rtu ;; f30[01]-fujitsu | f700-fujitsu) os=-uxpv ;; *-rom68k) os=-coff ;; *-*bug) os=-coff ;; *-apple) os=-macos ;; *-atari*) os=-mint ;; *) os=-none ;; esac fi # Here we handle the case where we know the os, and the CPU type, but not the # manufacturer. We pick the logical manufacturer. vendor=unknown case $basic_machine in *-unknown) case $os in -riscix*) vendor=acorn ;; -sunos*) vendor=sun ;; -aix*) vendor=ibm ;; -beos*) vendor=be ;; -hpux*) vendor=hp ;; -mpeix*) vendor=hp ;; -hiux*) vendor=hitachi ;; -unos*) vendor=crds ;; -dgux*) vendor=dg ;; -luna*) vendor=omron ;; -genix*) vendor=ns ;; -mvs* | -opened*) vendor=ibm ;; -os400*) vendor=ibm ;; -ptx*) vendor=sequent ;; -tpf*) vendor=ibm ;; -vxsim* | -vxworks* | -windiss*) vendor=wrs ;; -aux*) vendor=apple ;; -hms*) vendor=hitachi ;; -mpw* | -macos*) vendor=apple ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) vendor=atari ;; -vos*) vendor=stratus ;; esac basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` ;; esac echo $basic_machine$os exit 0 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: xplc-0.3.13/uuid/0040755000204300020430000000000010331536343013705 5ustar pphaneufpphaneufxplc-0.3.13/uuid/CVS/0040755000204300020430000000000010331523162014333 5ustar pphaneufpphaneufxplc-0.3.13/uuid/CVS/Root0100644000204300020430000000006510331536343015204 0ustar pphaneufpphaneuf:pserver:anonymous@cvs.sourceforge.net:/cvsroot/xplc xplc-0.3.13/uuid/CVS/Repository0100644000204300020430000000001210331520010016410 0ustar pphaneufpphaneufxplc/uuid xplc-0.3.13/uuid/CVS/Entries0100644000204300020430000000144010331523162015663 0ustar pphaneufpphaneuf/.cvsignore/1.1/Fri Oct 21 13:18:22 2005// /COPYING/1.1/Fri Oct 21 13:18:22 2005// /ChangeLog/1.1/Fri Oct 21 13:18:22 2005// /clear.c/1.1/Fri Oct 21 13:18:22 2005// /compare.c/1.1/Fri Oct 21 13:18:22 2005// /copy.c/1.1/Fri Oct 21 13:18:22 2005// /gen_uuid.c/1.1/Fri Oct 21 13:18:22 2005// /gen_uuid_nt.c/1.1/Fri Oct 21 13:18:22 2005// /isnull.c/1.1/Fri Oct 21 13:18:22 2005// /pack.c/1.1/Fri Oct 21 13:18:22 2005// /parse.c/1.1/Fri Oct 21 13:18:22 2005// /rules.mk/1.1/Fri Oct 21 13:18:22 2005// /unpack.c/1.1/Fri Oct 21 13:18:22 2005// /unparse.c/1.1/Fri Oct 21 13:18:22 2005// /uuid.h/1.1/Fri Oct 21 13:18:22 2005// /uuidP.h/1.1/Fri Oct 21 13:18:22 2005// /uuid_types.h.in/1.1/Fri Oct 21 13:18:22 2005// /vars.mk/1.1/Fri Oct 21 13:18:22 2005// D/bin//// /uuid_time.c/1.2/Mon Oct 31 22:55:03 2005// xplc-0.3.13/uuid/bin/0040755000204300020430000000000010331536343014455 5ustar pphaneufpphaneufxplc-0.3.13/uuid/bin/CVS/0040755000204300020430000000000010331520010015070 5ustar pphaneufpphaneufxplc-0.3.13/uuid/bin/CVS/Root0100644000204300020430000000006510331536343015754 0ustar pphaneufpphaneuf:pserver:anonymous@cvs.sourceforge.net:/cvsroot/xplc xplc-0.3.13/uuid/bin/CVS/Repository0100644000204300020430000000001610331520010017164 0ustar pphaneufpphaneufxplc/uuid/bin xplc-0.3.13/uuid/bin/CVS/Entries0100644000204300020430000000025410331520010016422 0ustar pphaneufpphaneuf/.cvsignore/1.1/Fri Oct 21 13:18:22 2005// /tst_uuid.c/1.1/Fri Oct 21 13:18:22 2005// /uuidgen.1/1.1/Fri Oct 21 14:56:40 2005// /uuidgen.c/1.4/Fri Oct 21 16:19:01 2005// D xplc-0.3.13/uuid/bin/.cvsignore0100644000204300020430000000003710326165236016455 0ustar pphaneufpphaneuf.*.d tst_uuid uuidgen uuidcdef xplc-0.3.13/uuid/bin/tst_uuid.c0100644000204300020430000001217110326165236016463 0ustar pphaneufpphaneuf/* * tst_uuid.c --- test program from the UUID library * * Copyright (C) 1996, 1997, 1998 Theodore Ts'o. * * %Begin-Header% * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, and the entire permission notice in its entirety, * including the disclaimer of warranties. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * 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, ALL OF * WHICH ARE HEREBY DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE * USE OF THIS SOFTWARE, EVEN IF NOT ADVISED OF THE POSSIBILITY OF SUCH * DAMAGE. * %End-Header% */ #include #include #include static int test_uuid(const char * uuid, int isValid) { static const char * validStr[2] = {"invalid", "valid"}; uuid_t uuidBits; int parsedOk; parsedOk = uuid_parse(uuid, uuidBits) == 0; printf("%s is %s", uuid, validStr[isValid]); if (parsedOk != isValid) { printf(" but uuid_parse says %s\n", validStr[parsedOk]); return 1; } printf(", OK\n"); return 0; } int main(int argc, char **argv) { uuid_t buf, tst; char str[100]; struct timeval tv; time_t time_reg; unsigned char *cp; int i; int failed = 0; int type, variant; uuid_generate(buf); uuid_unparse(buf, str); printf("UUID generate = %s\n", str); printf("UUID: "); for (i=0, cp = (unsigned char *) &buf; i < 16; i++) { printf("%02x", *cp++); } printf("\n"); type = uuid_type(buf); variant = uuid_variant(buf); printf("UUID type = %d, UUID variant = %d\n", type, variant); if (variant != UUID_VARIANT_DCE) { printf("Incorrect UUID Variant; was expecting DCE!\n"); failed++; } printf("\n"); uuid_generate_random(buf); uuid_unparse(buf, str); printf("UUID random string = %s\n", str); printf("UUID: "); for (i=0, cp = (unsigned char *) &buf; i < 16; i++) { printf("%02x", *cp++); } printf("\n"); type = uuid_type(buf); variant = uuid_variant(buf); printf("UUID type = %d, UUID variant = %d\n", type, variant); if (variant != UUID_VARIANT_DCE) { printf("Incorrect UUID Variant; was expecting DCE!\n"); failed++; } if (type != 4) { printf("Incorrect UUID type; was expecting " "4 (random type)!\n"); failed++; } printf("\n"); uuid_generate_time(buf); uuid_unparse(buf, str); printf("UUID string = %s\n", str); printf("UUID time: "); for (i=0, cp = (unsigned char *) &buf; i < 16; i++) { printf("%02x", *cp++); } printf("\n"); type = uuid_type(buf); variant = uuid_variant(buf); printf("UUID type = %d, UUID variant = %d\n", type, variant); if (variant != UUID_VARIANT_DCE) { printf("Incorrect UUID Variant; was expecting DCE!\n"); failed++; } if (type != 1) { printf("Incorrect UUID type; was expecting " "1 (time-based type)!\\n"); failed++; } tv.tv_sec = 0; tv.tv_usec = 0; time_reg = uuid_time(buf, &tv); printf("UUID time is: (%ld, %ld): %s\n", tv.tv_sec, tv.tv_usec, ctime(&time_reg)); uuid_parse(str, tst); if (!uuid_compare(buf, tst)) printf("UUID parse and compare succeeded.\n"); else { printf("UUID parse and compare failed!\n"); failed++; } uuid_clear(tst); if (uuid_is_null(tst)) printf("UUID clear and is null succeeded.\n"); else { printf("UUID clear and is null failed!\n"); failed++; } uuid_copy(buf, tst); if (!uuid_compare(buf, tst)) printf("UUID copy and compare succeeded.\n"); else { printf("UUID copy and compare failed!\n"); failed++; } failed += test_uuid("84949cc5-4701-4a84-895b-354c584a981b", 1); failed += test_uuid("84949CC5-4701-4A84-895B-354C584A981B", 1); failed += test_uuid("84949cc5-4701-4a84-895b-354c584a981bc", 0); failed += test_uuid("84949cc5-4701-4a84-895b-354c584a981", 0); failed += test_uuid("84949cc5x4701-4a84-895b-354c584a981b", 0); failed += test_uuid("84949cc504701-4a84-895b-354c584a981b", 0); failed += test_uuid("84949cc5-470104a84-895b-354c584a981b", 0); failed += test_uuid("84949cc5-4701-4a840895b-354c584a981b", 0); failed += test_uuid("84949cc5-4701-4a84-895b0354c584a981b", 0); failed += test_uuid("g4949cc5-4701-4a84-895b-354c584a981b", 0); failed += test_uuid("84949cc5-4701-4a84-895b-354c584a981g", 0); if (failed) { printf("%d failures.\n", failed); exit(1); } return 0; } xplc-0.3.13/uuid/bin/uuidgen.10100644000204300020430000000537710326200650016201 0ustar pphaneufpphaneuf.\" Man page for uuidgen .\" Copyright (C) 2005, Net Integration Technologies, Inc. .\" .\" This library is free software; you can redistribute it and/or .\" modify it under the terms of the GNU Lesser General Public License .\" as published by the Free Software Foundation; either version 2.1 of .\" the License, or (at your option) any later version. .\" .\" This library is distributed in the hope that it will be useful, but .\" WITHOUT ANY WARRANTY; without even the implied warranty of .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU .\" Lesser General Public License for more details. .\" .\" You should have received a copy of the GNU Lesser General Public .\" License along with this library; if not, write to the Free Software .\" Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA .\" .\" As a special exception, you may use this file as part of a free .\" software library without restriction. Specifically, if other files .\" instantiate templates or use macros or inline functions from this .\" file, or you compile this file and link it with other files to .\" produce an executable, this file does not by itself cause the .\" resulting executable to be covered by the GNU Lesser General Public .\" License. This exception does not however invalidate any other .\" reasons why the executable file might be covered by the GNU Lesser .\" General Public License. .TH uuidgen 1 "October 2005" "tvtime 0.3.13" .\" .SH NAME uuidgen \- a universally unique identifier (UUID) generator for XPLC .\" .SH SYNOPSIS .B uuidgen [ .IR OPTION ] ... .br .B uuidcdef [ .IR OPTION ] ... .\" .SH DESCRIPTION .B uuidgen generates a new universally unique identifier (UUID). This UUID can be assumed to be unique to any other UUIDs generated on the local system, as well as those created on any other systems, at any time in the past or future. By default, .B uuidgen will try to generate a UUID with as much randomness as possible. It tries to pick out a high-quality randomness source. If it cannot find one, it will fall back on using a time-based algorithm. .\" .SH OPTIONS .TP .B \-c, \-\-cdef Print the UUID as an initializer for a C structure, compatible with the type used by XPLC. This is the default mode for .BR uuidcdef . .\" .TP .B \-r, \-\-random Demand that the random-based algorithm be used to generate the UUID. This will prefer a high-quality randomness source, but may fall back on a low-entropy one. .\" .TP .B \-t, \-\-time Demand that the time-based algorithm be used to generate the UUID. .\" .TP .B \-u, \-\-uuid Print the UUID like: "26175a27-c35d-4615-8dfb-1509eab28ef8". This is the .BR printf (3) format: "%08x-%04x-%04x-%04x-%012x". This is the default mode for .BR uuidgen . .\" .SH AUTHOR Simon Law .\" .SH "SEE ALSO" .BR uuidgen (1). xplc-0.3.13/uuid/bin/uuidgen.c0100644000204300020430000002122110326212365016253 0ustar pphaneufpphaneuf/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- * * uuidgen - UUID generator and preprocessor for XPLC * Copyright (C) 2005, Net Integration Technologies, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License * as published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * As a special exception, you may use this file as part of a free * software library without restriction. Specifically, if other files * instantiate templates or use macros or inline functions from this * file, or you compile this file and link it with other files to * produce an executable, this file does not by itself cause the * resulting executable to be covered by the GNU Lesser General Public * License. This exception does not however invalidate any other * reasons why the executable file might be covered by the GNU Lesser * General Public License. */ #include #include #ifdef HAVE_STDLIB_H # include #endif #include #ifdef HAVE_STRING_H # include #endif #ifdef HAVE_UNISTD_H # include #endif #include #include "include/autoconf.h" #define SOURCE_NONE -1 #define SOURCE_AUTO 0 #define SOURCE_RANDOM 1 #define SOURCE_TIME 2 #define SINK_NONE -1 #define SINK_UUID 0 #define SINK_CDEF 1 struct config_t { /* What kind of randomness source do we use? */ int source; /* What kind of output are we generating? */ int sink; }; const char* program; /* Program name */ #define PARSE_INVALID -1 #define PARSE_UNKNOWN 0 #define PARSE_FLAGS 1 #define PARSE_SHORT_OPTIONS 2 #define PARSE_LONG_OPTION 3 void print_help(const char* program) { printf("Usage: %s [OPTION]\n", program); printf("Generate a new universally unique identifier (UUID)\n"); printf("\n" " -c, --cdef\toutput C structure for XPLC\n" " -r, --random\tgenerate random-based UUID\n" " -t, --time\tgenerate time-based UUID\n" " -u, --uuid\thuman-readable output\n" " --help\tdisplay this help and exit\n" " --version\toutput version information and exit\n" "\n"); printf("When called without options, this programme will generate a " "universally\n" "unique identifier (UUID), and output it as requested.\n"); printf("\n" "Report bugs to <" PACKAGE_BUGREPORT ">.\n"); } void print_version(const char* program) { printf("XPLC uuidgen version " PACKAGE_VERSION "\n" "Written by Simon Law.\n" "\n" "Copyright (C) 2005, Net Integration Technologies, Inc.\n" "This is free software; see the source for copying conditions. " "There is NO\n" "warranty; not even for MERCHANTABILITY or FITNESS FOR A " "PARTICULAR PURPOSE.\n"); } int parse_short_option(const int flag, struct config_t* cfg) { if(!cfg) { fprintf(stderr, "%s: Programmer error at %s:%d\n", program, __FILE__, __LINE__); abort(); } switch(flag) { case 'c': cfg->sink = SINK_CDEF; break; case 'r': cfg->source = SOURCE_RANDOM; break; case 't': cfg->source = SOURCE_TIME; break; case 'u': cfg->sink = SINK_UUID; break; case -1: cfg->source = SOURCE_NONE; cfg->sink = SINK_NONE; print_help(program); return -1; case -2: cfg->source = SOURCE_NONE; cfg->sink = SINK_NONE; print_version(program); return -1; default: fprintf(stderr, "%s: invalid option -- %c\n" "Try `%s --help' for more information.\n", program, flag, program); return 1; } return 0; } int parse_long_option(const char* option, struct config_t* cfg) { int ret; if(!strcmp(option + 2, "help")) ret = parse_short_option(-1, cfg); else if(!strcmp(option + 2, "version")) ret = parse_short_option(-2, cfg); else if(!strcmp(option + 2, "cdef")) ret = parse_short_option('c', cfg); else if(!strcmp(option + 2, "random")) ret = parse_short_option('r', cfg); else if(!strcmp(option + 2, "time")) ret = parse_short_option('t', cfg); else if(!strcmp(option + 2, "uuid")) ret = parse_short_option('u', cfg); else { fprintf(stderr, "%s: unrecognised option `%s'\n" "Try `%s --help' for more information.\n", program, option, program); ret = 1; } return ret; } int parse_conf(int argc, char** argv, struct config_t* cfg) { int i; if(!cfg) { fprintf(stderr, "%s: Programmer error at %s:%d\n", program, __FILE__, __LINE__); abort(); } memset(cfg, 0, sizeof(*cfg)); /* By default, uuidcdef outputs a SINK_CDEF */ if (strstr(program, "cdef")) cfg->sink = SINK_CDEF; for(i = 1; i < argc; ++i) { int state = PARSE_UNKNOWN; /* Iterate through the option and decide what to do with it */ char* c; for(c = argv[i]; c; c && ++c) { switch(state) { case PARSE_INVALID: fprintf(stderr, "%s: unrecognised option `%s'\n" "Try `%s --help' for more information.\n", program, argv[i], program); return 1; case PARSE_FLAGS: switch(*c) { case '-': state = PARSE_LONG_OPTION; break; default: state = PARSE_SHORT_OPTIONS; --c; } break; case PARSE_SHORT_OPTIONS: if(*c) { int ret = parse_short_option(*c, cfg); if(ret > 0) return ret; else if(ret < 0) return 0; } else c = NULL; break; case PARSE_LONG_OPTION: { int ret = parse_long_option(argv[i], cfg); if(ret > 0) return ret; else if(ret < 0) return 0; c = NULL; break; } default: switch(*c) { case '-': state = PARSE_FLAGS; break; default: state = PARSE_INVALID; } } } } return 0; } typedef const char* (*uuid_output_fn_t)(const uuid_t); static char uuid_unparse_buf[60]; const char* uuid_unparse_x_(const uuid_t uuid) { /* This function implicitly trusts uuid_unparse. */ unsigned int a, b, c, d, e, f, g, h, i, j, k; int ret; uuid_unparse(uuid, uuid_unparse_buf); ret = sscanf(uuid_unparse_buf, "%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x", &a, &b, &c, &d, &e, &f, &g, &h, &i, &j, &k); if(ret != 11) { uuid_unparse_buf[59] = '\0'; fprintf(stderr, "%s: libuuid error at %s:%d\n", program, __FILE__, __LINE__); fprintf(stderr, "uuid_unparse() returned `%s'.\n", uuid_unparse_buf); abort(); } sprintf(uuid_unparse_buf, "{0x%08x, " "0x%04x, " "0x%04x, " "{0x%02x, 0x%02x, " "0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x}}", a, b, c, d, e, f, g, h, i, j, k); return uuid_unparse_buf; } const char* uuid_unparse_(const uuid_t uuid) { uuid_unparse(uuid, uuid_unparse_buf); return uuid_unparse_buf; } #define BUFFER_SIZE 100 #define LENGTH 36 int main(int argc, char** argv) { /* Configuration */ struct config_t cfg; /* Return value */ int ret; /* Parse the command line arguments */ program = argv[0]; ret = parse_conf(argc, argv, &cfg); if(!ret) { /* Function that will generate the correct output */ uuid_output_fn_t uuid_output_fn = NULL; /* Static buffer to hold the UUID. */ uuid_t uuid; memset(uuid, 0, sizeof(uuid)); /* Generate the UUID, using the method requested. */ switch(cfg.source) { case SOURCE_RANDOM: uuid_generate_random(uuid); break; case SOURCE_TIME: uuid_generate_time(uuid); break; case SOURCE_AUTO: uuid_generate(uuid); break; default: ; } switch(cfg.sink) { case SINK_CDEF: uuid_output_fn = &uuid_unparse_x_; break; case SINK_UUID: uuid_output_fn = &uuid_unparse_; break; default: uuid_output_fn = NULL; } /* Do the right kind of output, using the method requested. */ if(uuid_output_fn) printf("%s\n", uuid_output_fn(uuid)); } return ret; } xplc-0.3.13/uuid/.cvsignore0100644000204300020430000000004010326165236015677 0ustar pphaneufpphaneuf.*.d *.o libuuid.a uuid_types.h xplc-0.3.13/uuid/COPYING0100644000204300020430000000255710326165236014751 0ustar pphaneufpphaneufRedistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, and the entire permission notice in its entirety, including the disclaimer of warranties. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the 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, ALL OF WHICH ARE HEREBY DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF NOT ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. xplc-0.3.13/uuid/ChangeLog0100644000204300020430000004051110326165236015460 0ustar pphaneufpphaneuf2005-10-18 Simon Law * Imported libuuid into XPLC. * rules.mk vars.mk: Build system changes. * gen_uuid_nt.c: Better Win32 support. 2005-06-30 Theodore Ts'o * Release of E2fsprogs 1.38 2005-03-21 Theodore Ts'o * Release of E2fsprogs 1.37 2006-02-05 Theodore Ts'o * Release of E2fsprogs 1.36 2005-02-05 Theodore Ts'o * Makefile.in: Remove uuid.pc on a "make distclean" 2005-01-26 Theodore Ts'o * uuid.pc.in: Add pkg-config files. 2005-01-18 Theodore Ts'o * Makefile.in: Fix the kernel compile-time echo commands to be consistent and portable 2005-01-17 Theodore Ts'o * uuidP.h: Use inttypes.h in preference to stdint.h for compatibility with older FreeBSD and Solaris systems. 2004-12-14 Theodore Ts'o * Makefile.in: Use Linux-kernel-style makefile output for "make install" * Makefile.in (installdirs): Use $(MKINSTALLDIRS) macro. Update dependencies. 2004-11-30 Theodore Ts'o * Makefile.in: Use Linux-kernel-style makefile output to make it easier to see errors/warnings. 2004-09-17 Theodore Ts'o * gen_uuid.c (get_node_id): glibc always defines AF_LINK, so only try to use struct sockaddr_dl if HAVE_NET_IF_DL_H is defined. (Addresses Debian Bug #256669) 2004-05-27 Theodore Ts'o * uuid.h (UUID_DEFINE): Make the UUID defined as a static variable, with __attribute__ ((unused)) if we are using GCC. 2004-05-04 Theodore Ts'o * Update and clean up uuid man pages * gen_uuid.c (uuid_generate_time): Mask off the timestamp to avoid a Y8.8888K problem. 2004-04-03 Theodore Ts'o * Makefile.in: Update the modtime even if subst doesn't need to update the libuuid man pages, to avoid always re-running subst, especially since there are no dependencies on the man page. 2004-04-03 Theodore Ts'o * libuuid.3.in, uuid_clear.3.in, uuid_compare.3.in, uuid_copy.3.in, uuid_generate.3.in, uuid_is_null.3.in, uuid_parse.3.in, uuid_time.3.in, uuid_unparse.3.in: Change licensing of man pages from GPL to 3-clause BSD-style. * uuid_parse.3.in, uuid_unparse.3.in: Change the use of the term "internal format" to "binary representation". * gen_uuid.c, pack.c, unpack.c, uuid_time.c, uuidP.h, uuid_types.h.in: Use ANSI C99 types if stdint.h exists. 2004-03-30 Theodore Ts'o * gen_uuid.c (get_node_id): Clean up AF_LINK #ifdef's for Darwin. 2004-03-22 Theodore Ts'o * unparse.c (uuid_unparse_lower, uuid_unparse_upper), uuid_unparse.3.in, uuid.h: Add new functions. 2004-03-19 Theodore Ts'o * Change the license to be the 3-clause BSD-style license * uuid.h (UUID_DEFINE): Add UUID type #define's, and add an CPP macro to define UUID constants. * gen_uuid.c (get_clock): Use 14 bits for the clock sequence, instead of just 13 bits. * gen_uuid.c (get_node_id): Fix so that Darwin will actually get the ethernet address correctly. 2004-02-29 Brian Bergstrand * Makefile.in: Use $(BSDLIB_PIC_FLAG) to determine whether to use -fpic or -fPIC 2004-02-28 Theodore Ts'o * Release of E2fsprogs 1.35 2004-01-30 Theodore Ts'o * gen_uuid.c (uuid_generate_time): Fix bug pointed out by Ralf S. Engelshall; when generating a random ethernet address because one is not available, set the least significant bit of the first byte of the MAC address, since it is the first bit to be transmitted, and is therefore the multicast bit. 2003-07-25 Theodore Ts'o * Release of E2fsprogs 1.34 2003-04-21 Theodore Ts'o * Release of E2fsprogs 1.33 2003-04-21 Theodore Ts'o * Makefile.in: Use DYLD_LIBRAY_PATH so that "make check" works on Darwin systems when building with shared libraries. 2003-04-12 Theodore Ts'o * gen_uuid.c: Add #ifdef checks around #include and . 2003-04-03 Theodore Ts'o * gen_uuid.c (get_random_bytes): Always xor in a stream of bytes from the system PRNG (i.e., random/srandom, seeded from the time, pid, and uid) in case /dev/random isn't doing the right thing on a particular system. It doesn't hurt, and it can help, in the case of a buggy /dev/random. 2003-03-14 Theodore Ts'o * Makefile.in: Add support for Apple Darwin 2003-03-06 Theodore Tso * uuid_types.h.in: Don't redefine types if other e2fsprogs *_types.h files have been included already. * Makefile.in (tst_uuid): Link against the static library instead of all of the object files, so that we automatically pick up -lsocket under Solaris. 2003-03-02 Theodore Ts'o * Makefile.in, uuidP.h, uuid_types.h.in: Use uuid_types.h instead of ext2_types.h 2002-11-09 Theodore Ts'o * Release of E2fsprogs 1.32 2002-11-08 Theodore Ts'o * Release of E2fsprogs 1.31 2002-10-31 Theodore Ts'o * Release of E2fsprogs 1.30 2002-10-31 Theodore Ts'o * gen_uuid.c (get_random_bytes): Don't spin forever if read() returns EINTR or EAGAIN, so that when /dev/random is opened O_NONBLOCK, we don't end up spinning forever. 2001-09-24 Theodore Tso * Release of E2fsprogs 1.29 2001-08-31 Theodore Tso * Release of E2fsprogs 1.28 2002-07-15 Theodore Ts'o * parse.c (uuid_parse): Fix uuid parsing bug which didn't complain for certain types of invalid input text. (Addresses Debian bug #152891). * tst_uuid.c: Add test cases for invalid text strings passed to uuid_parse. 2002-03-08 Theodore Tso * Release of E2fsprogs 1.27 2002-02-24 Theodore Tso * Makefile.in (install): Install hard links to man pages for uuid_generate_random and uuid_generate_time. Remove any compressed man pages before installing the man pages. 2002-02-03 Theodore Tso * Release of E2fsprogs 1.26 2001-09-20 Theodore Tso * Release of E2fsprogs 1.25 2001-09-10 Theodore Tso * compare.c (uuid_compare), copy.c (uuid_copy), isnull.c (uuid_is_null), pack.c (uuid_pack), parse.c (uuid_parse), unpack.c (uuid_unpack), unparse.c (uuid_unparse), uuid.h, uuidP.h, uuid_time.c (uuid_time, uuid_type, uuid_variant): Use const for pointer variables that we don't modify. Add the appropriate ifdef's in uuid.h to make it be C++ friendly. 2001-09-02 Theodore Tso * Release of E2fsprogs 1.24a 2001-08-30 Theodore Tso * Release of E2fsprogs 1.24 2001-08-15 Theodore Tso * Release of E2fsprogs 1.23 2001-06-23 Theodore Tso * Release of E2fsprogs 1.22 2001-06-21 Theodore Tso * uuid.h: Add protection against multiple inclusion 2001-06-15 Theodore Tso * Release of E2fsprogs 1.21 2001-06-01 Theodore Tso * Makefile.in, uuidP.h: Move include/asm/types.h.in to lib/ext2fs/ext2_types.h.in. 2001-06-01 Theodore Tso * unpack.c, unparse.c, uuid_time.c: Update files to be under the LGPL (that somehow were missed when libuuid was converted to use the LGPL). Whoops. 2001-05-25 Theodore Tso * Release of E2fsprogs 1.20 2001-05-14 Theodore Tso * tst_uuid.c, uuid_time.c: Remove unneeded #include of ext2_fs.h 2001-05-12 Theodore Tso * libuuid.3.in, uuid_clear.3.in, uuid_compare.3.in, uuid_copy.3.in, uuid_generate.3.in, uuid_is_null.3.in, uuid_parse.3.in, uuid_time.3.in, uuid_unparse.3.in: Update URL location of e2fsprogs package. 2001-05-01 Theodore Tso * parse.c, compare.c: Include string.h to fix gcc -Wall complaints. * gen_uuid.c: Define _SVID_SOURCE to avoid gcc -Wall errors because some required structures wouldn't be otherwise defined. Fix a minor gcc -Wall nit in the declaration of get_random_fd(). 2001-01-12 Theodore Ts'o * uuid_time.c (main), tst_uuid.c (main): Fix gcc -Wall complaints. * uuid.h, copy.c (uuid_copy): Change arguments to make it clear which argument is the source and which is the destination. * gen_uuid.c (get_random_fd): Use gettimeofday to seed the PRNG, so we can take advantage of tv_usec to do (slightly) better at seeding it. 2000-07-13 * Release of E2fsprogs 1.19 2000-07-07 Theodore Ts'o * Makefile.in (uuid_time): Fix compilation rule so that uuid_time.o doesn't get bashed in order to build the command-line version of uuid_time. 2000-07-04 Theodore Ts'o * Makefile.in: Remove explicit link of -lc in the shared library. (It shouldn't be necessary, and is harmful in some cases). 2000-06-12 Theodore Ts'o * gen_uuid.c (get_random_bytes): Use O_NONBLOCK when trying to open /dev/random. Break out the /dev/random initialization code into a get_random_fd() function, and use that function in uuid_generate() to determine whether to use uuid_generate_random() or uuid_generate_time(). 2000-05-25 * Makefile: Add hack dependency rule so that parallel makes work correctly. 2000-04-07 Theodore Ts'o * clear.c, compare.c, copy.c, gen_uuid.c, isnull.c, pack.c, parse.c, uuid.h, uuidP.h: Changed copyright to be the LGPL. Thu Apr 6 17:38:58 2000 Theodore Y. Ts'o * Makefile.in (uuid_time): Compile uuid_time in two steps (first create .o, then link it against the libraries) to work around bug in a.out linker. * dll/jump.funcs, dll/jump.import, dll/jump.params: Update a.out shared library control files to reflect new added files. 2000-04-03 Theodore Ts'o * gen_uuid.c (get_clock): Fix bug where the last timeval wasn't getting set, causing potentially duplicate UUID's to be generated. 2000-03-12 Theodore Ts'o * gen_uuid.c (get_random_bytes): Make more paranoid about misbehaving /dev/urandom. If we get a return of zero without an error more than 8 times in a row, we break out and return an error. Also, if /dev/urandom doesn't exist, try /dev/random. 2000-01-18 Theodore Ts'o * Makefile.in: Since LIBUUID can sometimes include "-lsocket" we need a separate DEPLIBUUID that can be used in Makefile's dependency rules. 1999-11-19 * Makefile.in (distclean): Remove TAGS and Makefile.in.old from the source directory. 1999-11-10 * Release of E2fsprogs 1.18 1999-10-26 * Release of E2fsprogs 1.17 1999-10-26 * uuid_time.c (variant_string): Declare to be static to avoid gcc warnings. * uuid.h: Add function prototypes for uuid_generate_random() and uuid_generate_time(). 1999-10-25 * gen_uuid_nt.c (uuid_generate): W2K strikes again! An incompatible interface change means we need to detect whether the code is running on an NT4 or NT5 system. 1999-10-22 * Release of E2fsprogs 1.16 1999-10-21 * uuid_generate.8.in: Update man page to use a more standard format (bold option flags and italicized variables), as suggested by Andreas Dilger (adilger@enel.ucalgary.ca) 1999-09-24 * gen_uuid_nt.c: New file which creates a UUID under Windows NT. 1999-07-18 Theodore Ts'o * Release of E2fsprogs 1.15 1999-05-17 * gen_uuid.c (get_random_bytes): Use a while loop when reading from /dev/urandom so that if we get interrupted while reading the right thing happens. (uuid_generate_random): Add new function which uses the new UUID format which uses 122 random bits to form the 128-bit UUID. (uuid_generate): Rename the old uuid_generate to be uuid_generate_time, and create a new uuid_generate function which calls either uuid_generate_random or uuid_genereate_time depending on whether /dev/urandom is present. * uuid_generate.3.in: Update to reflect changesin uuid_generate and its two new variants. * tst_uuid.c: Updated to test new uuid_generate functions, and to reflect new semantics of uuid_compare. Added tests to make sure the UUID type and variant created by UUID generate is correct. * uuid_time.c (uuid_variant, uuid_type): Added new functions to return the UUID variant and type information. The debugging program now prints the UUID variant and type, and warns if the unparsed time information is likely to be incorrect. * uuid_parse.3.in, libuuid.3.in: Miscellaneous text cleanups. 1999-05-03 * compare.c (uuid_compare): Change sense of uuid_compare so that its return values match that of memcpy and the uuid_compare() found in Paul Leach's internet-draft. 1999-03-11 Andreas Dilger * Created man pages for libuuid functions. 1999-01-09 Theodore Ts'o * Release of E2fsprogs 1.14 1998-12-15 Theodore Ts'o * Release of E2fsprogs 1.13 1998-12-04 Theodore Ts'o * Makefile.in: Update version numbers of the UUID shared library, since we've added a new function (uuid_time()). * uuid_time.c: New file which returns the time field of a UUID. (Good for debugging purposes) 1998-07-09 Theodore Ts'o * Release of E2fsprogs 1.12 1998-06-25 Theodore Ts'o * tst_uuid.c (main): Fixed bogus declaration of the main's argv parameter. 1998-04-26 Theodore Ts'o * uuidP.h: Use asm/types.h instead of linux/types.h to avoid a problem caused by glibc hack to prevent linux/types.h from being included. 1998-03-30 Theodore Ts'o * Makefile.in: Change to use new installation directory variables convention. Fix uninstall rules to take $(DESTDIR) into account. Sun Mar 8 22:17:59 1998 Theodore Ts'o * gen_uuid.c (get_node_id): Use char * instead of caddr_t, which doesn't always exist for glibc. Tue Oct 14 21:48:16 1997 Theodore Ts'o * gen_uuid.c: Use clock_reg instead of clock, since clock conflicts with a header file declaration. Tue Jun 17 01:33:20 1997 Theodore Ts'o * Release of E2fsprogs 1.11 Thu Apr 24 12:16:42 1997 Theodre Ts'o * Release of E2fsprogs version 1.10 Thu Apr 17 12:23:38 1997 Theodore Ts'o * Release of E2fsprogs version 1.09 Fri Apr 11 18:56:26 1997 Theodore Ts'o * Release of E2fsprogs version 1.08 Wed Mar 12 13:32:05 1997 Theodore Y. Ts'o * Release of E2fsprogs version 1.07 Sun Mar 2 16:45:36 1997 Theodore Ts'o * Makefile.in (ELF_VERSION): Change version to be 1.1 Thu Feb 6 23:08:07 1997 Theodore Ts'o * gen_uuid.c (uuid_generate): Set Multicast bit when picking a random node_id, to prevent conflicts with IEEE 802 addresses obtained from network cards. Wed Jan 1 23:51:09 1997 Theodore Ts'o * unpack.c, pack.c: Include string.h, since we use memcpy(). Tue Dec 3 13:05:11 1996 Theodore Ts'o * parse.c: Add #include of ctype.h and stdlib.h, to pull in the required prototypes. Fri Oct 11 17:15:10 1996 Theodore Ts'o * Makefile.in (DLL_ADDRESS): Updated DLL address for libuuid. Tue Oct 8 02:02:03 1996 Theodore Ts'o * Release of E2fsprogs version 1.06 Thu Sep 12 15:23:07 1996 Theodore Ts'o * Release of E2fsprogs version 1.05 Tue Aug 27 16:50:43 1996 Miles Bader * uuid/gen_uuid.c [HAVE_NET_IF_H] : Include guarded. [HAVE_NETINET_IN_H] : Include guarded. (get_node_id): Surround bulk of function with #ifdef HAVE_NET_IF_H. Tue Aug 27 16:50:16 1996 Theodore Ts'o * gen_uuid.c (get_node_id): Add a specific ifdef for the HURD, since it is broken w.r.t getting hardware addresses. xplc-0.3.13/uuid/clear.c0100644000204300020430000000321610326165236015141 0ustar pphaneufpphaneuf/* * clear.c -- Clear a UUID * * Copyright (C) 1996, 1997 Theodore Ts'o. * * %Begin-Header% * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, and the entire permission notice in its entirety, * including the disclaimer of warranties. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * 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, ALL OF * WHICH ARE HEREBY DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE * USE OF THIS SOFTWARE, EVEN IF NOT ADVISED OF THE POSSIBILITY OF SUCH * DAMAGE. * %End-Header% */ #include "string.h" #include "uuidP.h" void uuid_clear(uuid_t uu) { memset(uu, 0, 16); } xplc-0.3.13/uuid/compare.c0100644000204300020430000000417310326165236015504 0ustar pphaneufpphaneuf/* * compare.c --- compare whether or not two UUID's are the same * * Returns 0 if the two UUID's are different, and 1 if they are the same. * * Copyright (C) 1996, 1997 Theodore Ts'o. * * %Begin-Header% * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, and the entire permission notice in its entirety, * including the disclaimer of warranties. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * 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, ALL OF * WHICH ARE HEREBY DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE * USE OF THIS SOFTWARE, EVEN IF NOT ADVISED OF THE POSSIBILITY OF SUCH * DAMAGE. * %End-Header% */ #include "uuidP.h" #include #define UUCMP(u1,u2) if (u1 != u2) return((u1 < u2) ? -1 : 1); int uuid_compare(const uuid_t uu1, const uuid_t uu2) { struct uuid uuid1, uuid2; uuid_unpack(uu1, &uuid1); uuid_unpack(uu2, &uuid2); UUCMP(uuid1.time_low, uuid2.time_low); UUCMP(uuid1.time_mid, uuid2.time_mid); UUCMP(uuid1.time_hi_and_version, uuid2.time_hi_and_version); UUCMP(uuid1.clock_seq, uuid2.clock_seq); return memcmp(uuid1.node, uuid2.node, 6); } xplc-0.3.13/uuid/copy.c0100644000204300020430000000336110326165236015026 0ustar pphaneufpphaneuf/* * copy.c --- copy UUIDs * * Copyright (C) 1996, 1997 Theodore Ts'o. * * %Begin-Header% * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, and the entire permission notice in its entirety, * including the disclaimer of warranties. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * 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, ALL OF * WHICH ARE HEREBY DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE * USE OF THIS SOFTWARE, EVEN IF NOT ADVISED OF THE POSSIBILITY OF SUCH * DAMAGE. * %End-Header% */ #include "uuidP.h" void uuid_copy(uuid_t dst, const uuid_t src) { unsigned char *cp1; const unsigned char *cp2; int i; for (i=0, cp1 = dst, cp2 = src; i < 16; i++) *cp1++ = *cp2++; } xplc-0.3.13/uuid/gen_uuid.c0100644000204300020430000001756310326165236015664 0ustar pphaneufpphaneuf/* * gen_uuid.c --- generate a DCE-compatible uuid * * Copyright (C) 1996, 1997, 1998, 1999 Theodore Ts'o. * Copyright (C) 2005, Net Integration Technologies, Inc. * * %Begin-Header% * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, and the entire permission notice in its entirety, * including the disclaimer of warranties. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * 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, ALL OF * WHICH ARE HEREBY DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE * USE OF THIS SOFTWARE, EVEN IF NOT ADVISED OF THE POSSIBILITY OF SUCH * DAMAGE. * %End-Header% */ #ifndef WIN32 /* * Force inclusion of SVID stuff since we need it if we're compiling in * gcc-wall wall mode */ #define _SVID_SOURCE #ifdef HAVE_UNISTD_H #include #endif #ifdef HAVE_STDLIB_H #include #endif #include #include #include #include #include #include #include #ifdef HAVE_SYS_IOCTL_H #include #endif #ifdef HAVE_SYS_SOCKET_H #include #endif #ifdef HAVE_SYS_SOCKIO_H #include #endif #ifdef HAVE_NET_IF_H #include #endif #ifdef HAVE_NETINET_IN_H #include #endif #ifdef HAVE_NET_IF_DL_H #include #endif #include "uuidP.h" #ifdef HAVE_SRANDOM #define srand(x) srandom(x) #define rand() random() #endif static int get_random_fd(void) { struct timeval tv; static int fd = -2; int i; if (fd == -2) { gettimeofday(&tv, 0); fd = open("/dev/urandom", O_RDONLY); if (fd == -1) fd = open("/dev/random", O_RDONLY | O_NONBLOCK); srand((getpid() << 16) ^ getuid() ^ tv.tv_sec ^ tv.tv_usec); } /* Crank the random number generator a few times */ gettimeofday(&tv, 0); for (i = (tv.tv_sec ^ tv.tv_usec) & 0x1F; i > 0; i--) rand(); return fd; } /* * Generate a series of random bytes. Use /dev/urandom if possible, * and if not, use srandom/random. */ static void get_random_bytes(void *buf, int nbytes) { int i, n = nbytes, fd = get_random_fd(); int lose_counter = 0; unsigned char *cp = (unsigned char *) buf; if (fd >= 0) { while (n > 0) { i = read(fd, cp, n); if (i <= 0) { if (lose_counter++ > 16) break; continue; } n -= i; cp += i; lose_counter = 0; } } /* * We do this all the time, but this is the only source of * randomness if /dev/random/urandom is out to lunch. */ for (cp = buf, i = 0; i < nbytes; i++) *cp++ ^= (rand() >> 7) & 0xFF; return; } /* * Get the ethernet hardware address, if we can find it... */ static int get_node_id(unsigned char *node_id) { #ifdef HAVE_NET_IF_H int sd; struct ifreq ifr, *ifrp; struct ifconf ifc; char buf[1024]; int n, i; unsigned char *a; #ifdef HAVE_NET_IF_DL_H struct sockaddr_dl *sdlp; #endif /* * BSD 4.4 defines the size of an ifreq to be * max(sizeof(ifreq), sizeof(ifreq.ifr_name)+ifreq.ifr_addr.sa_len * However, under earlier systems, sa_len isn't present, so the size is * just sizeof(struct ifreq) */ #ifdef HAVE_SA_LEN #ifndef max #define max(a,b) ((a) > (b) ? (a) : (b)) #endif #define ifreq_size(i) max(sizeof(struct ifreq),\ sizeof((i).ifr_name)+(i).ifr_addr.sa_len) #else #define ifreq_size(i) sizeof(struct ifreq) #endif /* HAVE_SA_LEN*/ sd = socket(AF_INET, SOCK_DGRAM, IPPROTO_IP); if (sd < 0) { return -1; } memset(buf, 0, sizeof(buf)); ifc.ifc_len = sizeof(buf); ifc.ifc_buf = buf; if (ioctl (sd, SIOCGIFCONF, (char *)&ifc) < 0) { close(sd); return -1; } n = ifc.ifc_len; for (i = 0; i < n; i+= ifreq_size(*ifrp) ) { ifrp = (struct ifreq *)((char *) ifc.ifc_buf+i); strncpy(ifr.ifr_name, ifrp->ifr_name, IFNAMSIZ); #ifdef SIOCGIFHWADDR if (ioctl(sd, SIOCGIFHWADDR, &ifr) < 0) continue; a = (unsigned char *) &ifr.ifr_hwaddr.sa_data; #else #ifdef SIOCGENADDR if (ioctl(sd, SIOCGENADDR, &ifr) < 0) continue; a = (unsigned char *) ifr.ifr_enaddr; #else #ifdef HAVE_NET_IF_DL_H sdlp = (struct sockaddr_dl *) &ifrp->ifr_addr; if ((sdlp->sdl_family != AF_LINK) || (sdlp->sdl_alen != 6)) continue; a = (unsigned char *) &sdlp->sdl_data[sdlp->sdl_nlen]; #else /* * XXX we don't have a way of getting the hardware * address */ close(sd); return 0; #endif /* HAVE_NET_IF_DL_H */ #endif /* SIOCGENADDR */ #endif /* SIOCGIFHWADDR */ if (!a[0] && !a[1] && !a[2] && !a[3] && !a[4] && !a[5]) continue; if (node_id) { memcpy(node_id, a, 6); close(sd); return 1; } } close(sd); #endif return 0; } /* Assume that the gettimeofday() has microsecond granularity */ #define MAX_ADJUSTMENT 10 static int get_clock(uint32_t *clock_high, uint32_t *clock_low, uint16_t *ret_clock_seq) { static int adjustment = 0; static struct timeval last = {0, 0}; static uint16_t clock_seq; struct timeval tv; unsigned long long clock_reg; try_again: gettimeofday(&tv, 0); if ((last.tv_sec == 0) && (last.tv_usec == 0)) { get_random_bytes(&clock_seq, sizeof(clock_seq)); clock_seq &= 0x3FFF; last = tv; last.tv_sec--; } if ((tv.tv_sec < last.tv_sec) || ((tv.tv_sec == last.tv_sec) && (tv.tv_usec < last.tv_usec))) { clock_seq = (clock_seq+1) & 0x3FFF; adjustment = 0; last = tv; } else if ((tv.tv_sec == last.tv_sec) && (tv.tv_usec == last.tv_usec)) { if (adjustment >= MAX_ADJUSTMENT) goto try_again; adjustment++; } else { adjustment = 0; last = tv; } clock_reg = tv.tv_usec*10 + adjustment; clock_reg += ((unsigned long long) tv.tv_sec)*10000000; clock_reg += (((unsigned long long) 0x01B21DD2) << 32) + 0x13814000; *clock_high = clock_reg >> 32; *clock_low = clock_reg; *ret_clock_seq = clock_seq; return 0; } void uuid_generate_time(uuid_t out) { static unsigned char node_id[6]; static int has_init = 0; struct uuid uu; uint32_t clock_mid; if (!has_init) { if (get_node_id(node_id) <= 0) { get_random_bytes(node_id, 6); /* * Set multicast bit, to prevent conflicts * with IEEE 802 addresses obtained from * network cards */ node_id[0] |= 0x01; } has_init = 1; } get_clock(&clock_mid, &uu.time_low, &uu.clock_seq); uu.clock_seq |= 0x8000; uu.time_mid = (uint16_t) clock_mid; uu.time_hi_and_version = ((clock_mid >> 16) & 0x0FFF) | 0x1000; memcpy(uu.node, node_id, 6); uuid_pack(&uu, out); } void uuid_generate_random(uuid_t out) { uuid_t buf; struct uuid uu; get_random_bytes(buf, sizeof(buf)); uuid_unpack(buf, &uu); uu.clock_seq = (uu.clock_seq & 0x3FFF) | 0x8000; uu.time_hi_and_version = (uu.time_hi_and_version & 0x0FFF) | 0x4000; uuid_pack(&uu, out); } /* * This is the generic front-end to uuid_generate_random and * uuid_generate_time. It uses uuid_generate_random only if * /dev/urandom is available, since otherwise we won't have * high-quality randomness. */ void uuid_generate(uuid_t out) { if (get_random_fd() >= 0) uuid_generate_random(out); else uuid_generate_time(out); } #endif /* WIN32 */ xplc-0.3.13/uuid/gen_uuid_nt.c0100644000204300020430000000661610326165236016362 0ustar pphaneufpphaneuf/* * gen_uuid_nt.c -- Use NT api to generate uuid * * Written by Andrey Shedel (andreys@ns.cr.cyco.com) * Copyright (C) 2005, Net Integration Technologies, Inc. * * %Begin-Header% * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, and the entire permission notice in its entirety, * including the disclaimer of warranties. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * 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, ALL OF * WHICH ARE HEREBY DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE * USE OF THIS SOFTWARE, EVEN IF NOT ADVISED OF THE POSSIBILITY OF SUCH * DAMAGE. * %End-Header% */ #ifdef WIN32 #include "uuidP.h" #pragma warning(push,4) #pragma comment(lib, "ntdll.lib") // // Here is a nice example why it's not a good idea // to use native API in ordinary applications. // Number of parameters in function below was changed from 3 to 4 // for NT5. // // // NTSYSAPI // NTSTATUS // NTAPI // NtAllocateUuids( // OUT PULONG p1, // OUT PULONG p2, // OUT PULONG p3, // OUT PUCHAR Seed // 6 bytes // ); // // unsigned long __stdcall NtAllocateUuids( void* p1, // 8 bytes void* p2, // 4 bytes void* p3 // 4 bytes ); typedef unsigned long (__stdcall* NtAllocateUuids_2000)( void* p1, // 8 bytes void* p2, // 4 bytes void* p3, // 4 bytes void* seed // 6 bytes ); // // Nice, but instead of including ntddk.h ot winnt.h // I should define it here because they MISSED __stdcall in those headers. // __declspec(dllimport) struct _TEB* __stdcall NtCurrentTeb(void); // // The only way to get version information from the system is to examine // one stored in PEB. But it's pretty dangerouse because this value could // be altered in image header. // static int Nt5(void) { //return NtCuttentTeb()->Peb->OSMajorVersion >= 5; return (int)*(int*)((char*)(int)(*(int*)((char*)NtCurrentTeb() + 0x30)) + 0xA4) >= 5; } /* Use the native Windows UUID generation facilities. */ void uuid_generate(uuid_t out) { if(Nt5()) { unsigned char seed[6]; ((NtAllocateUuids_2000)NtAllocateUuids)(out, ((char*)out)+8, ((char*)out)+12, &seed[0] ); } else { NtAllocateUuids(out, ((char*)out)+8, ((char*)out)+12); } } /* The following two functions exist to provide compatibility. */ void uuid_generate_random(uuid_t out) { uuid_generate(out); } void uuid_generate_time(uuid_t out) { uuid_generate(out); } #endif /* WIN32 */ xplc-0.3.13/uuid/isnull.c0100644000204300020430000000344010326165236015360 0ustar pphaneufpphaneuf/* * isnull.c --- Check whether or not the UUID is null * * Copyright (C) 1996, 1997 Theodore Ts'o. * * %Begin-Header% * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, and the entire permission notice in its entirety, * including the disclaimer of warranties. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * 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, ALL OF * WHICH ARE HEREBY DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE * USE OF THIS SOFTWARE, EVEN IF NOT ADVISED OF THE POSSIBILITY OF SUCH * DAMAGE. * %End-Header% */ #include "uuidP.h" /* Returns 1 if the uuid is the NULL uuid */ int uuid_is_null(const uuid_t uu) { const unsigned char *cp; int i; for (i=0, cp = uu; i < 16; i++) if (*cp++) return 0; return 1; } xplc-0.3.13/uuid/pack.c0100644000204300020430000000431010326165236014765 0ustar pphaneufpphaneuf/* * Internal routine for packing UUID's * * Copyright (C) 1996, 1997 Theodore Ts'o. * * %Begin-Header% * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, and the entire permission notice in its entirety, * including the disclaimer of warranties. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * 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, ALL OF * WHICH ARE HEREBY DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE * USE OF THIS SOFTWARE, EVEN IF NOT ADVISED OF THE POSSIBILITY OF SUCH * DAMAGE. * %End-Header% */ #include #include "uuidP.h" void uuid_pack(const struct uuid *uu, uuid_t ptr) { uint32_t tmp; unsigned char *out = ptr; tmp = uu->time_low; out[3] = (unsigned char) tmp; tmp >>= 8; out[2] = (unsigned char) tmp; tmp >>= 8; out[1] = (unsigned char) tmp; tmp >>= 8; out[0] = (unsigned char) tmp; tmp = uu->time_mid; out[5] = (unsigned char) tmp; tmp >>= 8; out[4] = (unsigned char) tmp; tmp = uu->time_hi_and_version; out[7] = (unsigned char) tmp; tmp >>= 8; out[6] = (unsigned char) tmp; tmp = uu->clock_seq; out[9] = (unsigned char) tmp; tmp >>= 8; out[8] = (unsigned char) tmp; memcpy(out+10, uu->node, 6); } xplc-0.3.13/uuid/parse.c0100644000204300020430000000457010326165236015171 0ustar pphaneufpphaneuf/* * parse.c --- UUID parsing * * Copyright (C) 1996, 1997 Theodore Ts'o. * * %Begin-Header% * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, and the entire permission notice in its entirety, * including the disclaimer of warranties. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * 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, ALL OF * WHICH ARE HEREBY DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE * USE OF THIS SOFTWARE, EVEN IF NOT ADVISED OF THE POSSIBILITY OF SUCH * DAMAGE. * %End-Header% */ #include #include #include #include #include "uuidP.h" int uuid_parse(const char *in, uuid_t uu) { struct uuid uuid; int i; const char *cp; char buf[3]; if (strlen(in) != 36) return -1; for (i=0, cp = in; i <= 36; i++,cp++) { if ((i == 8) || (i == 13) || (i == 18) || (i == 23)) { if (*cp == '-') continue; else return -1; } if (i== 36) if (*cp == 0) continue; if (!isxdigit(*cp)) return -1; } uuid.time_low = strtoul(in, NULL, 16); uuid.time_mid = strtoul(in+9, NULL, 16); uuid.time_hi_and_version = strtoul(in+14, NULL, 16); uuid.clock_seq = strtoul(in+19, NULL, 16); cp = in+24; buf[2] = 0; for (i=0; i < 6; i++) { buf[0] = *cp++; buf[1] = *cp++; uuid.node[i] = strtoul(buf, NULL, 16); } uuid_pack(&uuid, uu); return 0; } xplc-0.3.13/uuid/rules.mk0100644000204300020430000000223710326165236015374 0ustar pphaneufpphaneuf# XPLC - Cross-Platform Lightweight Components # Copyright (C) 2005, Net Integration Technologies, Inc. # # This library is free software; you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as # published by the Free Software Foundation; either version 2.1 of the # License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 # USA # # $Id: rules.mk,v 1.1 2005/10/21 13:18:22 sfllaw Exp $ default: $(UUID_OBJS) $(UUID_BINS) uuid/bin/uuidcdef uuid/libuuid.a: $(patsubst %.c,%.o,$(wildcard uuid/*.c)) uuid/bin/uuidcdef: uuid/bin/uuidgen $(LN_S) $(notdir $<) $@ uuid/bin/%: uuid/bin/%.o $(with_uuid_static) $(LINK.c) $^ $(LOADLIBES) $(LDLIBS) -o $@ uuid/bin/%: LDLIBS+=$(with_uuid) xplc-0.3.13/uuid/unpack.c0100644000204300020430000000405410326165236015335 0ustar pphaneufpphaneuf/* * Internal routine for unpacking UUID * * Copyright (C) 1996, 1997 Theodore Ts'o. * * %Begin-Header% * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, and the entire permission notice in its entirety, * including the disclaimer of warranties. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * 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, ALL OF * WHICH ARE HEREBY DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE * USE OF THIS SOFTWARE, EVEN IF NOT ADVISED OF THE POSSIBILITY OF SUCH * DAMAGE. * %End-Header% */ #include #include "uuidP.h" void uuid_unpack(const uuid_t in, struct uuid *uu) { const uint8_t *ptr = in; uint32_t tmp; tmp = *ptr++; tmp = (tmp << 8) | *ptr++; tmp = (tmp << 8) | *ptr++; tmp = (tmp << 8) | *ptr++; uu->time_low = tmp; tmp = *ptr++; tmp = (tmp << 8) | *ptr++; uu->time_mid = tmp; tmp = *ptr++; tmp = (tmp << 8) | *ptr++; uu->time_hi_and_version = tmp; tmp = *ptr++; tmp = (tmp << 8) | *ptr++; uu->clock_seq = tmp; memcpy(uu->node, ptr, 6); } xplc-0.3.13/uuid/unparse.c0100644000204300020430000000474210326165236015535 0ustar pphaneufpphaneuf/* * unparse.c -- convert a UUID to string * * Copyright (C) 1996, 1997 Theodore Ts'o. * * %Begin-Header% * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, and the entire permission notice in its entirety, * including the disclaimer of warranties. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * 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, ALL OF * WHICH ARE HEREBY DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE * USE OF THIS SOFTWARE, EVEN IF NOT ADVISED OF THE POSSIBILITY OF SUCH * DAMAGE. * %End-Header% */ #include #include "uuidP.h" static const char *fmt_lower = "%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x"; static const char *fmt_upper = "%08X-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X"; #ifdef UUID_UNPARSE_DEFAULT_UPPER #define FMT_DEFAULT fmt_upper #else #define FMT_DEFAULT fmt_lower #endif static void uuid_unparse_x(const uuid_t uu, char *out, const char *fmt) { struct uuid uuid; uuid_unpack(uu, &uuid); sprintf(out, fmt, uuid.time_low, uuid.time_mid, uuid.time_hi_and_version, uuid.clock_seq >> 8, uuid.clock_seq & 0xFF, uuid.node[0], uuid.node[1], uuid.node[2], uuid.node[3], uuid.node[4], uuid.node[5]); } void uuid_unparse_lower(const uuid_t uu, char *out) { uuid_unparse_x(uu, out, fmt_lower); } void uuid_unparse_upper(const uuid_t uu, char *out) { uuid_unparse_x(uu, out, fmt_upper); } void uuid_unparse(const uuid_t uu, char *out) { uuid_unparse_x(uu, out, FMT_DEFAULT); } xplc-0.3.13/uuid/uuid.h0100644000204300020430000000624610326165236015034 0ustar pphaneufpphaneuf/* * Public include file for the UUID library * * Copyright (C) 1996, 1997, 1998 Theodore Ts'o. * * %Begin-Header% * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, and the entire permission notice in its entirety, * including the disclaimer of warranties. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * 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, ALL OF * WHICH ARE HEREBY DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE * USE OF THIS SOFTWARE, EVEN IF NOT ADVISED OF THE POSSIBILITY OF SUCH * DAMAGE. * %End-Header% */ #ifndef _UUID_UUID_H #define _UUID_UUID_H #include #include #include typedef unsigned char uuid_t[16]; /* UUID Variant definitions */ #define UUID_VARIANT_NCS 0 #define UUID_VARIANT_DCE 1 #define UUID_VARIANT_MICROSOFT 2 #define UUID_VARIANT_OTHER 3 /* UUID Type definitions */ #define UUID_TYPE_DCE_TIME 1 #define UUID_TYPE_DCE_RANDOM 4 /* Allow UUID constants to be defined */ #ifdef __GNUC__ #define UUID_DEFINE(name,u0,u1,u2,u3,u4,u5,u6,u7,u8,u9,u10,u11,u12,u13,u14,u15) \ static const uuid_t name __attribute__ ((unused)) = {u0,u1,u2,u3,u4,u5,u6,u7,u8,u9,u10,u11,u12,u13,u14,u15} #else #define UUID_DEFINE(name,u0,u1,u2,u3,u4,u5,u6,u7,u8,u9,u10,u11,u12,u13,u14,u15) \ static const uuid_t name = {u0,u1,u2,u3,u4,u5,u6,u7,u8,u9,u10,u11,u12,u13,u14,u15} #endif #ifdef __cplusplus extern "C" { #endif /* clear.c */ void uuid_clear(uuid_t uu); /* compare.c */ int uuid_compare(const uuid_t uu1, const uuid_t uu2); /* copy.c */ void uuid_copy(uuid_t dst, const uuid_t src); /* gen_uuid.c */ void uuid_generate(uuid_t out); void uuid_generate_random(uuid_t out); void uuid_generate_time(uuid_t out); /* isnull.c */ int uuid_is_null(const uuid_t uu); /* parse.c */ int uuid_parse(const char *in, uuid_t uu); /* unparse.c */ void uuid_unparse(const uuid_t uu, char *out); void uuid_unparse_lower(const uuid_t uu, char *out); void uuid_unparse_upper(const uuid_t uu, char *out); /* uuid_time.c */ time_t uuid_time(const uuid_t uu, struct timeval *ret_tv); int uuid_type(const uuid_t uu); int uuid_variant(const uuid_t uu); #ifdef __cplusplus } #endif #endif /* _UUID_UUID_H */ xplc-0.3.13/uuid/uuidP.h0100644000204300020430000000407310326165236015150 0ustar pphaneufpphaneuf/* * uuid.h -- private header file for uuids * * Copyright (C) 1996, 1997 Theodore Ts'o. * * %Begin-Header% * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, and the entire permission notice in its entirety, * including the disclaimer of warranties. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * 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, ALL OF * WHICH ARE HEREBY DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE * USE OF THIS SOFTWARE, EVEN IF NOT ADVISED OF THE POSSIBILITY OF SUCH * DAMAGE. * %End-Header% */ #ifdef HAVE_INTTYPES_H #include #else #include #endif #include #include "uuid.h" /* * Offset between 15-Oct-1582 and 1-Jan-70 */ #define TIME_OFFSET_HIGH 0x01B21DD2 #define TIME_OFFSET_LOW 0x13814000 struct uuid { uint32_t time_low; uint16_t time_mid; uint16_t time_hi_and_version; uint16_t clock_seq; uint8_t node[6]; }; /* * prototypes */ void uuid_pack(const struct uuid *uu, uuid_t ptr); void uuid_unpack(const uuid_t in, struct uuid *uu); xplc-0.3.13/uuid/uuid_time.c0100644000204300020430000001020710331520307016023 0ustar pphaneufpphaneuf/* * uuid_time.c --- Interpret the time field from a uuid. This program * violates the UUID abstraction barrier by reaching into the guts * of a UUID and interpreting it. * * Copyright (C) 1998, 1999 Theodore Ts'o. * * %Begin-Header% * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, and the entire permission notice in its entirety, * including the disclaimer of warranties. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * 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, ALL OF * WHICH ARE HEREBY DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE * USE OF THIS SOFTWARE, EVEN IF NOT ADVISED OF THE POSSIBILITY OF SUCH * DAMAGE. * %End-Header% */ #include #include #include #include #include #include #include "uuidP.h" time_t uuid_time(const uuid_t uu, struct timeval *ret_tv) { struct uuid uuid; uint32_t high; struct timeval tv; unsigned long long clock_reg; uuid_unpack(uu, &uuid); high = uuid.time_mid | ((uuid.time_hi_and_version & 0xFFF) << 16); clock_reg = uuid.time_low | ((unsigned long long) high << 32); clock_reg -= (((unsigned long long) 0x01B21DD2) << 32) + 0x13814000; tv.tv_sec = clock_reg / 10000000; tv.tv_usec = (clock_reg % 10000000) / 10; if (ret_tv) *ret_tv = tv; return tv.tv_sec; } int uuid_type(const uuid_t uu) { struct uuid uuid; uuid_unpack(uu, &uuid); return ((uuid.time_hi_and_version >> 12) & 0xF); } int uuid_variant(const uuid_t uu) { struct uuid uuid; int var; uuid_unpack(uu, &uuid); var = uuid.clock_seq; if ((var & 0x8000) == 0) return UUID_VARIANT_NCS; if ((var & 0x4000) == 0) return UUID_VARIANT_DCE; if ((var & 0x2000) == 0) return UUID_VARIANT_MICROSOFT; return UUID_VARIANT_OTHER; } #if 0 #ifdef DEBUG static const char *variant_string(int variant) { switch (variant) { case UUID_VARIANT_NCS: return "NCS"; case UUID_VARIANT_DCE: return "DCE"; case UUID_VARIANT_MICROSOFT: return "Microsoft"; default: return "Other"; } } int main(int argc, char **argv) { uuid_t buf; time_t time_reg; struct timeval tv; int type, variant; if (argc != 2) { fprintf(stderr, "Usage: %s uuid\n", argv[0]); exit(1); } if (uuid_parse(argv[1], buf)) { fprintf(stderr, "Invalid UUID: %s\n", argv[1]); exit(1); } variant = uuid_variant(buf); type = uuid_type(buf); time_reg = uuid_time(buf, &tv); printf("UUID variant is %d (%s)\n", variant, variant_string(variant)); if (variant != UUID_VARIANT_DCE) { printf("Warning: This program only knows how to interpret " "DCE UUIDs.\n\tThe rest of the output is likely " "to be incorrect!!\n"); } printf("UUID type is %d", type); switch (type) { case 1: printf(" (time based)\n"); break; case 2: printf(" (DCE)\n"); break; case 3: printf(" (name-based)\n"); break; case 4: printf(" (random)\n"); break; default: printf("\n"); } if (type != 1) { printf("Warning: not a time-based UUID, so UUID time " "decoding will likely not work!\n"); } printf("UUID time is: (%ld, %ld): %s\n", tv.tv_sec, tv.tv_usec, ctime(&time_reg)); return 0; } #endif #endif xplc-0.3.13/uuid/uuid_types.h.in0100644000204300020430000000223210326165236016654 0ustar pphaneufpphaneuf/* * If linux/types.h is already been included, assume it has defined * everything we need. (cross fingers) Other header files may have * also defined the types that we need. */ #if (!defined(_STDINT_H) && !defined(_UUID_STDINT_H)) #define _UUID_STDINT_H typedef unsigned char uint8_t; typedef signed char int8_t; #if (@SIZEOF_INT@ == 8) typedef int int64_t; typedef unsigned int uint64_t; #elif (@SIZEOF_LONG@ == 8) typedef long int64_t; typedef unsigned long uint64_t; #elif (@SIZEOF_LONG_LONG@ == 8) #if defined(__GNUC__) typedef __signed__ long long int64_t; #else typedef signed long long int64_t; #endif typedef unsigned long long uint64_t; #endif #if (@SIZEOF_INT@ == 2) typedef int int16_t; typedef unsigned int uint16_t; #elif (@SIZEOF_SHORT@ == 2) typedef short int16_t; typedef unsigned short uint16_t; #else ?==error: undefined 16 bit type #endif #if (@SIZEOF_INT@ == 4) typedef int int32_t; typedef unsigned int uint32_t; #elif (@SIZEOF_LONG@ == 4) typedef long int32_t; typedef unsigned long uint32_t; #elif (@SIZEOF_SHORT@ == 4) typedef short int32_t; typedef unsigned short uint32_t; #else ?== error: undefined 32 bit type #endif #endif xplc-0.3.13/uuid/vars.mk0100644000204300020430000000213610326165236015213 0ustar pphaneufpphaneuf# XPLC - Cross-Platform Lightweight Components # Copyright (C) 2005, Net Integration Technologies, Inc. # # This library is free software; you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as # published by the Free Software Foundation; either version 2.1 of the # License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 # USA # # $Id: vars.mk,v 1.1 2005/10/21 13:18:22 sfllaw Exp $ UUID_BINS=uuid/bin/uuidgen uuid/bin/tst_uuid UUID_OBJS=$(addsuffix .o,$(UUID_BINS)) CLEAN+=$(UUID_BINS) $(UUID_OBJS) uuid/bin/uuidcdef uuid/libuuid.a DISTCLEAN+=uuid/uuid_types.h uuid/%.o: CFLAGS+=-I. -include include/autoconf.h xplc-0.3.13/install-sh0100755000204300020430000001273607044160713014752 0ustar pphaneufpphaneuf#!/bin/sh # # install - install a program, script, or datafile # This comes from X11R5 (mit/util/scripts/install.sh). # # Copyright 1991 by the Massachusetts Institute of Technology # # Permission to use, copy, modify, distribute, and sell this software and its # documentation for any purpose is hereby granted without fee, provided that # the above copyright notice appear in all copies and that both that # copyright notice and this permission notice appear in supporting # documentation, and that the name of M.I.T. not be used in advertising or # publicity pertaining to distribution of the software without specific, # written prior permission. M.I.T. makes no representations about the # suitability of this software for any purpose. It is provided "as is" # without express or implied warranty. # # Calling this script install-sh is preferred over install.sh, to prevent # `make' implicit rules from creating a file called install from it # when there is no Makefile. # # This script is compatible with the BSD install script, but was written # from scratch. It can only install one file at a time, a restriction # shared with many OS's install programs. # set DOITPROG to echo to test this script # Don't use :- since 4.3BSD and earlier shells don't like it. doit="${DOITPROG-}" # put in absolute paths if you don't have them in your path; or use env. vars. mvprog="${MVPROG-mv}" cpprog="${CPPROG-cp}" chmodprog="${CHMODPROG-chmod}" chownprog="${CHOWNPROG-chown}" chgrpprog="${CHGRPPROG-chgrp}" stripprog="${STRIPPROG-strip}" rmprog="${RMPROG-rm}" mkdirprog="${MKDIRPROG-mkdir}" transformbasename="" transform_arg="" instcmd="$mvprog" chmodcmd="$chmodprog 0755" chowncmd="" chgrpcmd="" stripcmd="" rmcmd="$rmprog -f" mvcmd="$mvprog" src="" dst="" dir_arg="" while [ x"$1" != x ]; do case $1 in -c) instcmd="$cpprog" shift continue;; -d) dir_arg=true shift continue;; -m) chmodcmd="$chmodprog $2" shift shift continue;; -o) chowncmd="$chownprog $2" shift shift continue;; -g) chgrpcmd="$chgrpprog $2" shift shift continue;; -s) stripcmd="$stripprog" shift continue;; -t=*) transformarg=`echo $1 | sed 's/-t=//'` shift continue;; -b=*) transformbasename=`echo $1 | sed 's/-b=//'` shift continue;; *) if [ x"$src" = x ] then src=$1 else # this colon is to work around a 386BSD /bin/sh bug : dst=$1 fi shift continue;; esac done if [ x"$src" = x ] then echo "install: no input file specified" exit 1 else true fi if [ x"$dir_arg" != x ]; then dst=$src src="" if [ -d $dst ]; then instcmd=: chmodcmd="" else instcmd=mkdir fi else # Waiting for this to be detected by the "$instcmd $src $dsttmp" command # might cause directories to be created, which would be especially bad # if $src (and thus $dsttmp) contains '*'. if [ -f $src -o -d $src ] then true else echo "install: $src does not exist" exit 1 fi if [ x"$dst" = x ] then echo "install: no destination specified" exit 1 else true fi # If destination is a directory, append the input filename; if your system # does not like double slashes in filenames, you may need to add some logic if [ -d $dst ] then dst="$dst"/`basename $src` else true fi fi ## this sed command emulates the dirname command dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'` # Make sure that the destination directory exists. # this part is taken from Noah Friedman's mkinstalldirs script # Skip lots of stat calls in the usual case. if [ ! -d "$dstdir" ]; then defaultIFS=' ' IFS="${IFS-${defaultIFS}}" oIFS="${IFS}" # Some sh's can't handle IFS=/ for some reason. IFS='%' set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'` IFS="${oIFS}" pathcomp='' while [ $# -ne 0 ] ; do pathcomp="${pathcomp}${1}" shift if [ ! -d "${pathcomp}" ] ; then $mkdirprog "${pathcomp}" else true fi pathcomp="${pathcomp}/" done fi if [ x"$dir_arg" != x ] then $doit $instcmd $dst && if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi && if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi && if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi && if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi else # If we're going to rename the final executable, determine the name now. if [ x"$transformarg" = x ] then dstfile=`basename $dst` else dstfile=`basename $dst $transformbasename | sed $transformarg`$transformbasename fi # don't allow the sed command to completely eliminate the filename if [ x"$dstfile" = x ] then dstfile=`basename $dst` else true fi # Make a temp file name in the proper directory. dsttmp=$dstdir/#inst.$$# # Move or copy the file name to the temp name $doit $instcmd $src $dsttmp && trap "rm -f ${dsttmp}" 0 && # and set any options; do chmod last to preserve setuid bits # If any of these fail, we abort the whole thing. If we want to # ignore errors from any of these, just make sure not to ignore # errors from the above "$doit $instcmd $src $dsttmp" command. if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi && if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi && if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi && if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi && # Now rename the file to the real destination. $doit $rmcmd -f $dstdir/$dstfile && $doit $mvcmd $dsttmp $dstdir/$dstfile fi && exit 0 xplc-0.3.13/examples/0040755000204300020430000000000010225606553014560 5ustar pphaneufpphaneufxplc-0.3.13/examples/CVS/0040755000204300020430000000000010130702757015211 5ustar pphaneufpphaneufxplc-0.3.13/examples/CVS/Root0100644000204300020430000000006510331536343016054 0ustar pphaneufpphaneuf:pserver:anonymous@cvs.sourceforge.net:/cvsroot/xplc xplc-0.3.13/examples/CVS/Repository0100644000204300020430000000001610130702756017304 0ustar pphaneufpphaneufxplc/examples xplc-0.3.13/examples/CVS/Entries0100644000204300020430000000012610130702757016541 0ustar pphaneufpphaneuf/Makefile/1.3/Thu Jul 1 20:35:52 2004// D/simple-module//// D/simple-module-user//// xplc-0.3.13/examples/simple-module/0040755000204300020430000000000010331536343017331 5ustar pphaneufpphaneufxplc-0.3.13/examples/simple-module/CVS/0040755000204300020430000000000010225606752017770 5ustar pphaneufpphaneufxplc-0.3.13/examples/simple-module/CVS/Root0100644000204300020430000000006510331536343020630 0ustar pphaneufpphaneuf:pserver:anonymous@cvs.sourceforge.net:/cvsroot/xplc xplc-0.3.13/examples/simple-module/CVS/Repository0100644000204300020430000000003410130702756022060 0ustar pphaneufpphaneufxplc/examples/simple-module xplc-0.3.13/examples/simple-module/CVS/Entries0100644000204300020430000000045410225606752021324 0ustar pphaneufpphaneuf/IExample.h/1.3/Thu Jul 1 20:35:52 2004// /Makefile.in/1.1/Wed Oct 6 05:40:29 2004// /module.h/1.2/Thu Jul 1 20:35:52 2004// /simple.cpp/1.2/Thu Jul 1 20:35:52 2004// /simple.h/1.3/Thu Jul 1 20:35:52 2004// /.cvsignore/1.1/Wed Oct 6 05:43:31 2004// /module.cpp/1.4/Fri Apr 8 22:55:04 2005// D xplc-0.3.13/examples/simple-module/Makefile0100644000204300020430000000102510331536067020767 0ustar pphaneufpphaneuf# This file is example code for XPLC (http://xplc.sourceforge.net/), # and is put into the public domain. .PHONY: default clean # the UNSTABLE flag is there because we agree to use interfaces that # have not been frozen yet. CPPFLAGS+=-DUNSTABLE $(shell pkg-config xplc-0.3.13 --cflags) LDFLAGS+=$(shell pkg-config xplc-0.3.13 --libs-only-L) default: example.so clean: rm -f example.so *~ *.o %.so: $(LINK.cc) -shared $^ -lxplc-cxx -o $@ example.so: $(patsubst %.cpp,%.o,$(wildcard *.cpp)) $(wildcard *.o): $(wildcard *.h) xplc-0.3.13/examples/simple-module/IExample.h0100644000204300020430000000507010071072650021202 0ustar pphaneufpphaneuf/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- * * This file is example code for XPLC (http://xplc.sourceforge.net/), * and is put into the public domain. */ #ifndef __EXAMPLE_EXAMPLE_H__ #define __EXAMPLE_EXAMPLE_H__ #include /* Interfaces can only derive from exactly one interface. They must * ultimately be derived from IObject. Since we do not derive from * anything else useful here, we derive from IObject directly. */ class IExample: public IObject { /* This is to indicate that this interface has not been released in * a final version, and is subject to disappear or be changed. When * you use an interface marked in this manner, you have to indicate * your acceptance of this unstable condition by defining the * UNSTABLE pre-processor symbol (see the Makefile). * * Once this marker is removed, an interface cannot be changed ever * again, neither in syntax (adding/removing methods) or in * semantics (changing the meaning of methods). * * You are allowed to change the name of the interface, if you want, * because the real identifier of the interface is the IID (defined * at the bottom). For example, you might create a new version of * the interface someday and rename this one to IExampleOld. * * This is how you can have progress in XPLC: instead of changing * existing interfaces, you create new ones. A new version of * IExample could derive from IExampleOld, if you only wanted to add * some methods, thus making it easy to stay compatible (any code * that wanted an IExampleOld will work with the new IExample). */ UNSTABLE_INTERFACE public: /* Here are some of the most important rules for an XPLC interface: * * - It can only have public members. * - Non-method members are not allowed (you cannot have variables). * - All methods must be pure virtual. */ virtual void sayHello() = 0; }; /* These numbers are obtained using "uuidgen" or "guidgen.exe". The * "uuid2cdef.pl" script can be used to fix the formatting of the * "uuidgen" program. * * This is the ultimate identifier for this interface. Changing either * the syntax or the semantics of an interface without changing this * identifier would be Bad. * * "IID" stands for "Interface ID". This is a normal UUID, there is * nothing different except the name, but it helps to have some * context when discussing or documenting things. */ DEFINE_IID(IExample, {0x86c3a2d0, 0xe19b, 0x49d0, {0xb2, 0x84, 0x67, 0xc1, 0x11, 0x4a, 0x9d, 0x79}}); #endif /* __EXAMPLE_EXAMPLE_H__ */ xplc-0.3.13/examples/simple-module/Makefile.in0100644000204300020430000000105310130702515021363 0ustar pphaneufpphaneuf# This file is example code for XPLC (http://xplc.sourceforge.net/), # and is put into the public domain. .PHONY: default clean # the UNSTABLE flag is there because we agree to use interfaces that # have not been frozen yet. CPPFLAGS+=-DUNSTABLE $(shell pkg-config xplc-@PACKAGE_VERSION@ --cflags) LDFLAGS+=$(shell pkg-config xplc-@PACKAGE_VERSION@ --libs-only-L) default: example.so clean: rm -f example.so *~ *.o %.so: $(LINK.cc) -shared $^ -lxplc-cxx -o $@ example.so: $(patsubst %.cpp,%.o,$(wildcard *.cpp)) $(wildcard *.o): $(wildcard *.h) xplc-0.3.13/examples/simple-module/module.cpp0100644000204300020430000000150510225605710021315 0ustar pphaneufpphaneuf/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- * * This file is example code for XPLC (http://xplc.sourceforge.net/), * and is put into the public domain. */ #include #include "module.h" /* This is the list of UUIDs that this module can provide objects for, * along with a pointer to the function that will provide it. This * * example has only one component, but there is no restriction on how * many components can a single module have (you do not have to put * one component per module). */ static const XPLC_ComponentEntry components[] = { { SimpleComponent_CID, &getSimpleComponent }, { UUID_null, 0 } }; const XPLC_ModuleInfo XPLC_Module = { XPLC_MODULE_MAGIC, XPLC_MODULE_VERSION_MAJOR, XPLC_MODULE_VERSION_MINOR, "Simple Example Module", components, 0 }; xplc-0.3.13/examples/simple-module/module.h0100644000204300020430000000112510071072650020760 0ustar pphaneufpphaneuf/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- * * This file is example code for XPLC (http://xplc.sourceforge.net/), * and is put into the public domain. */ #ifndef __EXAMPLE_MODULE_H__ #define __EXAMPLE_MODULE_H__ #include "simple.h" /* * This is private to the module. * * The content of this file is completely internal to the module, it * is only used to share this prototype between simple.cpp and * module.cpp. Client code using this component do not need this file * at all. */ IObject* getSimpleComponent(); #endif /* __EXAMPLE_MODULE_H__ */ xplc-0.3.13/examples/simple-module/simple.cpp0100644000204300020430000000120410071072650021315 0ustar pphaneufpphaneuf/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- * * This file is example code for XPLC (http://xplc.sourceforge.net/), * and is put into the public domain. */ #include #include #include "IExample.h" #include "simple.h" class SimpleComponent: public IExample { IMPLEMENT_IOBJECT(SimpleComponent); public: virtual void sayHello(); }; UUID_MAP_BEGIN(SimpleComponent) UUID_MAP_ENTRY(IObject) UUID_MAP_ENTRY(IExample) UUID_MAP_END IObject* getSimpleComponent() { return new SimpleComponent; } void SimpleComponent::sayHello() { printf("hello from SimpleComponent!\n"); } xplc-0.3.13/examples/simple-module/simple.h0100644000204300020430000000154610071072650020773 0ustar pphaneufpphaneuf/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- * * This file is example code for XPLC (http://xplc.sourceforge.net/), * and is put into the public domain. */ #ifndef __EXAMPLE_SIMPLE_H__ #define __EXAMPLE_SIMPLE_H__ /* * This file should be available to client code. * * This is a "well-known" UUID that is used to get the component. We * say "well-known", because the assumption is that client code will * already know this, somehow (by including this file, for example). * * The "CID" suffix stands for "Component ID". This is a normal UUID, * there is nothing different except the name, but it helps to have * some context when discussing or documenting things. */ static const UUID SimpleComponent_CID = {0x71c4067f, 0xaaa4, 0x4e6c, {0xa7, 0x07, 0x14, 0x38, 0xeb, 0x04, 0xb0, 0x7d}}; #endif /* __EXAMPLE_SIMPLE_H__ */ xplc-0.3.13/examples/simple-module/.cvsignore0100644000204300020430000000001110130703003021300 0ustar pphaneufpphaneufMakefile xplc-0.3.13/examples/Makefile0100644000204300020430000000067210071072650016214 0ustar pphaneufpphaneuf# This file is example code for XPLC (http://xplc.sourceforge.net/), # and is put into the public domain. SUBDIRS=$(patsubst %/Makefile,%,$(wildcard */Makefile)) .PHONY: default clean $(SUBDIRS) default: $(SUBDIRS) clean: $(SUBDIRS) simple-module-user: simple-module # This is so that the example builds from within the XPLC package. export CPPFLAGS+=-I../../include export LDFLAGS+=-L../.. $(SUBDIRS): $(MAKE) -C $@ $(MAKECMDGOALS) xplc-0.3.13/examples/simple-module-user/0040755000204300020430000000000010331536343020305 5ustar pphaneufpphaneufxplc-0.3.13/examples/simple-module-user/CVS/0040755000204300020430000000000010130703143020727 5ustar pphaneufpphaneufxplc-0.3.13/examples/simple-module-user/CVS/Root0100644000204300020430000000006510331536343021604 0ustar pphaneufpphaneuf:pserver:anonymous@cvs.sourceforge.net:/cvsroot/xplc xplc-0.3.13/examples/simple-module-user/CVS/Repository0100644000204300020430000000004110130702756023032 0ustar pphaneufpphaneufxplc/examples/simple-module-user xplc-0.3.13/examples/simple-module-user/CVS/Entries0100644000204300020430000000020410130703143022254 0ustar pphaneufpphaneuf/Makefile.in/1.1/Wed Oct 6 05:40:29 2004// /simple.cpp/1.3/Thu Jul 1 20:49:34 2004// /.cvsignore/1.2/Wed Oct 6 05:44:06 2004// D xplc-0.3.13/examples/simple-module-user/Makefile0100644000204300020430000000105410331536067021745 0ustar pphaneufpphaneuf# This file is example code for XPLC (http://xplc.sourceforge.net/), # and is put into the public domain. .PHONY: default clean # the UNSTABLE flag is there because we agree to use interfaces that # have not been frozen yet. CPPFLAGS+=-DUNSTABLE -I../simple-module $(shell pkg-config xplc-0.3.13 --cflags) LDFLAGS+=$(shell pkg-config xplc-0.3.13 --libs-only-L) default: example clean: rm -f example *~ *.o example: $(patsubst %.cpp,%.o,$(wildcard *.cpp)) $(LINK.cc) $^ -lxplc -lxplc-cxx -o $@ $(wildcard *.o): $(wildcard *.h ../simple-module/*.h) xplc-0.3.13/examples/simple-module-user/.cvsignore0100644000204300020430000000002110130703046022264 0ustar pphaneufpphaneufexample Makefile xplc-0.3.13/examples/simple-module-user/Makefile.in0100644000204300020430000000110210130702515022332 0ustar pphaneufpphaneuf# This file is example code for XPLC (http://xplc.sourceforge.net/), # and is put into the public domain. .PHONY: default clean # the UNSTABLE flag is there because we agree to use interfaces that # have not been frozen yet. CPPFLAGS+=-DUNSTABLE -I../simple-module $(shell pkg-config xplc-@PACKAGE_VERSION@ --cflags) LDFLAGS+=$(shell pkg-config xplc-@PACKAGE_VERSION@ --libs-only-L) default: example clean: rm -f example *~ *.o example: $(patsubst %.cpp,%.o,$(wildcard *.cpp)) $(LINK.cc) $^ -lxplc -lxplc-cxx -o $@ $(wildcard *.o): $(wildcard *.h ../simple-module/*.h) xplc-0.3.13/examples/simple-module-user/simple.cpp0100644000204300020430000000230210071074336022274 0ustar pphaneufpphaneuf/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- * * This file is example code for XPLC (http://xplc.sourceforge.net/), * and is put into the public domain. */ #include #include #include "IExample.h" #include "simple.h" /* * This is an helper class from the C++ binding. While it is not XPLC * itself (despite the name), it makes XPLC itself easier to use in * C++. * * It should live at least as long as you intend to use XPLC, as it * keeps it alive. * * Although this wastes a tiny bit of space, it is allowed to have * more than one XPLC helper object in a single process, since XPLC * uses reference counting. This is useful for libraries, which can * create their own XPLC helper object, and if the main application * also uses XPLC, or if another library used by the application uses * XPLC (even if the application doesn't!), they will be able to * cooperate through XPLC. */ XPLC xplc; int main() { xplc.addModuleDirectory("../simple-module"); xplc_ptr example(xplc.get(SimpleComponent_CID)); if (example) { example->sayHello(); } else { printf("SimpleComponent not found\n"); } return 0; } xplc-0.3.13/uuid2cdef.pl0100755000204300020430000000051307557345123015157 0ustar pphaneufpphaneuf#! /usr/bin/perl -w use strict; while(<>) { s/{?([0-9A-Fa-f]{8})-([0-9A-Fa-f]{4})-([0-9A-Fa-f]{4})-([0-9A-Fa-f]{2})([0-9A-Fa-f]{2})-([0-9A-Fa-f]{2})([0-9A-Fa-f]{2})([0-9A-Fa-f]{2})([0-9A-Fa-f]{2})([0-9A-Fa-f]{2})([0-9A-Fa-f]{2})}?/{0x$1, 0x$2, 0x$3, {0x$4, 0x$5, 0x$6, 0x$7, 0x$8, 0x$9, 0x$10, 0x$11}}/; } continue { print; } xplc-0.3.13/xplc.spec0100644000204300020430000000446110331536343014563 0ustar pphaneufpphaneufName: xplc Version: 0.3.13 Release: 1 Summary: Cross-platform lightweight component system Group: System Environment/Libraries License: LGPL Source: xplc-%{version}.tar.gz URL: http://xplc.sourceforge.net/ Prefix: /usr BuildRoot: %{_tmppath}/%{name}-root Requires: /sbin/ldconfig %package devel Summary: Cross-platform lightweight component system (development) Group: Development/Libraries Requires: xplc = %{version} %package uuidgen Summary: Cross-platform lightweight component system (uuidgen) Group: Development/Libraries %package doc Summary: Cross-platform lightweight component system (documentation) Group: Development/Libraries %description XPLC (cross-platform lightweight components) is a component system that provide extensibility and reusability both inside and between applications, being portable across platforms and languages, easy to use and having the lowest possible overhead. %description devel This is the parts of XPLC needed for development. %description uuidgen This is a UUID generator. It is not strictly needed, as there are other tools available to generate UUIDs. %description doc This package contains documentation and examples for XPLC. %prep %setup -q %build %configure make make tests %install rm -rf %{buildroot} %makeinstall rm -rf $(find examples -name CVS -type d -o -name .cvsignore) %clean rm -rf %{buildroot} %post -p /sbin/ldconfig %postun -p /sbin/ldconfig %files %defattr(-,root,root) /usr/lib/libxplc.so.%{version} %files devel %defattr(-,root,root) /usr/include/xplc-%{version} /usr/lib/xplc-%{version} /usr/lib/pkgconfig/xplc-%{version}.pc %files uuidgen %defattr(-,root,root) /usr/bin/uuidgen %doc /usr/share/man/man1/uuidgen.1.gz %files doc %defattr(-,root,root) %doc README CREDITS NEWS LICENSE ChangeLog %doc examples %changelog * Wed Oct 6 2004 Pierre Phaneuf - Updated for the new parallel installation support. * Wed Apr 7 2004 Pierre Phaneuf - Fixed the ownership of the documentation files. - Runs the unit tests while packaging. * Fri Jan 17 2003 Pierre Phaneuf - Minor fix to the permission of the header files. * Sat Nov 30 2002 Pierre Phaneuf - Added libxplc-cxx.a to the devel package. * Fri Sep 27 2002 Pierre Phaneuf - Initial RPM release. xplc-0.3.13/ChangeLog0100644000204300020430000026244410331536343014522 0ustar pphaneufpphaneuf2005-10-31 23:19 Pierre Phaneuf * NEWS, configure.ac: Updated the version numbers and the NEWS file. 2005-10-31 23:19 Pierre Phaneuf * uuid/uuid_time.c: Some debug code in the uuid directory doesn't build when --enable-debug is used. 2005-10-26 19:19 Simon Law * configure.ac, config/config.mk.in: Get XPLC building on FreeBSD 4.11. 2005-10-24 14:27 Simon Law * debian/copyright: Update copyright information. 2005-10-21 16:23 Simon Law * debian/: .cvsignore, changelog, control.in, rules, uuidcdef.install, uuidcdef.manpages: Add a uuidcdef package. 2005-10-21 16:22 Simon Law * config.guess, config.sub: Update with new autoconf host guessing. 2005-10-21 16:19 Simon Law * uuid/bin/uuidgen.c: Bug report address. 2005-10-21 15:00 Simon Law * config/rules.mk: Manpages go in man1. 2005-10-21 14:56 Simon Law * config/config.mk.in, config/rules.mk, uuid/bin/uuidgen.1: Add a manpage for uuidgen. 2005-10-21 14:18 Simon Law * uuid/bin/uuidgen.c: New FSF address. 2005-10-21 14:17 Simon Law * uuid/bin/uuidgen.c: Fix whitespace. 2005-10-21 13:18 Simon Law * configure.ac, config/config.mk.in, config/rules.mk, uuid/.cvsignore, uuid/COPYING, uuid/ChangeLog, uuid/clear.c, uuid/compare.c, uuid/copy.c, uuid/gen_uuid.c, uuid/gen_uuid_nt.c, uuid/isnull.c, uuid/pack.c, uuid/parse.c, uuid/rules.mk, uuid/unpack.c, uuid/unparse.c, uuid/uuid.h, uuid/uuidP.h, uuid/uuid_time.c, uuid/uuid_types.h.in, uuid/vars.mk, uuid/bin/.cvsignore, uuid/bin/tst_uuid.c, uuid/bin/uuidgen.c: Add a UUID generation program that also spits out XPLC C definitions. This is supposed to be quite portable, so I've only used what POSIX gives us. http://bugs.debian.org/310755 2005-10-21 13:08 Simon Law * config/vars.mk: make distclean now removes include/autoconf.h 2005-10-21 13:03 Simon Law * configure.ac, config/config.mk.in, config/rules.mk, dist/xplc.pc.in: Properly handle the versioned include directory, which we never did correctly before. 2005-10-18 21:08 Simon Law * include/xplc/: ICategory.h, ICategoryIterator.h, ICategoryManager.h, IFactory.h, IModule.h, IModuleLoader.h, IModuleManagerFactory.h, IMoniker.h, IMonikerService.h, IObject.h, IServiceHandler.h, IServiceManager.h, IStaticServiceHandler.h, IWeakRef.h, delete.h, factory.h, module.h, ptr.h, trace.h, utils.h, uuid.h, uuidops.h, xplc.h: Now get this to compile without warnings in GCC 2.95. 2005-10-18 20:35 Simon Law * include/xplc/: ICategory.h, ICategoryIterator.h, ICategoryManager.h, IFactory.h, IModule.h, IModuleLoader.h, IModuleManagerFactory.h, IMoniker.h, IMonikerService.h, IObject.h, IServiceHandler.h, IServiceManager.h, IStaticServiceHandler.h, IWeakRef.h, delete.h, factory.h, module.h, ptr.h, trace.h, utils.h, uuid.h, uuidops.h, xplc.h: Suppress warnings about non-virtual destructors in G++ 4 and up, by making XPLC headers considered system headers. 2005-10-18 20:11 Simon Law * config/rules.mk: Install the header files in a versioned location as well, since XPLC's API has not stabilised either. 2005-07-19 22:26 Pierre Phaneuf * NEWS, configure.ac: Updated the version numbers and the NEWS file. 2005-07-06 18:11 Simon Law * Makefile, debian/changelog, debian/control.in, dist/pkg-config: Remove build-depends on pkg-config. 2005-07-06 17:32 Simon Law * debian/changelog: Update changelog in preparation for the new XPLC 0.3.12 release. 2005-07-06 17:30 Simon Law * debian/control.in: Apparently, we need pkg-config now. 2005-04-24 23:33 Pierre Phaneuf * include/xplc/module.h, tests/test010.cpp, tests/testobj.cpp, tests/testobj.h, xplc/moduleloader.cpp: Added registration of the category information contained in modules. Added unit testing accordingly. 2005-04-12 01:53 Pierre Phaneuf * tests/: testobj.cpp, testobj.h: Added membership in a category to the test module. 2005-04-08 23:04 Pierre Phaneuf * examples/simple-module/module.cpp, include/xplc/module.h, tests/testobj.cpp, xplc/moduleloader.cpp: Removed the loadModule/unloadModule function pointers and added a list of categories to XPLC_ModuleInfo (currently unused). 2005-04-08 22:50 Pierre Phaneuf * debian/: changelog, rules: Applied updates to the Debian packaging. 2005-04-08 22:46 Pierre Phaneuf * xplc/: moduleloader.cpp, moduleloader.h: Make it possible to use the Module class internally for non-dynamically loaded modules. 2005-03-09 20:03 Pierre Phaneuf * configure.ac: Moved the warning message about the unstable API in the configure script to the end, where it can be actually noticed. 2005-02-10 07:13 Pierre Phaneuf * include/xplc/ICategoryManager.h, xplc/catmgr.cpp, xplc/catmgr.h: Removed the unimplemented support of ICategoryManager for IServiceHandler. It's a good idea, though, but it'll return when it's needed (YAGNI, again) and with unit tests coverage to go with it. 2005-02-10 07:00 Pierre Phaneuf * include/xplc/ICategoryIterator.h, include/xplc/ICategoryManager.h, tests/test010.cpp, xplc/categorynode.h, xplc/catiter.cpp, xplc/catiter.h, xplc/catmgr.cpp, xplc/catmgr.h: Added an optional string that will be kept with a category registration. 2005-02-10 06:51 Pierre Phaneuf * include/xplc/ICategory.h, xplc/category.cpp, xplc/category.h: Applied YAGNI and removed the gunk about ICategory possibly deriving from IFactory. Will be redone in time, if deemed necessary. 2005-02-04 16:59 Pierre Phaneuf * debian/changelog: Fixed the version number of the Debian package according to the wishes of the maintainer (Simon Law). 2005-02-04 16:12 Pierre Phaneuf * NEWS, configure.ac, debian/changelog: Updated the version numbers and the NEWS file. 2005-01-06 00:08 Pierre Phaneuf * include/xplc/uuid.h, include/xplc/uuidops.h, tests/test007.cpp, xplc-cxx/uuidtostr.cpp: Fixed AMD64 portability issue. 2005-01-05 23:21 Pierre Phaneuf * tests/rules.mk: You can pass a TESTS variable containing the space separated list of tests to run to the "make tests" target. 2004-12-31 08:56 Pierre Phaneuf * tests/testmain.cpp: Some improvements of the test framework. 2004-12-02 13:22 Simon Law * debian/: changelog, control.in: XPLC should Build-Depend on debhelper. 2004-11-18 07:37 Simon Law * debian/changelog: Let people build their own unofficial Debian builds of xplc. 2004-11-18 07:36 Simon Law * debian/changelog: Note the bug number of xplc's Debian ITP. 2004-10-07 19:42 Simon Law * debian/: changelog, libxplc-dev.examples, rules: Add the examples directory to libxplc-dev. 2004-10-07 16:53 Simon Law * config/vars.mk: Remove debian/control as part of `make realclean` 2004-10-07 16:38 Simon Law * config/vars.mk: Prevent debian/control from getting cleaned. 2004-10-07 03:17 Simon Law * debian/.cvsignore: Add debian/control to .cvsignore, since it's now autogenerated. 2004-10-07 03:17 Simon Law * configure.ac, config/config.mk.in, config/rules.mk: Use AC_PROG_LN_S to determine what 'ln -s' is, on the current system. 2004-10-06 23:25 Simon Law * config/rules.mk: Generate debian/control from debian/control.in 2004-10-06 05:45 Pierre Phaneuf * examples/: simple-module/.cvsignore, simple-module-user/.cvsignore: Updated some .cvsignore files. 2004-10-06 05:40 Pierre Phaneuf * configure.ac, examples/simple-module/Makefile, examples/simple-module/Makefile.in, examples/simple-module-user/Makefile, examples/simple-module-user/Makefile.in: Improved the examples' makefiles to try and use pkgconfig to find XPLC. 2004-10-06 05:39 Pierre Phaneuf * dist/xplc.spec.in: Fixed a small bug where uninstalling the xplc-devel RPM package left an empty directory behind. 2004-10-06 04:55 Pierre Phaneuf * dist/xplc.spec.in: Ok, one final fix to the RPM spec and that's it. 2004-10-06 04:51 Pierre Phaneuf * dist/xplc.spec.in: Oops, slight mistake in my previous change to the RPM spec file. 2004-10-06 04:48 Pierre Phaneuf * dist/xplc.spec.in: Updated for the new parallel installation support. 2004-10-06 04:25 Pierre Phaneuf * NEWS, configure.ac: Updated the version number and the NEWS file. 2004-10-06 04:07 Pierre Phaneuf * configure.ac, config/config.mk.in, config/vars.mk: Some finetuning of sfllaw's recent updates to make them to my taste. 2004-10-05 23:16 Simon Law * configure.ac, config/config.mk.in, config/rules.mk: Move the cvs2cl test from the config/rules.mk into the configure script. 2004-10-05 22:30 Simon Law * debian/source.lintian-overrides: Suppress spurious warnings about source-contains-CVS-dir, because pphaneuf likes to distribute it that way. 2004-10-05 22:29 Simon Law * debian/changelog: New Debian changelog message in anticipation of XPLC 0.3.10. 2004-10-05 22:28 Simon Law * debian/control, debian/control.in, debian/libxplc-dev.install, debian/rules, config/rules.mk: Generate debian/control from debian/control.in. Changed the Debian maintainer to Simon Law . Also added a Section field to xplc's source. Moved to using versioned package names for Debian, so multiple versions of XPLC can be installed in parallel. 2004-10-05 21:53 Pierre Phaneuf * configure.ac, config/config.mk.in, config/rules.mk, dist/xplc.pc.in: Fixed a few problems in the parallel installation feature. 2004-10-05 21:08 Pierre Phaneuf * configure.ac, config/config.mk.in, config/rules.mk, config/vars.mk: Added the capability of installing parallel versions of XPLC for the unstable releases. 2004-10-04 23:15 Pierre Phaneuf * configure.ac, config/config.mk.in, config/vars.mk: Improved the build system a bit. 2004-10-01 22:28 Pierre Phaneuf * NEWS: Updated the NEWS file. 2004-09-30 21:19 Pierre Phaneuf * configure.ac, xplc/loader.cpp, xplc/modulemgr.cpp: Applied patch 1026089 from sfllaw to build on Darwin/Mac OS X. 2004-09-30 21:08 Pierre Phaneuf * debian/rules: Applied patch 1035929 from sfllaw to put the symlink to libxplc.so with the soname in the Debian package (it doesn't clean up after itself properly otherwise). 2004-09-27 18:50 Pierre Phaneuf * NEWS, configure.ac, debian/changelog: Updated files for release 0.3.9. 2004-09-27 18:43 Pierre Phaneuf * config/cvs-users: Added Simon Law to the cvs-users file. 2004-08-13 20:13 Pierre Phaneuf * include/xplc/delete.h: Including after delete.h causes some problems. 2004-07-20 22:37 Pierre Phaneuf * xplc-cxx/xplc.cpp: Fixed a bug in the XPLC helper class related to the module loader refactoring. 2004-07-20 21:31 Pierre Phaneuf * NEWS, configure.ac, debian/changelog: Updated the version number and the NEWS file. 2004-07-20 21:30 Pierre Phaneuf * include/xplc/module.h: Fixed a missing include in module.h. 2004-07-20 21:12 Pierre Phaneuf * xplc/modulemgr.cpp: Fixed up spacing in the Win32 part of the ModuleManager, and fixed a leak. 2004-07-20 20:48 Stéphane Lajoie * VisualC++/xplc.vcproj, xplc/modulemgr.cpp: Fixed Win32 module loader. 2004-07-20 14:35 Pierre Phaneuf * include/xplc/IModule.h, include/xplc/IModuleLoader.h, include/xplc/IModuleManagerFactory.h, include/xplc/ISingleModuleLoader.h, include/xplc/core.h, tests/test004.cpp, tests/test009.cpp, xplc/moduleloader.cpp, xplc/moduleloader.h, xplc/modulemgr.cpp, xplc/modulemgr.h, xplc/servmgr.cpp, xplc/singleloader.cpp, xplc/singleloader.h, xplc-cxx/xplc.cpp: Refactored the module loading facilities to be simpler and share more code. There is now an IModuleLoader interface, which is a factory producing objects implementing the IModule interface, which allows using modules. There is now a separate IModuleManagerFactory, which allows you to create ModuleManager objects, which use components implementing IModuleLoader to take care of a directory of modules. 2004-07-20 14:25 Pierre Phaneuf * tests/testobj.cpp: The TestComponent was being incorrectly addRef()'d. 2004-07-20 14:22 Pierre Phaneuf * config/libdl.supp: Added a Valgrind supression file for the two leaks in dlopen. 2004-07-14 21:50 Pierre Phaneuf * include/xplc/IModule.h: Some refactoring is happening around IModule. 2004-07-14 21:49 Pierre Phaneuf * include/xplc/module.h: module.h does not need IModule.h. 2004-07-08 16:21 Pierre Phaneuf * examples/: simple-module/Makefile, simple-module-user/Makefile: Adding the bare minimum of dependencies in the examples, so that you can play around with them easily. 2004-07-01 21:16 Pierre Phaneuf * dist/xplc.spec.in: Fixed the RPM spec file to include the examples. 2004-07-01 20:49 Pierre Phaneuf * NEWS, configure.ac, debian/changelog: Updated the NEWS file and the version number. 2004-07-01 20:49 Pierre Phaneuf * examples/simple-module-user/simple.cpp: Added a comment beside the XPLC helper object instance. 2004-07-01 20:35 Pierre Phaneuf * examples/: Makefile, simple-module/IExample.h, simple-module/Makefile, simple-module/module.cpp, simple-module/module.h, simple-module/simple.cpp, simple-module/simple.h, simple-module-user/Makefile, simple-module-user/simple.cpp: Putting the example code into the public domain. 2004-07-01 20:26 Pierre Phaneuf * examples/simple-module/: IExample.h, module.cpp, module.h, simple.h: Separated the private stuff in simple.h to module.h. Added a few comments to clarify terms used. 2004-07-01 19:43 Pierre Phaneuf * examples/: simple-module/Makefile, simple-module-user/Makefile: Don't assume we are in the XPLC package, so that the makefiles can be "stolen" more readily. 2004-07-01 19:24 Pierre Phaneuf * examples/Makefile: Since we are inside the XPLC package, pass in CPPFLAGS and LDFLAGS to help the examples find the headers and libraries. 2004-07-01 07:25 Pierre Phaneuf * include/xplc/: delete.h, module.h, ptr.h, utils.h, uuid.h, xplc.h: Added missing Doxygen documentation. 2004-07-01 06:30 Pierre Phaneuf * include/xplc/xplc.h: What do you know: forget to run the unit test once, you'll break the build! Fixed a tiny typo. 2004-07-01 06:22 Pierre Phaneuf * config/rules.mk, examples/Makefile, examples/simple-module/IExample.h, examples/simple-module/Makefile, examples/simple-module/module.cpp, examples/simple-module/simple.cpp, examples/simple-module/simple.h, examples/simple-module-user/.cvsignore, examples/simple-module-user/Makefile, examples/simple-module-user/simple.cpp: Added a pair of very basic examples. 2004-07-01 06:21 Pierre Phaneuf * include/xplc/xplc.h, xplc-cxx/xplc.cpp: Modified the "XPLC" helper class to use xplc_ptr and added an addModuleDirectory method to do as it says in a single line. 2004-07-01 06:14 Pierre Phaneuf * include/xplc/ptr.h: Removed a useless include and added a do_addRef function that addRefs a pointer and returns it (useful for passing through to the raw pointer constructor of xplc_ptr, to avoid making it steal ownership). 2004-06-25 19:01 Pierre Phaneuf * config/rules.mk, debian/changelog: Updated the debian changelog and put a reminder in "make dist". 2004-06-25 18:42 Pierre Phaneuf * NEWS: Updated the NEWS file. 2004-06-25 18:23 Pierre Phaneuf * configure.ac, include/xplc/delete.h, include/xplc/factory.h, include/xplc/ptr.h, include/xplc/trace.h, include/xplc/utils.h, include/xplc/uuid.h, include/xplc/uuidops.h, include/xplc/xplc.h, tests/test.h, xplc/catmgr.cpp, xplc/moduleloader.cpp, xplc/statichandler.cpp, xplc-cxx/factory.cpp, xplc-cxx/getiface.cpp, xplc-cxx/strtouuid.cpp, xplc-cxx/uuidtostr.cpp, xplc-cxx/xplc.cpp: Made the license change (added a "runtime exception" on the C++ binding files) and updated the version number. 2004-06-25 12:04 Stéphane Lajoie * VisualC++/xplc-cxx.vcproj: Added missing include path. 2004-06-24 18:06 Stéphane Lajoie * VisualC++/: testobj.vcproj, tests.vcproj, xplc-cxx.vcproj, xplc.def, xplc.sln, xplc.vcproj: Build the C++ bindings in a separate static library and build the main xplc project as a dll that exports only "XPLC_getServiceManager", just like in the Unix version. 2004-06-15 21:17 Pierre Phaneuf * include/xplc/: delete.h, ptr.h: Fixed delete detector and xplc_ptr bad interaction. Make sure operator delete is already declared before redefining it. Made it an error to include IObject.h before delete.h to make sure we do not miss any "delete". Added a "deletev" macro to do "delete[]" (argh, this sucks!). 2004-06-13 22:16 Pierre Phaneuf * include/xplc/utils.h: Including core.h from utils.h to make gcc 3.4 happy. 2004-06-13 21:57 Pierre Phaneuf * config/vars.mk: Removed the -pedantic flag from the CXXFLAGS variable. 2004-05-21 20:27 Pierre Phaneuf * debian/changelog: Updated the Debian changelog. 2004-05-21 20:24 Pierre Phaneuf * NEWS, configure.ac: Updated the version number and the NEWS file. 2004-05-21 20:22 Pierre Phaneuf * dist/README.in: Updated the README file template. 2004-05-21 20:21 Pierre Phaneuf * .cvsignore, Makefile, xplc/rules.mk: Fixed a few details in the pkg-config support. The .pc files were not getting cleaned, and we now put a copy of xplc-uninstalled.pc in the top-level directory to make it easier to use. 2004-05-21 19:48 Pierre Phaneuf * xplc/moduleloader.cpp: Reverted an accidental checkin. 2004-05-21 19:46 Pierre Phaneuf * xplc/moduleloader.cpp: ifdef'd out an incomplete new feature. 2004-05-21 19:41 Pierre Phaneuf * include/xplc/ptr.h, tests/test011.cpp, xplc-cxx/xplc.cpp: Made the new xplc_ptr implementation the real one. 2004-05-19 22:56 Stéphane Lajoie * VisualC++/: tests.vcproj, xplc.vcproj: Added category stuff to project files. 2004-05-19 13:12 Pierre Phaneuf * tests/test011.cpp: Some work on the prototype xplc_ptr. ALL assignations (through the constructor or operator=) will addRef(), EXCEPT for the raw pointer constructor. Added a templated constructor to "notice" when we get passed another xplc_ptr. Constified the two accessor methods. Added a few things to the test and corrected others appropriately for the other changes. 2004-05-13 16:23 Pierre Phaneuf * tests/: test.h, test011.cpp, testmain.cpp: Added some tests for a rewrite of xplc_ptr (which is currently put in the test itself). 2004-05-13 16:18 Pierre Phaneuf * xplc-cxx/xplc.cpp: Modified some uses of xplc_ptr to use the explicit constructor form instead of the zero-initialization followed by assignment. 2004-04-23 19:58 Pierre Phaneuf * NEWS: Updated the NEWS file. 2004-04-23 19:56 Pierre Phaneuf * include/xplc/ICategoryIterator.h, tests/test010.cpp, xplc/category.cpp, xplc/category.h, xplc/catiter.cpp, xplc/catiter.h, xplc/catmgr.cpp: Mostly finished implementing component categories. 2004-04-23 19:56 Pierre Phaneuf * include/xplc/ICategory.h: Removed the derivation of ICategory from IFactory, since there is no test for this feature yet. 2004-04-23 08:36 Pierre Phaneuf * include/xplc/ICategory.h, include/xplc/ICategoryEntry.h, include/xplc/ICategoryIterator.h, tests/test010.cpp, xplc/category.cpp, xplc/category.h: Replaced the ICategoryEntry interface with an ICategoryIterator. 2004-04-22 02:08 Pierre Phaneuf * tests/test010.cpp, xplc/catmgr.cpp: Working a bit on the categories. 2004-04-08 19:06 Pierre Phaneuf * CREDITS: I had forgotten to add Avery to the CREDITS file (he added a whole lot of Doxygen documentation). 2004-04-08 13:23 Pierre Phaneuf * debian/: copyright, libxplc-dev.install: Updated the copyright years and added the pkg-config file to the Debian package. 2004-04-08 01:05 Pierre Phaneuf * NEWS, configure.ac, config/rules.mk, dist/xplc.spec.in: Add the pkg-config file to the autoconf and packaging. 2004-04-08 01:04 Pierre Phaneuf * dist/: .cvsignore, xplc-uninstalled.pc.in, xplc.pc.in: Completed the pkg-config support. 2004-04-07 18:53 Pierre Phaneuf * NEWS, configure.ac, debian/changelog: Updated the NEWS file and the version numbers for release 0.3.4. 2004-04-07 16:51 Pierre Phaneuf * include/xplc/delete.h: Added an "illegal delete detector". Include this right after IObject.h or in its place. 2004-04-07 16:49 Pierre Phaneuf * include/xplc/utils.h, tests/test.h, tests/test002.cpp, tests/test003.cpp, tests/test006.cpp: Added an "xplcdelete" macro to use in place of "delete" to indicate that you know what you are doing (with regard to deleting an object deriving from IObject), since you are normally supposed to use only IObject::release(). 2004-04-07 16:48 Pierre Phaneuf * tests/test005.cpp: Removed a useless implementation of operator delete in test005. 2004-04-07 16:47 Pierre Phaneuf * tests/test010.cpp: Clean up a few unused variables in test010. 2004-04-07 16:43 Pierre Phaneuf * xplc/: moduleloader.h, monikers.h, new.h, servmgr.h, singleloader.h: Changed the access of a few destructors to allow the "illegal delete detector" to work. 2004-03-31 22:15 Pierre Phaneuf * dist/xplc.pc.in: Added a first cut at a pkg-config file for XPLC. 2004-03-31 22:14 Pierre Phaneuf * include/xplc/utils.h, xplc-cxx/xplc.cpp: Remove IFactory.h from utils. 2004-03-24 15:09 Pierre Phaneuf * configure.ac, include/.cvsignore, include/config.h, include/xplc/.cvsignore, include/xplc/config.h, tests/test004.cpp, tests/test009.cpp, xplc/loader.cpp, xplc/moduleloader.cpp: Moved away the config.h/autoconf.h headers from the public headers, we do not want this information leaked to the outside. Some common autoconf macros also have a tendency to clash between packages. 2004-03-20 19:51 Pierre Phaneuf * configure.ac, debian/changelog: Updated the version number and the Debian changelog for 0.3.3. 2004-03-20 18:10 Pierre Phaneuf * NEWS: Updated the NEWS file for 0.3.3. 2004-03-20 18:04 Pierre Phaneuf * tests/rules.mk: Have "make tests" do the full equivalent of "make" before running the tests. 2004-03-18 17:59 Stéphane Lajoie * VisualC++/: testobj.vcproj, tests.vcproj, xplc.vcproj: Disabled the stupid performance warning when building on Win32. 2004-03-17 21:38 Stéphane Lajoie * xplc/moduleloader.cpp: Removed unused variables. 2004-03-17 21:30 Pierre Phaneuf * include/xplc/ptr.h, include/xplc/utils.h, include/xplc/uuid.h, tests/test.h, tests/test005.cpp: Renamed the IID<> template to XPLC_IID<>. 2004-03-17 21:27 Pierre Phaneuf * xplc/: moduleloader.cpp, moduleloader.h: Forgot to update the copyrights. 2004-03-17 21:22 Pierre Phaneuf * xplc/: moduleloader.cpp, moduleloader.h: Refactored the common platform-independent code out of the platform-dependent ModuleLoader::setModuleDirectory method. 2004-03-17 15:38 Pierre Phaneuf * xplc/loader.cpp: Corrected a typo, thanks to slajoie. 2004-03-17 15:09 Pierre Phaneuf * include/xplc/uuid.h: Forgot to credit slajoie and attribute copyrights for the previous change. 2004-03-17 15:05 Pierre Phaneuf * include/xplc/uuid.h: Made the UUID equality and inequality C++ operators compatible with those used in Win32. 2004-03-17 14:45 Pierre Phaneuf * VisualC++/: testobj.vcproj, tests.vcproj, xplc.sln, xplc.vcproj: Update to the Visual C++ project files, from slajoie. 2004-02-07 00:10 Pierre Phaneuf * include/xplc/module.h, tests/testobj.cpp, xplc/moduleloader.cpp, xplc/moduleloader.h, xplc/singleloader.cpp, xplc/singleloader.h: Changed the module loader some more... 2004-01-30 22:59 Pierre Phaneuf * xplc/: loader.cpp, loader.h: Changed loaderClose to take a void*& instead of a void* and set the pointer to NULL for you. 2004-01-30 15:38 Pierre Phaneuf * include/xplc/IGenericFactory.h, xplc/factory.cpp, xplc/factory.h: These files mysteriously reappeared after some SourceForge CVS manipulations. 2004-01-13 07:03 Pierre Phaneuf * config/rules.mk: Fixed some more dependencies. 2004-01-13 06:58 Pierre Phaneuf * config/rules.mk: Fixed a dependency problem and made the "make dist" target automatically update the CVS files. 2004-01-13 06:50 Pierre Phaneuf * include/xplc/module.h: Added a note for future developments. 2004-01-13 06:49 Pierre Phaneuf * debian/: .cvsignore, changelog: Updated the version number for the Debian package. 2004-01-09 07:18 Pierre Phaneuf * NEWS, configure.ac: Updated the NEWS file and the version number. 2004-01-09 07:18 Pierre Phaneuf * config/: rules.mk, vars.mk: Fixed a few details in the build system. 2004-01-08 16:10 Pierre Phaneuf * .cvsignore, Makefile, config/config.mk.in, config/rules.mk, config/vars.mk: Improved the "make dist" target to actually produce a ready-to-upload tarball. 2004-01-05 18:49 Pierre Phaneuf * include/xplc/utils.h: Added a bit of documentation to WeakRef. 2004-01-04 14:55 Pierre Phaneuf * include/xplc/utils.h, xplc-cxx/getiface.cpp: Shortened the name of IObjectImplementationInternal to IObjectImplInternal, moved XPLC_getInterface_real to IObjectImplInternal::getInterface. 2004-01-04 14:45 Pierre Phaneuf * include/xplc/utils.h, tests/test005.cpp: Fixed a bug in IMPLEMENT_IOBJECT where the weak reference itself wouldn't get released. Improved the unit test to cover this bug. 2003-12-31 18:44 Pierre Phaneuf * include/xplc/IObject.h, include/xplc/factory.h, include/xplc/utils.h, tests/test001.cpp, tests/test002.cpp, tests/test005.cpp, tests/testobj.cpp, xplc/category.h, xplc/catmgr.h, xplc/moduleloader.h, xplc/monikers.h, xplc/new.h, xplc/servmgr.cpp, xplc/servmgr.h, xplc/singleloader.h, xplc/statichandler.h, xplc-cxx/factory.cpp: Replaced GenericComponent with the IMPLEMENT_IOBJECT macro, which more easily allow having non-default constructors and has a smaller footprint. Adapted test suite accordingly. Made the starting reference count of an IMPLEMENT_IOBJECT-using object 1 rather than 0, as it simplified use and reduced footprint. 2003-12-27 20:42 Pierre Phaneuf * include/xplc/factory.h: Documented the generic factory. 2003-12-22 23:19 Pierre Phaneuf * include/xplc/factory.h, tests/test003.cpp, xplc/servmgr.cpp, xplc-cxx/factory.cpp: Moved the generic factory to the C++ binding, for two reasons: I'm afraid function pointers can't fly in XPLC interfaces, and they're easier to use this way. 2003-12-22 22:54 Pierre Phaneuf * include/xplc/module.h: Clarified and better documented . 2003-12-22 22:46 Pierre Phaneuf * include/xplc/module.h: Added some missing Doxygen documentation. 2003-12-22 22:43 Pierre Phaneuf * include/xplc/xplc.h: Added two accessor methods to the XPLC object. 2003-12-22 22:19 Pierre Phaneuf * config/exports.map, include/xplc/module.h, tests/testobj.cpp, xplc/moduleloader.cpp, xplc/moduleloader.h, xplc/singleloader.cpp: Started changing the module system to a more data-driven architecture. 2003-12-22 21:23 Pierre Phaneuf * tests/test005.cpp, xplc/servmgr.cpp: Fixed spacing in a few spots. 2003-12-22 21:21 Pierre Phaneuf * include/xplc/utils.h, tests/test.h, tests/test001.cpp, tests/test002.cpp, tests/test003.cpp, tests/test005.cpp, tests/test006.cpp, tests/test008.cpp, tests/testobj.cpp, xplc/servmgr.cpp: Make every object initialize their refcount at 1 instead of zero, getting rid of an always necessary follow-up addRef(). 2003-12-20 04:38 Pierre Phaneuf * include/xplc/uuid.h: Clarified some UUID-related documentation. 2003-12-20 03:37 Pierre Phaneuf * NEWS, include/xplc/uuid.h, tests/test.h, tests/test001.cpp, tests/test007.cpp, tests/testobj.cpp, xplc/catmgr.cpp, xplc/statichandler.cpp, xplc-cxx/getiface.cpp, xplc-cxx/strtouuid.cpp, xplc-cxx/uuidtostr.cpp: Made the UUID structure compatible with the one in Windows. Updated the NEWS file. 2003-12-12 21:28 Pierre Phaneuf * config/vars.mk: Fixed the clean target to clean up Debian stuff correctly. 2003-12-12 21:20 Pierre Phaneuf * debian/: changelog, control: Made the libxplc-dev Debian package depend on the libxplc package. 2003-12-12 20:45 Pierre Phaneuf * debian/changelog: Updated the Debian changelog. 2003-12-12 20:31 Pierre Phaneuf * configure.ac, config/vars.mk: Updated the version number. 2003-12-12 20:11 Pierre Phaneuf * NEWS, config/vars.mk: Updated the NEWS file, added "dist" to the simple targets, "make clean" did not remove libxplc.so. 2003-12-06 01:04 Pierre Phaneuf * Doxyfile, include/xplc/ICategory.h, include/xplc/ICategoryEntry.h, include/xplc/ICategoryManager.h, include/xplc/IFactory.h, include/xplc/IModule.h, include/xplc/IModuleLoader.h, include/xplc/IMoniker.h, include/xplc/IMonikerService.h, include/xplc/IObject.h, include/xplc/IServiceHandler.h, include/xplc/IServiceManager.h, include/xplc/ISingleModuleLoader.h, include/xplc/IStaticServiceHandler.h, include/xplc/IWeakRef.h, include/xplc/ptr.h, include/xplc/utils.h, include/xplc/uuid.h, include/xplc/xplc.h: Extended the documentation further. 2003-12-05 20:08 Pierre Phaneuf * Doxyfile, include/xplc/utils.h, include/xplc/xplc.h: Expanded the documentation a bit. 2003-12-05 05:07 Pierre Phaneuf * include/xplc/: IMoniker.h, IMonikerService.h, IObject.h, IServiceHandler.h, IServiceManager.h, uuid.h: Checking in some documentation contributed by Avery Pennarun , as well as some of my own additions and editions. 2003-12-02 02:10 Pierre Phaneuf * Doxyfile: Improved the doxygen settings. 2003-11-28 23:30 Pierre Phaneuf * xplc/: category.cpp, category.h, categorynode.h, catmgr.cpp, catmgr.h: Started fleshing out categories. 2003-11-28 21:30 Pierre Phaneuf * config/vars.mk: Use "-z defs" when linking libraries, safeguards against forgetting symbols. 2003-11-15 05:34 Pierre Phaneuf * .cvsignore, Doxyfile, config/rules.mk, config/vars.mk: Added a very basic "make doxygen" target. 2003-11-15 05:19 Pierre Phaneuf * TODO: Updated the TODO file. 2003-11-14 23:33 Pierre Phaneuf * include/xplc/ICategory.h, include/xplc/ICategoryEntry.h, include/xplc/ICategoryManager.h, tests/test010.cpp: Improved the categories unit test, along with the corresponding interfaces. It is still disabled, as none of it is implemented. 2003-11-14 21:26 Pierre Phaneuf * CREDITS, NEWS, TODO, debian/.cvsignore, debian/changelog, debian/control, debian/copyright, debian/libxplc-dev.install, debian/libxplc.install, debian/rules: Added Debian packaging scripts, contributed by James Morrison , as well as updated the CREDITS, NEWS and TODO files accordingly. 2003-11-14 21:25 Pierre Phaneuf * config.guess, config.sub: Updated autoconf files. 2003-10-21 18:59 Pierre Phaneuf * config/vars.mk: Apparently it is better on some platforms (SPARC, for example) to use -fpic rather than -fPIC. On some platforms (like x86), there is no difference between the two, but on most RISC platforms, -fpic is more optimal but has a platform specific limit on the number of relocations, where you have to switch to the less efficient -fPIC when you hit the limit (the linker tells you). So let's use -fpic rather than -fPIC and see if anything breaks. 2003-10-19 07:45 Pierre Phaneuf * TODO, dist/README.in, dist/xplc.spec.in: Clarified the TODO and the README file, corrected a few typos, updated the changelog section of the RPM spec file. 2003-10-19 07:06 Pierre Phaneuf * NEWS: Updated the NEWS file. 2003-10-19 06:06 Pierre Phaneuf * include/xplc/uuid.h, tests/test007.cpp, xplc-cxx/strtouuid.cpp: Removed UUID::null and made a static UUID_null instead. It was pulling in too much weight along. 2003-10-19 05:58 Pierre Phaneuf * config/rules.mk: Added a rule to generate assembly output, for examination purposes. 2003-10-19 05:28 Pierre Phaneuf * include/xplc/utils.h, xplc/catmgr.cpp, xplc/catmgr.h, xplc/factory.cpp, xplc/factory.h, xplc/moduleloader.cpp, xplc/moduleloader.h, xplc/monikers.cpp, xplc/monikers.h, xplc/new.cpp, xplc/new.h, xplc/servmgr.cpp, xplc/singleloader.cpp, xplc/singleloader.h, xplc/statichandler.cpp, xplc/statichandler.h: Removed all the "create" static methods and unified them in the GenericComponent template. Did some more cleaning in xplc/servmgr.cpp, some more size reduction. 2003-10-19 05:19 Pierre Phaneuf * tests/: test002.cpp, test003.cpp: Some modifications to keep tests in good shape. 2003-10-19 02:14 Pierre Phaneuf * xplc/: servmgr.cpp, servmgr.h: Cutting out more code, still doing the same thing. 2003-10-18 23:23 Pierre Phaneuf * xplc/servmgr.cpp: Moving a small bit of code around made it both easier to read and compile to a smaller size. 2003-10-04 05:53 Pierre Phaneuf * include/xplc/ICategoryManager.h, tests/test010.cpp, xplc/catmgr.cpp, xplc/catmgr.h: A bit more category manager work done. 2003-10-04 05:25 Pierre Phaneuf * tests/test010.cpp: Fixed a warning in test010. 2003-10-04 05:05 Pierre Phaneuf * xplc-cxx/: getiface.cpp, xplc.cpp: Saved almost 2K from libxplc.so by moving WeakRef::uuids from xplc.cpp to getiface.cpp. Why? It was pulling in members of the XPLC helper class that is not even used in libxplc.so. WeakRef goes mostly hand-in-hand with the generic getInterface implementation, so this makes more sense anyway. 2003-10-04 04:57 Pierre Phaneuf * tests/test010.cpp, xplc/catmgr.cpp, xplc/catmgr.h, xplc/servmgr.cpp: Started the category manager. 2003-10-04 04:55 Pierre Phaneuf * tests/test009.cpp: A bad refcount isn't fatal, VERIFY instead of ASSERT. 2003-07-26 19:46 Pierre Phaneuf * tests/test.h: Corrected an assert message in the test classes. 2003-07-25 18:21 Pierre Phaneuf * TODO, config/exports.map, config/vars.mk, xplc/rules.mk: Restrict exported symbols to the bare minimum (XPLC_getServiceManager for libxplc.so and XPLC_GetModule for modules). libxplc.so size went from 28K to 20K and testobj.dll went from 11K to 7.3K. Also fixed the requirements of libxplc.so to link against libxplc-cxx.a, which it didn't before to avoid accidentally providing symbols from libxplc-cxx.a to libxplc.so users, but now that we have this linker script, this cannot happen. This also mean that the actual text segment size of libxplc.so *increased*, even though the total size decreased by 8K. 2003-07-25 17:55 Pierre Phaneuf * tests/: test.h, test010.cpp, testmain.cpp: Reserved a test for categories. We've gotta have that soon... 2003-06-28 20:43 Pierre Phaneuf * TODO: Added a TODO file, so that those unlucky people that don't have access to my Palm can see what's coming too. :-) 2003-03-17 04:36 Pierre Phaneuf * include/xplc/core.h: Added a CID for the category manager. 2003-03-17 03:48 Pierre Phaneuf * xplc-cxx/strtouuid.cpp: Eek! C-style casts! 2003-03-16 23:28 Stéphane Lajoie * include/xplc/config.h, include/xplc/uuid.h, xplc-cxx/strtouuid.cpp: Fixed warnings. 2003-03-16 22:42 Stéphane Lajoie * VisualC++/: testobj.vcproj, tests.vcproj, xplc.dsp, xplc.sln, xplc.vcproj: Removed outdated xplc.dsp. Fixed VS.NET files to compensate for silly move in VisualC++ subdirectory. These will not be updated anymore. 2003-03-15 23:27 Pierre Phaneuf * configure.ac: Updated the version number. 2003-03-15 23:22 Pierre Phaneuf * NEWS, include/xplc/xplc.h, xplc-cxx/xplc.cpp: Updated the NEWS file, added a method to the XPLC class to create an object directly from a moniker. 2003-02-18 05:14 Pierre Phaneuf * NEWS: Added the new weak references feature. 2003-02-18 05:12 Pierre Phaneuf * include/xplc/IObject.h, include/xplc/IWeakRef.h, include/xplc/utils.h, tests/test.h, tests/test005.cpp, xplc-cxx/xplc.cpp: Added weak references to IObject, along with the corresponding implementation in GenericComponent and updated tests. 2003-01-17 03:48 Pierre Phaneuf * dist/xplc.spec.in: Small permission fix to the RPM spec file. 2003-01-11 06:33 Pierre Phaneuf * NEWS, configure.ac: Preparing for release 0.1.7. 2002-12-13 17:45 Pierre Phaneuf * include/xplc/core.h, include/xplc/utils.h, include/xplc/xplc.h, tests/test.h, tests/test000.cpp, tests/test001.cpp, tests/test002.cpp, tests/test003.cpp, tests/test004.cpp, tests/test005.cpp, tests/test006.cpp, tests/test008.cpp, tests/test009.cpp, xplc/factory.cpp, xplc/moduleloader.cpp, xplc/monikers.cpp, xplc/new.cpp, xplc/servmgr.cpp, xplc/servmgr.h, xplc/singleloader.cpp, xplc/xplc.cpp, xplc-cxx/xplc.cpp: Fixed up header files, moved things around a bit, added a working XPLC helper class. 2002-12-11 16:07 Pierre Phaneuf * include/xplc/ptr.h: Had forgot to update xplc_ptr for the new way of getting IIDs (NIT). 2002-12-11 15:54 Pierre Phaneuf * tests/rules.mk, xplc-cxx/rules.mk: Don't put the content of xplc-cxx in libxplc.so (NIT). 2002-12-11 15:49 Pierre Phaneuf * include/xplc/: ICategory.h, ICategoryManager.h: Added preliminary ICategory and ICategoryManager interfaces (NIT). 2002-12-11 05:35 Pierre Phaneuf * include/xplc/IFactory.h, include/xplc/IGenericFactory.h, include/xplc/IModule.h, include/xplc/IModuleLoader.h, include/xplc/IMoniker.h, include/xplc/IMonikerService.h, include/xplc/IObject.h, include/xplc/IServiceHandler.h, include/xplc/IServiceManager.h, include/xplc/ISingleModuleLoader.h, include/xplc/IStaticServiceHandler.h, include/xplc/utils.h, include/xplc/uuid.h, tests/test.h, tests/test005.cpp, tests/testmain.cpp, tests/testobj.h: Managed to pull off making the IID definition the smallest and fastest possible, without compromising ease of use! Whew! It still has some cases where it isn't *perfectly* optimal, but short of writing assembler or starting to assume things about object layouts, that's pretty much it (the code is theoretically optimizable, it's just that my compiler doesn't push it to the end). 2002-12-09 22:49 Pierre Phaneuf * xplc/moduleloader.cpp: Fixed a small bug in the Windows version, thanks to Sébastien 'Jester' Derivaux for the catch. 2002-12-05 17:37 Pierre Phaneuf * configure.ac, config/config.mk.in, config/vars.mk: Added a configure switch to disable position-independent code generation (PIC allows for more sharing between processes, but is almost 20% bigger too, so lets give the choice to the users). 2002-12-05 08:23 Pierre Phaneuf * configure.ac: AC_SEARCH_LIBS doesn't like having no library to search. 2002-12-05 08:19 Pierre Phaneuf * configure.ac, config/config.mk.in, config/rules.mk, config/vars.mk, xplc/loader.cpp: Added linking of shared objects on Darwin/Mac OS X, and started implementing dynamic loading of shared objects for same. 2002-12-05 07:16 Pierre Phaneuf * config/: rules.mk, vars.mk: Compiling with -fPIC is required on Solaris for building shared objects, and setting the soname with -soname is not supported (but the -h option is, so we set the soname with that instead). 2002-12-05 03:48 Pierre Phaneuf * config/vars.mk, xplc/vars.mk: Fixed a small buglet in the linking with -ldl, and enable -Wc-style-cast only when --enable-warnings was specified (on some platforms, header files have C-style casts, and that's pretty annoying and not our fault). 2002-12-05 03:23 Pierre Phaneuf * configure.ac: Oops, very small mistake in the help of configure.ac. 2002-12-05 03:20 Pierre Phaneuf * configure.ac, config/config.mk.in, include/xplc/config.h, tests/rules.mk, tests/test004.cpp, tests/test009.cpp, xplc/loader.cpp, xplc/vars.mk: Improved the tests for dynamic loading facilities, made libxplc.so link with -ldl (if necessary) again, fixed up some things in configure.ac. 2002-12-03 17:27 Pierre Phaneuf * include/xplc/IFactory.h, include/xplc/IGenericFactory.h, include/xplc/IModule.h, include/xplc/IModuleLoader.h, include/xplc/IMoniker.h, include/xplc/IMonikerService.h, include/xplc/IObject.h, include/xplc/IServiceHandler.h, include/xplc/IServiceManager.h, include/xplc/ISingleModuleLoader.h, include/xplc/IStaticServiceHandler.h, include/xplc/utils.h, include/xplc/uuid.h, include/xplc/xplc.h, tests/test.h, tests/test004.cpp, tests/test005.cpp, tests/test006.cpp, tests/test008.cpp, tests/test009.cpp, xplc/new.cpp, xplc/xplc.cpp: Changed the method used for defining IIDs. This one is a little more bloaty, but is safer, easier to use, and doesn't use any non-standard attributes. 2002-12-03 17:25 Pierre Phaneuf * NEWS: Updated the NEWS file for the next release. 2002-11-30 10:56 Pierre Phaneuf * config/rules.mk, dist/xplc.spec.in: Fixed the install rule and the RPM spec file for the new libxplc-cxx.a. 2002-11-30 10:48 Pierre Phaneuf * NEWS, configure.ac: Preparing for release 0.1.6. 2002-11-30 10:28 Pierre Phaneuf * tests/test005.cpp: Seems gcc3 does access protection of parent classes properly, and I didn't. 2002-11-30 10:27 Pierre Phaneuf * xplc/moduleloader.cpp: Added yet another missing header. 2002-11-30 10:23 Pierre Phaneuf * config/rules.mk: Attempting to fix dependencies generation for gcc3. 2002-11-30 09:15 Pierre Phaneuf * configure.ac: Fixed a buglet in configure.ac: while the "test" built-in of bash seems to accept == as a valid operator, the real sh on Solaris doesn't. 2002-11-30 08:12 Pierre Phaneuf * include/xplc/utils.h, tests/rules.mk, tests/testobj.cpp: Removed the GenericComponentInline template. 2002-11-30 07:57 Pierre Phaneuf * include/xplc/uuid.h, xplc/helper.cpp, xplc-cxx/.cvsignore, xplc-cxx/getiface.cpp, xplc-cxx/rules.mk, xplc-cxx/strtouuid.cpp, xplc-cxx/uuidtostr.cpp: Moved the toString and fromString methods of UUID to separate compilation units in the C++ bindings. Even though it inflated libxplc.so slightly, in actual use it comes down smaller. 2002-11-30 07:53 Pierre Phaneuf * xplc/: moduleloader.cpp, monikernode.h: Fixed other missing headers. 2002-11-30 07:53 Pierre Phaneuf * tests/test007.cpp: Fixed a missing header. 2002-11-30 04:51 Pierre Phaneuf * include/xplc/utils.h, tests/test001.cpp, tests/test005.cpp, xplc/factory.cpp, xplc/moduleloader.cpp, xplc/monikers.cpp, xplc/new.cpp, xplc/servmgr.cpp, xplc/singleloader.cpp, xplc/statichandler.cpp: Automated the generation of the GenericComponent supported interfaces map. 2002-11-30 02:57 Pierre Phaneuf * include/xplc/uuid.h: Replaced an if that masked an error silently by an assert that will complain louder. 2002-11-29 14:43 Pierre Phaneuf * include/xplc/uuid.h: Removed a useless "inline" modifier and added a comment to clarify toString requirements. 2002-11-26 06:13 Pierre Phaneuf * include/xplc/uuid.h: Shave the whales! And footprint too! 2002-11-26 05:49 Pierre Phaneuf * include/xplc/utils.h, include/xplc/xplc.h, tests/test000.cpp, tests/test001.cpp, tests/test004.cpp, tests/test006.cpp, tests/test008.cpp, tests/test009.cpp, xplc/factory.cpp, xplc/moduleloader.cpp, xplc/monikers.cpp, xplc/new.cpp, xplc/servmgr.cpp, xplc/servmgr.h, xplc/singleloader.cpp, xplc/xplc.cpp: Ok, that "splitting XPLC" idea wasn't so great after all. Recombining them helps reduce the size a good deal. I'm also starting fleshing out nice C++ bindings. 2002-11-26 02:40 Pierre Phaneuf * tests/rules.mk, xplc/rules.mk: Recombined libxplc-core into libxplc. Seeing the 5k shared object is nice, but the total size is much worse, so we'll make that a separate configure option in the future. 2002-11-23 20:00 Pierre Phaneuf * config/rules.mk, config/vars.mk, include/xplc/core.h, tests/rules.mk, xplc/rules.mk, xplc/servmgr.cpp, xplc/servmgr.h, xplc/xplc.cpp: Split the XPLC core into libxplc-core. 2002-11-22 23:03 Pierre Phaneuf * Makefile, config/config.mk.in, config/rules.mk, config/vars.mk, tests/rules.mk, tests/vars.mk, xplc/rules.mk, xplc/vars.mk: Makefile clean ups that I have been wanting to do for a while (NIT). 2002-11-21 16:54 Pierre Phaneuf * Makefile, configure.ac, configure.in, config/config.mk.in, config/rules.mk, config/vars.mk, config/version.mk, xplc/rules.mk, xplc/vars.mk: Completed changeover to Autoconf 2.5x. 2002-11-21 16:39 Pierre Phaneuf * include/xplc/uuid.h: Added an identity check to short-circuit UUID::equals. 2002-11-21 08:09 Pierre Phaneuf * config/rules.mk: Cleaner way of working around the "rm" problem on Darwin/Mac OS X. 2002-11-21 07:44 Pierre Phaneuf * configure.ac: Corrected dlopen test. 2002-11-21 07:11 Pierre Phaneuf * include/xplc/config.h: Corrected another slight mistake. 2002-11-21 07:08 Pierre Phaneuf * xplc/loader.cpp: Corrected a slight mistake. 2002-11-21 07:02 Pierre Phaneuf * configure.ac, include/xplc/config.h, tests/test004.cpp, tests/test009.cpp, xplc/loader.cpp, xplc/loader.h: Added support for building without dynamic loading support. 2002-11-21 06:41 Pierre Phaneuf * configure.ac, config/config.mk.in, config/vars.mk, tests/rules.mk, xplc/rules.mk: Added back test for dlopen. 2002-11-21 06:11 Pierre Phaneuf * configure.ac: Switching to Autoconf 2.5x. 2002-11-21 05:33 Pierre Phaneuf * config/rules.mk: Made the makefile work with Mac OS X's "rm" command (it doesn't like having nothing to do). 2002-11-21 04:56 Pierre Phaneuf * include/xplc/config.h: Simple fix for avoiding the need for defining UNSTABLE on Windows. 2002-11-20 14:54 Pierre Phaneuf * xplc.dsp, xplc.sln, xplc.vcproj, VisualC++/testobj.vcproj, VisualC++/tests.vcproj, VisualC++/xplc.dsp, VisualC++/xplc.sln, VisualC++/xplc.vcproj, tests/testobj.vcproj, tests/tests.vcproj: Moved the Microsoft Visual Studio into a VisualC++ directory. 2002-11-18 14:27 Pierre Phaneuf * include/xplc/uuid.h: Removed extraneous semicolon. 2002-11-18 07:29 Pierre Phaneuf * NEWS: Updating the NEWS file. 2002-11-18 07:10 Pierre Phaneuf * include/xplc/IServiceHandler.h, tests/test000.cpp, tests/test001.cpp, tests/test004.cpp, tests/test006.cpp, tests/test008.cpp, tests/test009.cpp, tests/testobj.cpp, xplc/handlernode.h, xplc/loader.cpp, xplc/moduleloader.cpp, xplc/moduleloader.h, xplc/new.cpp, xplc/new.h, xplc/servmgr.cpp, xplc/servmgr.h, xplc/singleloader.cpp, xplc/singleloader.h, xplc/statichandler.cpp, xplc/statichandler.h, xplc/xplc.cpp: Got rid of IServiceHandler::shutdown, fixed all the leaks that valgrind could find, save for one that seems to be in my dlopen implementation. 2002-11-18 07:05 Pierre Phaneuf * tests/test003.cpp: Another leak in the test suite! Another one is coming, but has other issues, so it is in a separate commit. 2002-11-18 07:04 Pierre Phaneuf * tests/test002.cpp: Fixed a leak in the test suite, related to the previous commit. 2002-11-18 07:03 Pierre Phaneuf * tests/test.h: Fixed a leak in the test suite. 2002-11-18 07:02 Pierre Phaneuf * include/xplc/ptr.h: More experimentations with xplc_ptr. 2002-11-18 04:52 Pierre Phaneuf * Makefile, configure.in, config/config.mk.in, config/rules.mk, config/vars.mk, config/version.mk, include/xplc/IFactory.h, include/xplc/IGenericFactory.h, include/xplc/IModule.h, include/xplc/IModuleLoader.h, include/xplc/IMoniker.h, include/xplc/IMonikerService.h, include/xplc/IObject.h, include/xplc/IServiceHandler.h, include/xplc/IServiceManager.h, include/xplc/ISingleModuleLoader.h, include/xplc/IStaticServiceHandler.h, include/xplc/config.h, include/xplc/module.h, include/xplc/ptr.h, include/xplc/trace.h, include/xplc/utils.h, include/xplc/uuid.h, include/xplc/xplc.h, tests/rules.mk, tests/test.h, tests/test000.cpp, tests/test001.cpp, tests/test002.cpp, tests/test003.cpp, tests/test004.cpp, tests/test005.cpp, tests/test006.cpp, tests/test007.cpp, tests/test008.cpp, tests/test009.cpp, tests/testmain.cpp, tests/testobj.cpp, tests/testobj.h, tests/vars.mk, xplc/factory.cpp, xplc/factory.h, xplc/handlernode.h, xplc/helper.cpp, xplc/loader.cpp, xplc/loader.h, xplc/moduleloader.cpp, xplc/moduleloader.h, xplc/monikernode.h, xplc/monikers.cpp, xplc/monikers.h, xplc/new.cpp, xplc/new.h, xplc/objectnode.h, xplc/rules.mk, xplc/servmgr.cpp, xplc/servmgr.h, xplc/singleloader.cpp, xplc/singleloader.h, xplc/statichandler.cpp, xplc/statichandler.h, xplc/vars.mk, xplc/xplc.cpp: Updated the license notice (they were referring to the Library General Public License, we are using the Lesser General Public License). 2002-11-18 04:31 Pierre Phaneuf * tests/test007.cpp, xplc/moduleloader.cpp: Fixed uses of snprintf on WIN32. 2002-10-31 06:13 Pierre Phaneuf * include/xplc/ptr.h: Added an experimental smart pointer class. 2002-10-28 23:37 Pierre Phaneuf * uuid2cdef.pl: Added a Perl script to convert the output of 'uuidgen' to a C definition. 2002-10-27 08:02 Pierre Phaneuf * include/xplc/utils.h: Added a "create" templated function to do a lot of things quickly. 2002-10-27 07:33 Pierre Phaneuf * include/xplc/utils.h, tests/test001.cpp, tests/testobj.cpp, xplc/factory.cpp, xplc/factory.h, xplc/moduleloader.cpp, xplc/moduleloader.h, xplc/monikers.cpp, xplc/monikers.h, xplc/new.cpp, xplc/new.h, xplc/servmgr.cpp, xplc/servmgr.h, xplc/singleloader.cpp, xplc/singleloader.h, xplc/statichandler.cpp, xplc/statichandler.h: Added a GenericComponentInline that is identical to GenericComponent, but doesn't need any symbol from libxplc. Converted all users of GenericComponentOld and removed it. 2002-10-27 07:11 Pierre Phaneuf * include/xplc/utils.h, tests/test005.cpp, xplc/helper.cpp: Here is the GenericComponent with the automated getInterface method. It still needs some polishing, but it passes the tests. 2002-10-26 10:57 Pierre Phaneuf * include/xplc/utils.h, tests/test001.cpp, tests/test005.cpp, tests/testobj.cpp, xplc/factory.cpp, xplc/moduleloader.cpp, xplc/monikers.cpp, xplc/new.cpp, xplc/servmgr.cpp, xplc/singleloader.cpp, xplc/statichandler.cpp: Renamed GenericComponent to GenericComponentOld, to warn of its deprecation. 2002-10-26 10:56 Pierre Phaneuf * config/rules.mk: Linking with g++ makes smaller binaries than using cc. 2002-10-18 22:32 Pierre Phaneuf * config/rules.mk, config/vars.mk, tests/.cvsignore, xplc/.cvsignore: Improved the automatic dependencies so that they are made as the sources are compiled, and they are updated every time a file is re-compiled. Also fixed the "distclean" and "realclean" targets (that weren't removing include/xplc/autoconf.h and include/xplc/autoconf.h.in, respectively). 2002-09-27 21:22 Pierre Phaneuf * dist/xplc.spec.in: A few fixes to the RPM spec file. 2002-09-27 21:15 Pierre Phaneuf * NEWS: Updated the NEWS file. 2002-09-27 21:10 Pierre Phaneuf * .cvsignore, Makefile, config/rules.mk, dist/xplc.spec.in: Added support for easily making RPM packages for XPLC and made sure that we did not put the unneeded "autom4te.cache" file in the distribution. 2002-09-27 15:11 Pierre Phaneuf * NEWS, config/version.mk, include/xplc/IObject.h, include/xplc/config.h, include/xplc/module.h, xplc/loader.cpp, xplc/moduleloader.cpp: Cleaned up Stéphane's Win32 fixes, added a "config.h" file that works with or without Autoconf support, updated copyright notices for Stéphane's fixes, updated the NEWS file and the version number. 2002-09-20 21:50 Stéphane Lajoie * xplc.sln, xplc.vcproj, tests/testobj.vcproj, tests/tests.vcproj: These are the .NET project files. In order to forestall some silliness, here's a warning: they'll probably stop working if they are moved around just for the fun of it. 2002-09-20 20:07 Stéphane Lajoie * include/xplc/IObject.h, include/xplc/module.h, xplc/loader.cpp, xplc/moduleloader.cpp: Removed protected operator delete from IObject. Fixed ENTRYPOINT definition for Visual C++. Added alternative implementation of dll functions for Win32. 2002-09-20 19:40 Pierre Phaneuf * config/rules.mk: Every time we run autoconf, we should run autoheader as well, just in case. 2002-09-20 18:52 Pierre Phaneuf * configure.in, include/xplc/.cvsignore, xplc/loader.cpp, xplc/moduleloader.cpp: Converted the uses of dirent.h and dlfcn.h to be portable (using autoconf). 2002-09-20 16:30 Pierre Phaneuf * xplc/: moduleloader.cpp, moduleloader.h: Renamed ModuleList to ModuleNode, to be consistent with HandlerNode, MonikerNode and ObjectNode. 2002-09-20 15:55 Pierre Phaneuf * .cvsignore: Added a new autoconf-related file to the top-level .cvsignore. 2002-09-14 04:23 Pierre Phaneuf * NEWS, config/version.mk: Releasing XPLC 0.1.4. 2002-09-13 20:07 Pierre Phaneuf * tests/test004.cpp, tests/testobj.cpp, xplc/xplc.cpp: Fixing memory leaks, trying to shut up Valgrind (NIT). 2002-09-13 19:58 Pierre Phaneuf * xplc/singleloader.cpp: Moved some code around for clarity (NIT). 2002-09-13 19:45 Pierre Phaneuf * xplc/servmgr.cpp: Simplified/optimized ServiceManager::shutdown (NIT). 2002-09-13 19:41 Pierre Phaneuf * include/xplc/trace.h: Added the "this" pointer in the debug output of TraceComponent (NIT). 2002-09-13 18:48 Pierre Phaneuf * include/xplc/IModuleLoader.h, include/xplc/module.h, tests/test009.cpp, xplc/moduleloader.cpp, xplc/moduleloader.h, xplc/xplc.cpp: Added an implementation of the module loader (NIT). 2002-09-12 03:56 Pierre Phaneuf * include/xplc/IModuleLoader.h, include/xplc/xplc.h, tests/test.h, tests/test009.cpp, tests/testmain.cpp: Added an IModuleLoader interface, and started a unit test for its coming implementation. 2002-09-12 03:54 Pierre Phaneuf * include/xplc/xplc.h, tests/rules.mk, tests/test004.cpp, xplc/simpledl.cpp, xplc/simpledl.h, xplc/singleloader.cpp, xplc/singleloader.h, xplc/xplc.cpp: Renamed the "simple dynamic loader" to "single module loader", for consistency. Also made the test suite change into its directory before being run. 2002-09-12 03:50 Pierre Phaneuf * include/xplc/ISingleModuleLoader.h: Removed an old irrelevant (and possibly misleading) comment. 2002-06-28 16:56 Pierre Phaneuf * tests/: .cvsignore, rules.mk, test.h, test000.cpp, test001.cpp, test002.cpp, test003.cpp, test004.cpp, test005.cpp, test006.cpp, test007.cpp, test008.cpp, testmain.cpp, testobj.cpp, testobj.h, vars.mk: This is the new all-dancing, all-singing single binary test suite. May the Win32 developers rejoice. 2002-06-28 16:53 Pierre Phaneuf * xplc/: servmgr.cpp, servmgr.h, xplc.cpp: Added a feature to ServiceManager so that it can clear out the pointer it is assigned to when it disappear (fixes a bug where calling XPLC::getServiceManager after the service manager died (because the refcount went to zero) gave you an invalid pointer). 2002-06-28 16:51 Pierre Phaneuf * xplc/: rules.mk, vars.mk: Moved the definition of the LIBXPLC_OBJS from the rules.mk to the vars.mk, where it really belongs (it *is* a variable, and not a rule, after all). 2002-06-28 16:49 Pierre Phaneuf * config/rules.mk: Made the clean targets clearer about the files that it will delete. 2002-06-27 18:27 Pierre Phaneuf * include/xplc/IFactory.h, include/xplc/IGenericFactory.h, include/xplc/IModule.h, include/xplc/IMoniker.h, include/xplc/IMonikerService.h, include/xplc/IObject.h, include/xplc/IServiceHandler.h, include/xplc/IServiceManager.h, include/xplc/ISingleModuleLoader.h, include/xplc/IStaticServiceHandler.h, tests/test.h: Reformatted DEFINE_UUID declarations. 2002-06-27 18:26 Pierre Phaneuf * include/xplc/ISimpleDynamicLoader.h, include/xplc/ISingleModuleLoader.h, xplc/simpledl.cpp, xplc/simpledl.h: Renamed ISimpleDynamicLoader to ISingleModuleLoader. 2002-06-21 21:13 Pierre Phaneuf * Makefile: Remove any other shared objects in the top-level directory, even if they are not the same version (for when we just updated the version number). 2002-06-14 20:46 Pierre Phaneuf * include/xplc/IServiceManager.h: IServiceManager now derives from IServiceHandler instead of IObject. 2002-06-14 20:22 Pierre Phaneuf * NEWS, configure.in, config/config.mk.in, xplc/rules.mk: Added support for FreeBSD. 2002-06-07 20:29 Pierre Phaneuf * config/version.mk: Release 0.1.3 2002-06-07 20:27 Pierre Phaneuf * NEWS, config/rules.mk, xplc/rules.mk, xplc/vars.mk: Renamed the static library libxplc.a and added a libxplc_s.a symbolic link pointing to it. 2002-06-07 20:12 Pierre Phaneuf * NEWS, configure.in, config/config.mk.in, config/vars.mk, include/xplc/IFactory.h, include/xplc/IGenericFactory.h, include/xplc/IModule.h, include/xplc/IMoniker.h, include/xplc/IMonikerService.h, include/xplc/IObject.h, include/xplc/IServiceHandler.h, include/xplc/IServiceManager.h, include/xplc/ISimpleDynamicLoader.h, include/xplc/IStaticServiceHandler.h: Added a way to mark unstable interfaces as such, so that you cannot accidentally use an unstable interface (there is a 'configure' switch to allow unstable interfaces, and unstable releases of XPLC have it enabled by default). 2002-06-07 20:08 Pierre Phaneuf * NEWS: Updated the NEWS file. 2002-06-06 14:12 Pierre Phaneuf * include/xplc/module.h, xplc/simpledl.cpp: Added the missing parameters to XPLC_GetModule, made a prototype and typedef for XPLC_GetModule. 2002-05-31 21:38 Pierre Phaneuf * config/rules.mk: Added an "uninstall" make target. 2002-05-31 21:34 Pierre Phaneuf * xplc/simpledl.h: Oops, actually initialize the SimpleDynamicLoader::module member variable. 2002-05-31 21:33 Pierre Phaneuf * xplc/simpledl.cpp: Removed the now useless SimpleDynamicLoader::createObject method, made the SimpleDynamicLoader release the module properly and initialize the "module" member variable to zero. 2002-05-31 20:52 Pierre Phaneuf * xplc/simpledl.cpp: Fixed an automatic cast warning (NIT). 2002-05-25 00:11 Pierre Phaneuf * NEWS, include/xplc/ISimpleDynamicLoader.h, tests/rules.mk, xplc/simpledl.cpp, xplc/simpledl.h: Updated the NEWS file and copyright notices. 2002-05-24 21:18 Pierre Phaneuf * include/xplc/IModule.h, include/xplc/ISimpleDynamicLoader.h, xplc/monikernode.h, xplc/simpledl.cpp, xplc/simpledl.h: Converted the simple dynamic loader to use the same kind of modules that the regular dynamic loader will use. 2002-05-24 21:14 Pierre Phaneuf * xplc/: loader.cpp, loader.h: Added an platform-independent dlopen/LoadLibrary abstraction. 2002-05-17 15:42 Pierre Phaneuf * tests/rules.mk: Do not stop the tests at the first error, just show the errors and carry on. 2002-05-03 15:41 Pierre Phaneuf * include/xplc/ISimpleDynamicLoader.h: Small formatting fix. 2002-03-29 23:37 Pierre Phaneuf * xplc/rules.mk: libxplc.so depends on libdl.so (NIT). 2002-03-29 23:36 Pierre Phaneuf * config/rules.mk: Make a symbolic link from libxplc.so to the installed version. 2002-03-29 23:36 Pierre Phaneuf * INSTALL: Updated installation instruction (NIT). 2002-03-29 23:28 Pierre Phaneuf * INSTALL, config/config.mk.in, config/rules.mk: Added an "install" makefile target. 2002-03-29 23:21 Pierre Phaneuf * Makefile: "make realclean" should remove the README (NIT). 2002-03-29 23:20 Pierre Phaneuf * .cvsignore, README, config/rules.mk, dist/README.in: Generate the README file to incorporate the version number from version.mk. 2002-03-29 23:12 Pierre Phaneuf * config/vars.mk, xplc/rules.mk, xplc/vars.mk: Made the shared library have the version number in its filename, and set an appropriate soname, for binary compatibility. 2002-03-29 23:09 Pierre Phaneuf * Makefile, config/version.mk: Added a central place to set the version number of the package. 2002-03-29 21:26 Pierre Phaneuf * config/: config.mk.in, vars.mk: Moved most of the variable-setting login from config.mk.in to config/vars.mk, cleaned up some of the code to make it clearer, removed old debugging code (NIT). 2002-03-29 21:19 Pierre Phaneuf * config/rules.mk: Automatically run autoconf (NIT). 2002-03-29 21:18 Pierre Phaneuf * xplc/: rules.mk, vars.mk: Moved the targets to the top-level directory (NIT). 2002-03-29 21:09 Pierre Phaneuf * xplc/: new.cpp, statichandler.cpp: Updated copyright information (NIT). 2002-03-29 19:57 Pierre Phaneuf * NEWS, include/xplc/xplc.h, tests/vars.mk, xplc/new.cpp, xplc/xplc.cpp: Finished the "new" moniker, added an entry to the NEWS file, added its UUID to the defined monikers, reformatted the UUIDs in xplc.h for readability, fixed a bug in the corresponding test. 2002-03-29 19:54 Pierre Phaneuf * xplc/statichandler.cpp: Prevent adding a null object. 2002-03-25 04:14 Pierre Phaneuf * tests/vars.mk, xplc/new.cpp, xplc/new.h: Ongoing work on a "new" moniker (test is disabled). 2002-03-24 21:53 Pierre Phaneuf * NEWS: Added a note about the changed names of the interface manipulation templated functions. 2002-03-24 21:30 Pierre Phaneuf * config.guess, config.sub: Updated autoconf files. 2002-03-24 21:18 Pierre Phaneuf * xplc/monikers.cpp: Finished the moniker service with support for sub-monikers. 2002-03-24 20:15 Pierre Phaneuf * include/xplc/utils.h, xplc/xplc.cpp: The getInterface templated function was conflicting with the IObject method of same name, which required prepending invocations of the templated function with "::". I decided to shorten the name of the templated functions getInterface and mutateInterface to "get" and "mutate". I'm slightly worried about these being too generic and prone to conflicting with other things outside of XPLC, we'll see. 2002-03-24 06:53 Pierre Phaneuf * NEWS: Added the moniker service to the NEWS file. 2002-03-24 06:44 Pierre Phaneuf * config/vars.mk, include/xplc/IMoniker.h, include/xplc/IMonikerService.h, include/xplc/IServiceHandler.h, include/xplc/IServiceManager.h, include/xplc/ISimpleDynamicLoader.h, include/xplc/trace.h, include/xplc/utils.h, include/xplc/uuid.h, tests/rules.mk, tests/test.h, tests/testmain.cpp, xplc/factory.cpp, xplc/handlernode.h, xplc/servmgr.cpp, xplc/servmgr.h, xplc/simpledl.cpp, xplc/simpledl.h, xplc/statichandler.cpp, xplc/statichandler.h: Updated copyright notices. 2002-03-24 06:43 Pierre Phaneuf * include/xplc/xplc.h, tests/vars.mk, xplc/xplc.cpp: Integration of the initial implementation of the moniker service (NIT). 2002-03-23 21:30 Pierre Phaneuf * config/config.mk.in: Enable getting base CXXFLAGS from the command line of make (NIT). 2002-03-23 21:29 Pierre Phaneuf * config/rules.mk: Clean up CVS leftover files and updated copyrights (NIT). 2002-03-23 21:12 Pierre Phaneuf * xplc/: monikernode.h, monikers.cpp, monikers.h: Initial implementation of the moniker service (NIT). 2002-03-22 22:28 Pierre Phaneuf * README: Let's thank Net Integration Technologies for things like paying me a day a week to work on XPLC, ok? :-) 2002-03-21 06:18 Pierre Phaneuf * config/: rules.mk, vars.mk: Do not require autoconf or configure to be run for some simpler targets. 2002-03-20 21:00 Pierre Phaneuf * NEWS: Updated the NEWS file with current information. 2002-03-20 17:50 Pierre Phaneuf * include/xplc/IMonikerService.h: Added a IMonikerService interface, for the general moniker service component. 2002-03-20 17:49 Pierre Phaneuf * include/xplc/IServiceHandler.h, xplc/handlernode.h, xplc/statichandler.cpp, xplc/statichandler.h: Added a shutdown() method to the IServiceHandler interface, to reflect the method of same name in the IServiceManager interface and to break any ownership loop between a service handler and its subobjects. 2002-03-20 17:44 Pierre Phaneuf * configure.in, config/config.mk.in: Fixed a buglet in the "enable fatal warnings" option. 2002-03-20 17:35 Pierre Phaneuf * xplc/xplc.cpp: Do not keep a long-lived reference to the static service handler. This was done thinking about a potential XPLC::addObject function, but this function will not exist ("you are not going to need it"). 2002-03-20 17:31 Pierre Phaneuf * tests/test.h: Added a test object factory, and made the test object detect any illegal access after being destroyed. 2002-03-19 16:42 Pierre Phaneuf * README: Trying to promote warning-free coding. 2002-03-19 16:40 Pierre Phaneuf * configure.in, config/config.mk.in: Added a configure script option to make warnings stop the build. 2002-03-19 05:08 Pierre Phaneuf * include/xplc/uuid.h: Added toString and fromString methods to struct UUID. 2002-03-19 05:06 Pierre Phaneuf * include/xplc/: IMoniker.h, xplc.h: Checkpointing work on monikers. 2002-03-19 05:00 Pierre Phaneuf * config/config.mk.in: Restoring developer private DEBUG_xxx functionality. 2002-03-08 06:13 Pierre Phaneuf * include/xplc/: trace.h, utils.h: The tracing mix-in template has been moved to a separate header, so that one does not include stdio.h simply by defining DEBUG. This header also only work if DEBUG is defined, on purpose. 2002-03-08 05:12 Pierre Phaneuf * include/xplc/utils.h: Turned the conditionnally compiled tracing calls in the generic component mix-in template into a separate mix-in template of its own. There is a downside: stdio.h is now included whenever DEBUG is defined. 2002-03-08 04:28 Pierre Phaneuf * configure.in, config/config.mk.in: Folded the --enable-private-debug option into --enable-debug. 2001-09-21 06:59 Pierre Phaneuf * configure.in, config/config.mk.in: Separated the regular debug "configure" option and the private debugging option. 2001-09-21 06:29 Pierre Phaneuf * tests/vars.mk: Added a placeholder test for monikers. 2001-09-21 06:06 Pierre Phaneuf * NEWS, config/config.mk.in: Made the --enable-debug option to the "configure" script define a DEBUG_{username} preprocessor variable (with the user name as given by "whoami", for example "DEBUG_pp") as well as a "make" variable DEBUG also containing the user name. Also made the --disable-debug option (the default) set a NDEBUG preprocessor variable. 2001-09-21 06:00 Pierre Phaneuf * tests/: rules.mk, vars.mk: Defining the TESTS variable should be done in the vars.mk file. 2001-07-26 20:32 Pierre Phaneuf * configure.in: Clarification of the configure --help. 2001-06-13 22:24 Pierre Phaneuf * README: Release 0.1.1 2001-06-09 00:20 Pierre Phaneuf * NEWS: Added a NEWS file. 2001-06-08 23:51 Pierre Phaneuf * configure.in, config/config.mk.in: Added separate options to enable debug info, disable optimizations, disable warnings, enable RTTI and enable exceptions. 2001-06-08 22:17 Pierre Phaneuf * include/xplc/utils.h, include/xplc/uuid.h, xplc/simpledl.cpp: A few corrections, including the incredible C++ cast from hell, to make gcc happy with the -Wold-style-cast option enabled. 2001-06-08 21:21 Pierre Phaneuf * include/xplc/IServiceManager.h, xplc/handlernode.h, xplc/servmgr.cpp, xplc/servmgr.h: Added addFirstHandler and addLastHandler methods to the IServiceManager interface. This fixes bug #431200. I am not 100% sure of this code, I have some unfavorable feeling about it. I asked Stéphane Lajoie to review it, but he declined the offer, on the basis that he doesn't do or understand any hand-coded algorithms that the STL does. :-) 2001-06-08 21:16 Pierre Phaneuf * xplc/simpledl.cpp: Removed the code that added the platform-dependent extension to dynamically loaded files. I think that it fits with the XPLC philosophy that the client code should be able to specify in full the name of the file, even if it is not consistent with the platform. For example, a program could choose to have a .plg for its plugins. Accordingly, I changed the test code to always use the .dll extension, even on non-Win32 platforms. I would have preferred to use an extension like .dso (that is alien to *every* platform I know, to test any stupid dependency on the filename), but making Visual C++ generate a DLL with a different extension could possibly make you go insane, so I spared my Win32 colleagues a bit. :-) Also, this removes the (unfortunately) bloating STL dependency that came with that "feature", without turning to C-style char* juggling. 2001-06-08 21:03 Pierre Phaneuf * config/config.mk.in: Disabled RTTI and exceptions. I am not 100% sure that this will not make the library incompatible with code compiled with RTTI and/or exceptions. 2001-06-08 15:32 Pierre Phaneuf * config/: cvs-users, rules.mk, vars.mk: Added a "dist" makefile target to automate release work. Also automated ChangeLog generation. 2001-06-08 15:07 Pierre Phaneuf * tests/rules.mk: Stop if any test fail, instead of only the last one. 2001-06-07 01:38 Pierre Phaneuf * README: Release 0.1.0 2001-06-07 01:37 Pierre Phaneuf * CREDITS: Added a CREDITS file. 2001-06-07 01:35 Pierre Phaneuf * .cvsignore: Ignore the ChangeLog file, it is machine-generated from the CVS database and is thus not included in CVS. 2001-06-07 01:28 Pierre Phaneuf * README: Added a README file. 2001-06-07 01:10 Pierre Phaneuf * INSTALL: Initial commit of an INSTALL file for people to look at. 2001-06-07 01:08 Pierre Phaneuf * LICENSE: We use the Lesser General Public License. 2001-01-27 21:00 Stéphane Lajoie * include/xplc/uuid.h, xplc/simpledl.cpp: Fixed bad #ifdef. 2001-01-16 13:42 Stéphane Lajoie * xplc/simpledl.cpp: Sort of removed platform-specific crap from test005. This changes the simple dynamic loader interface in that the file extension (.so or .dll) must NOT be specified now. The platform-specific code will append the proper extension. Also, the path to the test component is no longer specified in the test. This works under Windows because the LoadLibrary API looks in many different places for the .dll file, including the directory from which the calling process' exe was loaded (so it's not a coincidence that the testcomponent project now outputs the dll in test005/). 2001-01-13 05:51 Stéphane Lajoie * .cvsignore: Ignore MSDev byproducts. 2001-01-13 05:47 Stéphane Lajoie * xplc.dsp: Added MSDev project files for all projects. 2001-01-13 05:38 Stéphane Lajoie * include/xplc/ISimpleDynamicLoader.h, include/xplc/utils.h, include/xplc/uuid.h, tests/test.h, tests/testmain.cpp, xplc/factory.cpp, xplc/servmgr.cpp, xplc/servmgr.h, xplc/simpledl.cpp, xplc/simpledl.h, xplc/statichandler.cpp, xplc/statichandler.h, xplc/xplc.cpp: Changed all NULL to 0. That's supposedly "the C++ way". Makes it work on Doze too :). Fixed all MSDev warnings (this so-called "performance warning" is the most idiotic thing out of Microsoft ever, and that's saying something). Adapted the wizardry in xplc/uuid.h to MS compiler. Implemented the Win32 version of the simple dynamic loader. NOTE: I may have broken the Linux build with my new #ifdefs, as I'm not sure of the proper symbol names under Linux. So please don't take this code on faith :). 2000-12-28 19:40 Pierre Phaneuf * tests/vars.mk: We were not cleaning up the test binaries, as they were not part of the targets, corrected this. 2000-12-23 01:19 Pierre Phaneuf * include/xplc/xplc.h, xplc/xplc.cpp: XPLC::getServiceManager now uses the factory of generic factory to create factories for its other components. The static service handler is now directly available through the service manager instead of being undirectly accessed through XPLC::addObject and XPLC::removeObject. 2000-12-22 20:57 Pierre Phaneuf * config/: config.mk.in, vars.mk: Removed the unused libidl configuration from the makefiles, as it added a useless dependency. Also made the dependency file part of the distribution, so that users do not have to generate it. 2000-12-14 01:04 Pierre Phaneuf * xplc/: simpledl.cpp, simpledl.h, xplc.cpp: Working implementation of the simple dynamic loader and its unit test. Made the XPLC::getServiceManager() method populate the static service handler with XPLC's own components. 2000-12-14 01:02 Pierre Phaneuf * xplc/: factory.cpp, factory.h: Changed the create() method to return a IObject* instead. 2000-12-14 00:48 Pierre Phaneuf * include/xplc/xplc.h: Added UUIDs for included components. 2000-12-14 00:31 Pierre Phaneuf * xplc/: factory.cpp, factory.h: Added a generic factory component and its accompanying unit test. 2000-12-14 00:18 Pierre Phaneuf * include/xplc/IGenericFactory.h: Fixed the original tentative version. 2000-12-14 00:17 Pierre Phaneuf * include/xplc/ISimpleDynamicLoader.h: Clarified an important interface-defining comment. 2000-12-14 00:15 Pierre Phaneuf * include/xplc/IFactory.h, include/xplc/IGenericFactory.h, include/xplc/IObject.h, include/xplc/IServiceHandler.h, include/xplc/IServiceManager.h, include/xplc/ISimpleDynamicLoader.h, include/xplc/IStaticServiceHandler.h, include/xplc/uuid.h, tests/test.h: Changed DEFINE_IID to the more generic DEFINE_UUID. 2000-12-12 23:06 Pierre Phaneuf * include/xplc/IFactory.h, include/xplc/IGenericFactory.h, include/xplc/ISimpleDynamicLoader.h, xplc/simpledl.cpp, xplc/simpledl.h: In progress factory interfaces and simple dynamic loader component (stubbed for the moment). 2000-12-12 17:03 Pierre Phaneuf * include/xplc/IObject.h, include/xplc/IServiceHandler.h, include/xplc/IServiceManager.h, include/xplc/IStaticServiceHandler.h, include/xplc/uuid.h, tests/test.h: Replaced all uses of __attribute__((weak)) by a macro so that we can more easily replace that non-portable extension by something else. 2000-12-11 07:19 Pierre Phaneuf * include/xplc/IObject.h, include/xplc/IStaticServiceHandler.h, include/xplc/utils.h, include/xplc/xplc.h, tests/test.h, xplc/objectnode.h, xplc/statichandler.cpp, xplc/statichandler.h, xplc/xplc.cpp: Added a static service handler (to handle statically linked components), as well as its test suite. Added its two methods to the XPLC class to let applications register their own static components, in addition to those that (will be) are built into XPLC. 2000-12-11 03:55 Pierre Phaneuf * configure.in, config/config.mk.in: Removed the non-working IDL compiler. This will be revived in time, but is confusing for the moment. 2000-12-11 02:35 Pierre Phaneuf * include/xplc/IServiceHandler.h, include/xplc/IServiceManager.h, include/xplc/IServiceManagerHandler.h, xplc/handlernode.h, xplc/objectnode.h, xplc/servmgr.cpp, xplc/servmgr.h: Cleaned up the design of the service manager by spinning off its object directory away. The service manager now only has a list of handlers from which to ask about the requested objects. The previous object directory functionality will return in a soon-to-come "static" service handler. 2000-12-10 07:14 Pierre Phaneuf * include/xplc/: IServiceHandler.h, IServiceManagerHandler.h: Fixing a CVS glitch. 2000-12-10 07:11 Pierre Phaneuf * include/xplc/: IServiceHandler.h, IServiceManagerHandler.h: Corrected a minor CVS glitch. 2000-12-10 07:05 Pierre Phaneuf * include/xplc/IServiceHandler.h, include/xplc/IServiceManager.h, include/xplc/IServiceManagerHandler.h, xplc/handlernode.h, xplc/servmgr.cpp, xplc/servmgr.h: Checkpointing a sizable change into a branch, to be landed later. 2000-11-27 02:35 Pierre Phaneuf * tests/: test.h, testmain.cpp: Improved the test suite to report multiple problems in a single run if the problems are not fatal. 2000-11-13 00:01 Pierre Phaneuf * configure.in: I like nice formatting. :-) 2000-10-23 14:42 Pierre Phaneuf * include/xplc/utils.h: Calling ::delete with a void* is not correct, but calling ::operator delete() is. 2000-08-03 21:00 Pierre Phaneuf * tests/: .cvsignore, rules.mk, test.cpp, test000.cpp, test001.cpp, test002.cpp, testmain.cpp, vars.mk: Refactored the test scaffolding to allow unit and functional tests that have more than a single source file. 2000-07-14 19:00 Pierre Phaneuf * include/xplc/IServiceManagerHandler.h: Added a comment clarifying the semantics of this interface in a critical manner. 2000-07-14 18:59 Pierre Phaneuf * config/config.mk.in: Using many variables depends on having some variables previously defined. 2000-07-14 18:57 Pierre Phaneuf * config/vars.mk, xplc/rules.mk: Fix for a problem with the Solaris 'ar'. 2000-06-20 23:28 Pierre Phaneuf * configure.in: Added a comment to the configure script help advising that the IDL compiler is broken. 2000-06-20 20:53 Pierre Phaneuf * xplc/: servmgr.cpp, servmgr.h, xplc.cpp: Let the component do the work... 2000-06-20 20:48 Pierre Phaneuf * include/xplc/utils.h: Missing include, was working most of the time, but was dependent on proper ordering of #include directives. 2000-06-16 21:26 Pierre Phaneuf * include/xplc/IServiceManagerHandler.h, xplc/handlernode.h, xplc/servmgr.cpp, xplc/servmgr.h: Started adding the hooks for service manager handlers. 2000-06-16 21:18 Pierre Phaneuf * xplc/servmgr.cpp: Fixed a typo. 2000-06-16 21:07 Pierre Phaneuf * xplc/: objectnode.h, servmgr.cpp, servmgr.h: Separated the ObjectNode class into its own header file for clarity, renamed the "registered" member to "objects" for consistency and added a constructor with an initialization list to ServiceManager for correctness. 2000-06-16 20:59 Pierre Phaneuf * xplc/servmgr.cpp: Made some improvements and added comments to the getObject method. 2000-06-16 20:53 Pierre Phaneuf * include/xplc/IServiceManager.h, tests/test002.cpp, xplc/servmgr.cpp, xplc/servmgr.h: Renamed methods in the IServiceManager interface, for simplification (there is no other way to get an object than by UUID!) and brevity. 2000-06-16 20:39 Pierre Phaneuf * config/: rules.mk, vars.mk: Added yet another level of cleanliness (hey, it's spring). 2000-06-16 20:05 Pierre Phaneuf * Makefile, config/config.mk.in, config/rules.mk, config/vars.mk: Added 'distclean' and 'realclean' targets to Makefiles, for various degrees of cleanliness. 2000-06-15 21:55 Pierre Phaneuf * xplc/: servmgr.cpp, servmgr.h: Fleshed out the unregistering method and turned the ObjectNode struct into a class with constructor and destructor to take care of the object addRef() and release(). 2000-06-15 21:45 Pierre Phaneuf * tests/test002.cpp: Code to verify proper unregistration was added. 2000-06-15 21:43 Pierre Phaneuf * include/xplc/utils.h: All the debugging output is quite voluminous, so I put a separate switch for the addRef()/release(), which cuts it down sizably. 2000-06-13 20:18 Pierre Phaneuf * include/xplc/utils.h, tests/test002.cpp: Added some comments, two templated functions that perform getInterface in a typesafe manner, and modified test002 to use one of these templated function. 2000-06-13 18:34 Pierre Phaneuf * tests/test002.cpp, xplc/servmgr.cpp, xplc/servmgr.h: Started fleshing out functionality (yet to be optimized!) and added a test to verify that functionality. 2000-06-13 18:33 Pierre Phaneuf * include/xplc/utils.h: Added heavy debugging info to the GenericComponent template. 2000-06-13 16:03 Pierre Phaneuf * tests/: test000.cpp, test001.cpp: Separated test000 to make each test verify an isolated part of the system. 2000-06-13 15:55 Pierre Phaneuf * include/xplc/utils.h, xplc/xplc.cpp: Changed the name of the basic component template to something that makes more sense and added an initializer for the reference count (oops!). :-) 2000-06-13 15:33 Pierre Phaneuf * include/xplc/utils.h, xplc/servmgr.cpp, xplc/servmgr.h, xplc/xplc.cpp: Added a utility header containing a shim template to help implement basic IObject methods. 2000-06-08 22:38 Pierre Phaneuf * include/xplc/IServiceManager.h, tests/test000.cpp, xplc/servmgr.cpp, xplc/servmgr.h: Changed the signature of IServiceManager, adjusting the service manager and added real addRef/release/getInterface implementations. 2000-06-08 22:37 Pierre Phaneuf * xplc/xplc.cpp: Service manager was not a singleton: fixed. 2000-06-08 22:35 Pierre Phaneuf * include/xplc/: IObject.h, IServiceManager.h: Initialization of the IID static member done through weak symbol. 2000-06-07 16:48 Pierre Phaneuf * xplc/rules.mk: Fixed linking options. 2000-06-07 16:47 Pierre Phaneuf * tests/: test.cpp, test.h, test000.cpp: Added a reason for failure, to help identify problems. 2000-06-07 16:19 Pierre Phaneuf * configure.in, config/config.mk.in: Added a 'configure' switch to enable compilation of IDL compiler. 2000-06-07 16:12 Pierre Phaneuf * config/vars.mk: Have 'make clean' also removes core files. 2000-05-30 13:42 Pierre Phaneuf * tests/test.cpp: Small modification in the output of the testing main(), to allow for test code that generates output. 2000-05-29 19:08 Pierre Phaneuf * config/config.mk.in: Checkpointing the start of an IDL compiler (based on libIDL). 2000-01-31 05:06 Pierre Phaneuf * xplc/: servmgr.cpp, servmgr.h, xplc.cpp: Introducing a service manager implementation. 2000-01-31 05:06 Pierre Phaneuf * config/vars.mk, tests/rules.mk, xplc/vars.mk: Improvements to the build system. 2000-01-31 05:05 Pierre Phaneuf * configure.in, config/config.mk.in: Adding support for CXXFLAGS env. var. while ignoring stupid default. 2000-01-30 05:48 Pierre Phaneuf * tests/: rules.mk, test.cpp, test.h, test000.cpp, vars.mk: Moved some common code into a separate source file. 2000-01-30 05:38 Pierre Phaneuf * tests/: .cvsignore, rules.mk, test000.cpp, vars.mk: Beginnings of a test suite. 2000-01-30 05:37 Pierre Phaneuf * config/vars.mk, xplc/rules.mk, xplc/vars.mk: Added support for both static and shared libraries. 2000-01-30 05:35 Pierre Phaneuf * include/xplc/IServiceManager.h, include/xplc/xplc.h, xplc/xplc.cpp: Started adding some meat. 2000-01-30 05:34 Pierre Phaneuf * include/xplc/uuid.h: Fixed a "typo" that was introduced by copying/pasting code from proto5. Lesson learned. 2000-01-29 21:07 Pierre Phaneuf * Makefile, configure.in, config/config.mk.in, config/rules.mk: Added support for an --enable-debug flag to configure and checks whether configure was ran before building anything or doing dependencies. 2000-01-28 23:36 Pierre Phaneuf * Makefile, config/.cvsignore, config/config.mk.in, config/main.mk, config/rules.mk, config/vars.mk, xplc/rules.mk, xplc/vars.mk: Added auto-dependencies and further build system work. 2000-01-28 05:20 Pierre Phaneuf * .cvsignore, Makefile, Makefile.in, config.h.in, configure.in, config/.cvsignore, config/config.mk.in, config/main.mk, config/rules.mk, config/vars.mk, include/xplc/xplc.h, xplc/rules.mk, xplc/vars.mk, xplc/xplc.cpp: Checkpointing work done on the build system. 2000-01-28 00:24 Pierre Phaneuf * .cvsignore, Makefile.in, config.guess, config.h.in, config.sub, configure.in, install-sh, include/xplc/IObject.h, include/xplc/uuid.h, include/xplc/xplc.h: Checkpointing initial work.