xplc-cvs Mailing List for XPLC
Cross-platform lightweight components
Status: Alpha
Brought to you by:
pphaneuf
You can subscribe to this list here.
2000 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(3) |
Sep
|
Oct
(1) |
Nov
(5) |
Dec
(40) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2001 |
Jan
(31) |
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
(25) |
Jul
(2) |
Aug
|
Sep
(8) |
Oct
(2) |
Nov
|
Dec
|
2002 |
Jan
|
Feb
(1) |
Mar
(97) |
Apr
|
May
(17) |
Jun
(46) |
Jul
|
Aug
|
Sep
(38) |
Oct
(16) |
Nov
(82) |
Dec
(32) |
2003 |
Jan
(14) |
Feb
(5) |
Mar
(10) |
Apr
|
May
|
Jun
(1) |
Jul
(5) |
Aug
|
Sep
|
Oct
(24) |
Nov
(11) |
Dec
(45) |
2004 |
Jan
(16) |
Feb
(4) |
Mar
(25) |
Apr
(24) |
May
(15) |
Jun
(13) |
Jul
(39) |
Aug
(1) |
Sep
(6) |
Oct
(33) |
Nov
(2) |
Dec
(2) |
2005 |
Jan
(4) |
Feb
(10) |
Mar
(1) |
Apr
(10) |
May
|
Jun
|
Jul
(6) |
Aug
|
Sep
|
Oct
(26) |
Nov
(1) |
Dec
(6) |
From: Pierre P. <pph...@us...> - 2005-12-20 02:28:58
|
Update of /cvsroot/xplc/xplc/xplc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1060/xplc Modified Files: rules.mk servmgr.cpp vars.mk Added Files: uuidgen.cpp uuidgen.h Log Message: Added a component to programmatically generate UUIDs. --- NEW FILE: uuidgen.cpp --- /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- * * 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 */ #include "uuidgen.h" /* * We need to do this last, because we define uuid_t in an * incompatible way. */ #undef uuid_t #include <uuid/uuid.h> UUID_MAP_BEGIN(UuidGen) UUID_MAP_ENTRY(IObject) UUID_MAP_ENTRY(IUuidGen) UUID_MAP_END struct EvilUUID { uuid_t uuid; }; UUID UuidGen::createUuid() { UUID rv; uuid_generate(reinterpret_cast<EvilUUID*>(&rv)->uuid); return rv; } --- NEW FILE: uuidgen.h --- /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- * * 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 */ #ifndef __XPLC_UUIDGEN_H__ #define __XPLC_UUIDGEN_H__ #include <xplc/IUuidGen.h> #include <xplc/utils.h> class UuidGen: public IUuidGen { IMPLEMENT_IOBJECT(UuidGen); public: virtual UUID createUuid(); }; #endif /* __XPLC_UUIDGEN_H__ */ Index: vars.mk =================================================================== RCS file: /cvsroot/xplc/xplc/xplc/vars.mk,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** vars.mk 5 Dec 2002 03:48:19 -0000 1.13 --- vars.mk 20 Dec 2005 02:28:49 -0000 1.14 *************** *** 1,5 **** # 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 --- 1,5 ---- # XPLC - Cross-Platform Lightweight Components # Copyright (C) 2000-2002, Pierre Phaneuf ! # Copyright (C) 2002-2005, Net Integration Technologies, Inc. # # This library is free software; you can redistribute it and/or modify *************** *** 37,38 **** --- 37,46 ---- endif + ifneq ("$(with_uuid)", "no") + libxplc.so: LDFLAGS+=$(with_uuid) + endif + + ifneq ("$(with_uuid)", "no") + CPPFLAGS+=-I. + endif + Index: servmgr.cpp =================================================================== RCS file: /cvsroot/xplc/xplc/xplc/servmgr.cpp,v retrieving revision 1.34 retrieving revision 1.35 diff -C2 -d -r1.34 -r1.35 *** servmgr.cpp 20 Jul 2004 14:35:44 -0000 1.34 --- servmgr.cpp 20 Dec 2005 02:28:49 -0000 1.35 *************** *** 4,8 **** * 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 --- 4,8 ---- * Copyright (C) 2000-2004, Pierre Phaneuf * Copyright (C) 2000, Stéphane Lajoie ! * Copyright (C) 2002-2005, Net Integration Technologies, Inc. * * This library is free software; you can redistribute it and/or *************** *** 32,35 **** --- 32,36 ---- #include "new.h" #include "modulemgr.h" + #include "uuidgen.h" UUID_MAP_BEGIN(ServiceManager) *************** *** 86,89 **** --- 87,96 ---- } + obj = new UuidGen; + if(obj) { + handler->addObject(XPLC_uuidGen, obj); + obj->release(); + } + obj = new ModuleLoader; if(obj) { Index: rules.mk =================================================================== RCS file: /cvsroot/xplc/xplc/xplc/rules.mk,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** rules.mk 21 May 2004 20:21:35 -0000 1.19 --- rules.mk 20 Dec 2005 02:28:49 -0000 1.20 *************** *** 1,5 **** # 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 --- 1,5 ---- # XPLC - Cross-Platform Lightweight Components # Copyright (C) 2000-2002, Pierre Phaneuf ! # Copyright (C) 2002-2005, Net Integration Technologies, Inc. # # This library is free software; you can redistribute it and/or modify *************** *** 26,29 **** --- 26,33 ---- libxplc.so: libxplc-cxx.a + ifneq ("$(with_uuid_static)", "no") + libxplc.so: $(with_uuid_static) + endif + xplc-uninstalled.pc: dist/xplc-uninstalled.pc cp $^ $@ |
From: Pierre P. <pph...@us...> - 2005-12-20 02:28:57
|
Update of /cvsroot/xplc/xplc/tests In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1060/tests Modified Files: test.h testmain.cpp Added Files: test012.cpp Log Message: Added a component to programmatically generate UUIDs. Index: test.h =================================================================== RCS file: /cvsroot/xplc/xplc/tests/test.h,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** test.h 25 Jun 2004 18:23:30 -0000 1.26 --- test.h 20 Dec 2005 02:28:49 -0000 1.27 *************** *** 4,8 **** * 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 --- 4,8 ---- * Copyright (C) 2000-2003, Pierre Phaneuf * Copyright (C) 2001, Stéphane Lajoie ! * Copyright (C) 2002-2005, Net Integration Technologies, Inc. * * This library is free software; you can redistribute it and/or *************** *** 42,45 **** --- 42,46 ---- void test010(); void test011(); + void test012(); void test_assert(const char* file, Index: testmain.cpp =================================================================== RCS file: /cvsroot/xplc/xplc/tests/testmain.cpp,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** testmain.cpp 31 Dec 2004 08:56:35 -0000 1.11 --- testmain.cpp 20 Dec 2005 02:28:49 -0000 1.12 *************** *** 2,5 **** --- 2,6 ---- * * XPLC - Cross-Platform Lightweight Components + * Copyright (C) 2005, Net Integration Technologies, Inc. * Copyright (C) 2000-2002, Pierre Phaneuf * Copyright (C) 2001, Stéphane Lajoie *************** *** 52,55 **** --- 53,57 ---- ADD_TEST(test010), ADD_TEST(test011), + ADD_TEST(test012), { 0, 0 } }; --- NEW FILE: test012.cpp --- /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- * * 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 */ #include "test.h" #include <xplc/IUuidGen.h> #include <xplc/uuidops.h> #include <xplc/utils.h> /* * test012 * * Tests UUID generation. */ void test012() { IServiceManager* servmgr; IObject* obj; IUuidGen* uuidgen = 0; UUID uuid1; UUID uuid2; servmgr = XPLC_getServiceManager(); ASSERT(servmgr != 0, "could not obtain service manager"); obj = servmgr->getObject(XPLC_uuidGen); ASSERT(obj != 0, "could not get the UUID generator component"); uuidgen = mutate<IUuidGen>(obj); ASSERT(uuidgen != 0, "UUID generator does not have expected interface"); uuid1 = uuidgen->createUuid(); VERIFY(uuid1 != UUID_null, "generated UUID is null"); uuid2 = uuidgen->createUuid(); VERIFY(uuid1 != UUID_null, "generated UUID is null"); VERIFY(uuid1 != uuid2, "generated UUIDs are equal"); } |
From: Pierre P. <pph...@us...> - 2005-12-20 02:28:57
|
Update of /cvsroot/xplc/xplc/uuid/bin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1060/uuid/bin Modified Files: uuidgen.c Log Message: Added a component to programmatically generate UUIDs. Index: uuidgen.c =================================================================== RCS file: /cvsroot/xplc/xplc/uuid/bin/uuidgen.c,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** uuidgen.c 21 Oct 2005 16:19:01 -0000 1.4 --- uuidgen.c 20 Dec 2005 02:28:49 -0000 1.5 *************** *** 320,323 **** --- 320,326 ---- if(uuid_output_fn) printf("%s\n", uuid_output_fn(uuid)); + + printf("UUID: %s\n", uuid_unparse_(uuid)); + printf("cdef: %s\n", uuid_unparse_x_(uuid)); } |
From: Pierre P. <pph...@us...> - 2005-12-20 02:28:57
|
Update of /cvsroot/xplc/xplc/include/xplc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1060/include/xplc Modified Files: core.h Added Files: IUuidGen.h Log Message: Added a component to programmatically generate UUIDs. Index: core.h =================================================================== RCS file: /cvsroot/xplc/xplc/include/xplc/core.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** core.h 20 Jul 2004 14:35:44 -0000 1.4 --- core.h 20 Dec 2005 02:28:49 -0000 1.5 *************** *** 2,6 **** * * XPLC - Cross-Platform Lightweight Components ! * Copyright (C) 2002, Net Integration Technologies, Inc. * Copyright (C) 2004, Pierre Phaneuf * --- 2,6 ---- * * XPLC - Cross-Platform Lightweight Components ! * Copyright (C) 2002-2005, Net Integration Technologies, Inc. * Copyright (C) 2004, Pierre Phaneuf * *************** *** 56,58 **** --- 56,62 ---- 0x1d, 0x65, 0x9e, 0x20}}; + static const UUID XPLC_uuidGen = {0x8675c53e, 0x9048, 0x4d93, + {0xa0, 0xab, 0x89, 0x80, + 0x32, 0xa9, 0x74, 0x72}}; + #endif /* __XPLC_CORE_H__ */ --- NEW FILE: IUuidGen.h --- /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- * * 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 */ #ifndef __XPLC_IUUIDGEN_H__ #define __XPLC_IUUIDGEN_H__ #if defined(__GNUC__) && __GNUC__ > 3 # pragma GCC system_header #endif #include <xplc/IObject.h> /** \interface IUuidGen IUuidGen.h xplc/IUuidGen.h * * An interface that let you generate UUIDs programmatically. */ class IUuidGen: public IObject { UNSTABLE_INTERFACE public: virtual UUID createUuid() = 0; }; DEFINE_IID(IUuidGen, {0xf0f68999, 0x137e, 0x4637, {0x86, 0x89, 0x64, 0x50, 0x99, 0xa8, 0xa0, 0x7b}}); #endif /* __XPLC_IUUIDGEN_H__ */ |
From: Pierre P. <pph...@us...> - 2005-12-20 02:11:41
|
Update of /cvsroot/xplc/xplc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29547 Modified Files: configure.ac Log Message: Setup the LIBS variable properly for the unit tests. Index: configure.ac =================================================================== RCS file: /cvsroot/xplc/xplc/configure.ac,v retrieving revision 1.42 retrieving revision 1.43 diff -C2 -d -r1.42 -r1.43 *** configure.ac 20 Dec 2005 02:03:04 -0000 1.42 --- configure.ac 20 Dec 2005 02:11:31 -0000 1.43 *************** *** 156,159 **** --- 156,160 ---- with_uuid_static=uuid/libuuid.a fi + LIBS="$LIBS $with_uuid $with_uuid_static" if test "$enable_optimization" != "no"; then |
From: Pierre P. <pph...@us...> - 2005-12-20 02:03:13
|
Update of /cvsroot/xplc/xplc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28414 Modified Files: configure.ac Log Message: Check for the function in libuuid that is of most interest to us. Index: configure.ac =================================================================== RCS file: /cvsroot/xplc/xplc/configure.ac,v retrieving revision 1.41 retrieving revision 1.42 diff -C2 -d -r1.41 -r1.42 *** configure.ac 31 Oct 2005 23:19:35 -0000 1.41 --- configure.ac 20 Dec 2005 02:03:04 -0000 1.42 *************** *** 127,131 **** 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 --- 127,131 ---- if test "$with_uuid" == "no" && test "$with_libuuid" != "no"; then AC_CHECK_HEADERS(uuid/uuid.h, ! AC_CHECK_LIB(uuid, uuid_generate, with_uuid=-luuid)) fi |
From: Pierre P. <pph...@us...> - 2005-11-01 00:57:17
|
Update of /cvsroot/xplc/xplc/dist In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17520/dist Modified Files: xplc.spec.in Log Message: Added RPM packaging for uuidgen. Index: xplc.spec.in =================================================================== RCS file: /cvsroot/xplc/xplc/dist/xplc.spec.in,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** xplc.spec.in 6 Oct 2004 05:39:45 -0000 1.11 --- xplc.spec.in 1 Nov 2005 00:57:02 -0000 1.12 *************** *** 16,19 **** --- 16,23 ---- Requires: xplc = %{version} + %package uuidgen + Summary: Cross-platform lightweight component system (uuidgen) + Group: Development/Libraries + %package doc Summary: Cross-platform lightweight component system (documentation) *************** *** 29,32 **** --- 33,40 ---- 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. *************** *** 62,65 **** --- 70,78 ---- /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) |
From: Pierre P. <pph...@us...> - 2005-10-31 23:19:44
|
Update of /cvsroot/xplc/xplc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26129 Modified Files: NEWS configure.ac Log Message: Updated the version numbers and the NEWS file. Index: NEWS =================================================================== RCS file: /cvsroot/xplc/xplc/NEWS,v retrieving revision 1.38 retrieving revision 1.39 diff -C2 -d -r1.38 -r1.39 *** NEWS 19 Jul 2005 22:26:19 -0000 1.38 --- NEWS 31 Oct 2005 23:19:35 -0000 1.39 *************** *** 1,2 **** --- 1,10 ---- + New 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 ------------- Index: configure.ac =================================================================== RCS file: /cvsroot/xplc/xplc/configure.ac,v retrieving revision 1.40 retrieving revision 1.41 diff -C2 -d -r1.40 -r1.41 *** configure.ac 26 Oct 2005 19:19:27 -0000 1.40 --- configure.ac 31 Oct 2005 23:19:35 -0000 1.41 *************** *** 21,25 **** # USA ! AC_INIT(XPLC, 0.3.12, pp...@lu...) AC_REVISION($Id$) --- 21,25 ---- # USA ! AC_INIT(XPLC, 0.3.13, pp...@lu...) AC_REVISION($Id$) |
From: Pierre P. <pph...@us...> - 2005-10-31 23:19:22
|
Update of /cvsroot/xplc/xplc/uuid In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25970/uuid Modified Files: uuid_time.c Log Message: Some debug code in the uuid directory doesn't build when --enable-debug is used. Index: uuid_time.c =================================================================== RCS file: /cvsroot/xplc/xplc/uuid/uuid_time.c,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** uuid_time.c 21 Oct 2005 13:18:22 -0000 1.1 --- uuid_time.c 31 Oct 2005 23:19:13 -0000 1.2 *************** *** 91,94 **** --- 91,95 ---- } + #if 0 #ifdef DEBUG static const char *variant_string(int variant) *************** *** 160,161 **** --- 161,163 ---- } #endif + #endif |
From: Simon L. <sf...@us...> - 2005-10-26 19:19:36
|
Update of /cvsroot/xplc/xplc/config In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5857/config Modified Files: config.mk.in Log Message: Get XPLC building on FreeBSD 4.11. Index: config.mk.in =================================================================== RCS file: /cvsroot/xplc/xplc/config/config.mk.in,v retrieving revision 1.40 retrieving revision 1.41 diff -C2 -d -r1.40 -r1.41 *** config.mk.in 21 Oct 2005 14:56:40 -0000 1.40 --- config.mk.in 26 Oct 2005 19:19:28 -0000 1.41 *************** *** 27,30 **** --- 27,31 ---- CXX=@CXX@ CXXFLAGS+=@CXXFLAGS@ + LDFLAGS+=@LDFLAGS@ pc_version:=@pc_version@ xplcdir_version:=@xplcdir_version@ |
From: Simon L. <sf...@us...> - 2005-10-26 19:19:35
|
Update of /cvsroot/xplc/xplc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5857 Modified Files: configure.ac Log Message: Get XPLC building on FreeBSD 4.11. Index: configure.ac =================================================================== RCS file: /cvsroot/xplc/xplc/configure.ac,v retrieving revision 1.39 retrieving revision 1.40 diff -C2 -d -r1.39 -r1.40 *** configure.ac 21 Oct 2005 13:18:22 -0000 1.39 --- configure.ac 26 Oct 2005 19:19:27 -0000 1.40 *************** *** 97,100 **** --- 97,103 ---- esac + # Make sure we link in libc. + LDFLAGS="$LDFLAGS -lc" + if test "$with_dlopen" != "no"; then AC_CHECK_HEADERS(dlfcn.h) |
From: Simon L. <sf...@us...> - 2005-10-24 14:27:30
|
Update of /cvsroot/xplc/xplc/debian In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7084 Modified Files: copyright Log Message: Update copyright information. Index: copyright =================================================================== RCS file: /cvsroot/xplc/xplc/debian/copyright,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** copyright 8 Apr 2004 13:23:54 -0000 1.2 --- copyright 24 Oct 2005 14:27:22 -0000 1.3 *************** *** 20,22 **** XPLC is Copyright 2000-2004, Pierre Phaneuf, Copyright 2000-2004 Stéphane Lajoie and ! Copyright 2002-2004 Net Integration Technologies, Inc. --- 20,52 ---- 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. |
From: Simon L. <sf...@us...> - 2005-10-21 16:23:47
|
Update of /cvsroot/xplc/xplc/debian In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26641 Modified Files: .cvsignore changelog control.in rules Added Files: uuidcdef.install uuidcdef.manpages Log Message: Add a uuidcdef package. Index: .cvsignore =================================================================== RCS file: /cvsroot/xplc/xplc/debian/.cvsignore,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** .cvsignore 7 Oct 2004 03:17:57 -0000 1.3 --- .cvsignore 21 Oct 2005 16:23:40 -0000 1.4 *************** *** 5,9 **** libxplc libxplc-dev ! libxplc.substvars stamp-autotools-files stamp-makefile-build --- 5,9 ---- libxplc libxplc-dev ! uuidcdef.substvars stamp-autotools-files stamp-makefile-build Index: changelog =================================================================== RCS file: /cvsroot/xplc/xplc/debian/changelog,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** changelog 6 Jul 2005 18:11:16 -0000 1.21 --- changelog 21 Oct 2005 16:23:40 -0000 1.22 *************** *** 1,14 **** ! xplc (0.3.12-1.1) NONE; urgency=low * Unofficial build from CVS. ! -- J. Random Hacker <jrhacker@example> Wed, 7 Jul 2005 00:00:00 -0000 ! xplc (0.3.12-1) unstable; urgency=low * New upstream release. * Built for G++ 4.0. ! -- Simon Law <sf...@de...> Wed, 6 Jul 2005 12:36:20 -0400 xplc (0.3.11-1) unstable; urgency=low --- 1,15 ---- ! xplc (0.3.13-1.1) NONE; urgency=low * Unofficial build from CVS. ! -- J. Random Hacker <jrhacker@example> 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 <sf...@de...> Fri, 21 Oct 2005 09:48:37 -0400 xplc (0.3.11-1) unstable; urgency=low Index: rules =================================================================== RCS file: /cvsroot/xplc/xplc/debian/rules,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** rules 8 Apr 2005 22:50:50 -0000 1.5 --- rules 21 Oct 2005 16:23:40 -0000 1.6 *************** *** 1,3 **** --- 1,4 ---- #!/usr/bin/make -f + include /usr/share/cdbs/1/rules/debhelper.mk include /usr/share/cdbs/1/class/autotools.mk *************** *** 28,29 **** --- 29,35 ---- 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 Index: control.in =================================================================== RCS file: /cvsroot/xplc/xplc/debian/control.in,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** control.in 6 Jul 2005 18:11:16 -0000 1.4 --- control.in 21 Oct 2005 16:23:40 -0000 1.5 *************** *** 4,9 **** Maintainer: Simon Law <sf...@de...> Uploaders: James Morrison <ph...@de...> ! Build-Depends: cdbs, debhelper (>= 4.1.0) ! Standards-Version: 3.6.1.0 Package: libxplc@VERSION@ --- 4,9 ---- Maintainer: Simon Law <sf...@de...> Uploaders: James Morrison <ph...@de...> ! Build-Depends: uuid-dev, cdbs, debhelper (>= 4.1.0) ! Standards-Version: 3.6.2.0 Package: libxplc@VERSION@ *************** *** 21,25 **** Section: libdevel Architecture: any ! Depends: libxplc@VERSION@ (= ${Source-Version}), ${shlibs:Depends} Description: Light weight component system (Development libraries and headers) XPLC ("Cross-Platform Lightweight Components") is a component system that --- 21,25 ---- 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 *************** *** 28,29 **** --- 28,38 ---- 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. --- NEW FILE: uuidcdef.manpages --- debian/tmp/usr/share/man/man1/uuidcdef.1 --- NEW FILE: uuidcdef.install --- debian/tmp/usr/bin/uuidcdef |
From: Simon L. <sf...@us...> - 2005-10-21 16:22:59
|
Update of /cvsroot/xplc/xplc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26433 Modified Files: config.guess config.sub Log Message: Update with new autoconf host guessing. Index: config.guess =================================================================== RCS file: /cvsroot/xplc/xplc/config.guess,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** config.guess 14 Nov 2003 21:25:14 -0000 1.3 --- config.guess 21 Oct 2005 16:22:49 -0000 1.4 *************** *** 2,8 **** # Attempt to guess a canonical system name. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, ! # 2000, 2001, 2002 Free Software Foundation, Inc. ! timestamp='2002-05-29' # This file is free software; you can redistribute it and/or modify it --- 2,8 ---- # 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 *************** *** 54,58 **** Originally written by Per Bothner. ! Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. --- 54,58 ---- 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. *************** *** 89,109 **** fi ! dummy=dummy-$$ ! trap 'rm -f $dummy.c $dummy.o $dummy.rel $dummy; exit 1' 1 2 15 - # CC_FOR_BUILD -- compiler used by this script. # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still # use `HOST_CC' if defined, but it is deprecated. ! set_cc_for_build='case $CC_FOR_BUILD,$HOST_CC,$CC in ! ,,) echo "int dummy(){}" > $dummy.c ; for c in cc gcc c89 c99 ; do ! ($c $dummy.c -c -o $dummy.o) >/dev/null 2>&1 ; ! if test $? = 0 ; then CC_FOR_BUILD="$c"; break ; fi ; done ; - rm -f $dummy.c $dummy.o $dummy.rel ; if test x"$CC_FOR_BUILD" = x ; then CC_FOR_BUILD=no_compiler_found ; --- 89,121 ---- 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 ; *************** *** 112,116 **** ,,*) 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. --- 124,128 ---- ,,*) 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. *************** *** 169,173 **** esac # The OS release ! release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: --- 181,196 ---- 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: *************** *** 175,187 **** echo "${machine}-${os}${release}" exit 0 ;; amiga:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; ! arc:OpenBSD:*:*) ! echo mipsel-unknown-openbsd${UNAME_RELEASE} exit 0 ;; hp300:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; mac68k:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} --- 198,216 ---- 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} *************** *** 199,279 **** echo powerpc-unknown-openbsd${UNAME_RELEASE} exit 0 ;; - pmax:OpenBSD:*:*) - echo mipsel-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; sgi:OpenBSD:*:*) ! echo mipseb-unknown-openbsd${UNAME_RELEASE} exit 0 ;; sun3:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; - wgrisc:OpenBSD:*:*) - echo mipsel-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; *:OpenBSD:*:*) echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE} exit 0 ;; alpha:OSF1:*:*) ! if test $UNAME_RELEASE = "V4.0"; then UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` ! fi # 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. ! cat <<EOF >$dummy.s ! .data ! \$Lformat: ! .byte 37,100,45,37,120,10,0 # "%d-%x\n" ! ! .text ! .globl main ! .align 4 ! .ent main ! main: ! .frame \$30,16,\$26,0 ! ldgp \$29,0(\$27) ! .prologue 1 ! .long 0x47e03d80 # implver \$0 ! lda \$2,-1 ! .long 0x47e20c21 # amask \$2,\$1 ! lda \$16,\$Lformat ! mov \$0,\$17 ! not \$1,\$18 ! jsr \$26,printf ! ldgp \$29,0(\$26) ! mov 0,\$16 ! jsr \$26,exit ! .end main ! EOF ! eval $set_cc_for_build ! $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null ! if test "$?" = 0 ; then ! case `./$dummy` in ! 0-0) ! UNAME_MACHINE="alpha" ! ;; ! 1-0) ! UNAME_MACHINE="alphaev5" ! ;; ! 1-1) ! UNAME_MACHINE="alphaev56" ! ;; ! 1-101) ! UNAME_MACHINE="alphapca56" ! ;; ! 2-303) ! UNAME_MACHINE="alphaev6" ! ;; ! 2-307) ! UNAME_MACHINE="alphaev67" ! ;; ! 2-1307) ! UNAME_MACHINE="alphaev68" ! ;; ! esac ! fi ! rm -f $dummy.s $dummy ! echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` exit 0 ;; Alpha\ *:Windows_NT*:*) --- 228,301 ---- 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*:*) *************** *** 298,301 **** --- 320,329 ---- 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} *************** *** 315,318 **** --- 343,353 ---- 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/[^.]*//'` *************** *** 383,386 **** --- 418,424 ---- 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} *************** *** 421,428 **** } EOF ! $CC_FOR_BUILD $dummy.c -o $dummy \ ! && ./$dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ ! && rm -f $dummy.c $dummy && exit 0 ! rm -f $dummy.c $dummy echo mips-mips-riscos${UNAME_RELEASE} exit 0 ;; --- 459,465 ---- } 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 ;; *************** *** 430,434 **** echo powerpc-motorola-powermax exit 0 ;; ! Night_Hawk:*:*:PowerMAX_OS) echo powerpc-harris-powermax exit 0 ;; --- 467,474 ---- 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 ;; *************** *** 505,510 **** } EOF ! $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0 ! rm -f $dummy.c $dummy echo rs6000-ibm-aix3.2.5 elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then --- 545,549 ---- } 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 *************** *** 604,612 **** } EOF ! (CCOPTS= $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null) && HP_ARCH=`./$dummy` ! if test -z "$HP_ARCH"; then HP_ARCH=hppa; fi ! rm -f $dummy.c $dummy fi ;; esac echo ${HP_ARCH}-hp-hpux${HPUX_REV} exit 0 ;; --- 643,661 ---- } 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 ;; *************** *** 642,647 **** } EOF ! $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0 ! rm -f $dummy.c $dummy echo unknown-hitachi-hiuxwe2 exit 0 ;; --- 691,695 ---- } EOF ! $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0 echo unknown-hitachi-hiuxwe2 exit 0 ;; *************** *** 701,707 **** echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; - CRAY*T3D:*:*:*) - echo alpha-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit 0 ;; CRAY*T3E:*:*:*) echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' --- 749,752 ---- *************** *** 710,713 **** --- 755,761 ---- 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'` *************** *** 716,719 **** --- 764,772 ---- 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} *************** *** 737,742 **** echo ${UNAME_MACHINE}-pc-pw32 exit 0 ;; ! x86:Interix*:3*) ! echo i386-pc-interix3 exit 0 ;; i*:Windows_NT*:* | Pentium*:Windows_NT*:*) --- 790,798 ---- 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*:*) *************** *** 744,752 **** # 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 i386-pc-interix exit 0 ;; i*:UWIN*:*) echo ${UNAME_MACHINE}-pc-uwin exit 0 ;; p*:CYGWIN*:*) echo powerpcle-unknown-cygwin --- 800,811 ---- # 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 *************** *** 756,761 **** --- 815,825 ---- 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 *************** *** 764,770 **** --- 828,846 ---- 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 *************** *** 787,792 **** EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` ! rm -f $dummy.c ! test x"${CPU}" != x && echo "${CPU}-pc-linux-gnu" && exit 0 ;; ppc:Linux:*:*) --- 863,886 ---- 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:*:*) *************** *** 824,827 **** --- 918,924 ---- 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 *************** *** 850,854 **** a.out-i386-linux) echo "${UNAME_MACHINE}-pc-linux-gnuaout" ! exit 0 ;; coff-i386) echo "${UNAME_MACHINE}-pc-linux-gnucoff" --- 947,951 ---- a.out-i386-linux) echo "${UNAME_MACHINE}-pc-linux-gnuaout" ! exit 0 ;; coff-i386) echo "${UNAME_MACHINE}-pc-linux-gnucoff" *************** *** 881,887 **** #endif #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` - rm -f $dummy.c test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0 test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0 --- 978,986 ---- #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 *************** *** 901,904 **** --- 1000,1023 ---- 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$//'` *************** *** 935,941 **** fi exit 0 ;; - i*86:*DOS:*:*) - echo ${UNAME_MACHINE}-pc-msdosdjgpp - exit 0 ;; pc:*:*:*) # Left here for compatibility: --- 1054,1057 ---- *************** *** 961,967 **** echo m68010-convergent-sysv exit 0 ;; ! M68*:*:R3V[567]*:*) test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;; ! 3[34]??:*: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) OS_REL='' test -r /etc/.relid \ --- 1077,1089 ---- 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 \ *************** *** 980,986 **** echo m68k-atari-sysv4 exit 0 ;; - i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) - echo i386-unknown-lynxos${UNAME_RELEASE} - exit 0 ;; TSUNAMI:LynxOS:2.*:*) echo sparc-unknown-lynxos${UNAME_RELEASE} --- 1102,1105 ---- *************** *** 1022,1025 **** --- 1141,1148 ---- echo i860-stratus-sysv4 exit 0 ;; + i*86:VOS:*:*) + # From Pau...@st.... + echo ${UNAME_MACHINE}-stratus-vos + exit 0 ;; *:VOS:*:*) # From Pau...@st.... *************** *** 1054,1057 **** --- 1177,1183 ---- 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} *************** *** 1061,1065 **** exit 0 ;; *:Darwin:*:*) ! echo `uname -p`-apple-darwin${UNAME_RELEASE} exit 0 ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) --- 1187,1196 ---- 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]*:*) *************** *** 1074,1078 **** echo i386-pc-qnx exit 0 ;; ! NSR-[GKLNPTVW]:NONSTOP_KERNEL:*:*) echo nsr-tandem-nsk${UNAME_RELEASE} exit 0 ;; --- 1205,1212 ---- 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 ;; *************** *** 1097,1105 **** echo ${UNAME_MACHINE}-unknown-plan9 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 ;; *:TOPS-10:*:*) echo pdp10-unknown-tops10 --- 1231,1234 ---- *************** *** 1120,1128 **** echo pdp10-unknown-its exit 0 ;; ! i*86:XTS-300:*:STOP) ! echo ${UNAME_MACHINE}-unknown-stop exit 0 ;; ! i*86:atheos:*:*) ! echo ${UNAME_MACHINE}-unknown-atheos exit 0 ;; esac --- 1249,1267 ---- 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 *************** *** 1246,1251 **** EOF ! $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy && rm -f $dummy.c $dummy && exit 0 ! rm -f $dummy.c $dummy # Apollos put the system type in the environment. --- 1385,1389 ---- EOF ! $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && $dummy && exit 0 # Apollos put the system type in the environment. *************** *** 1286,1290 **** download the most up to date version of the config scripts from ! ftp://ftp.gnu.org/pub/gnu/config/ If the version you run ($0) is already up to date, please --- 1424,1430 ---- download the most up to date version of the config scripts from ! http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.guess ! and ! http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.sub If the version you run ($0) is already up to date, please Index: config.sub =================================================================== RCS file: /cvsroot/xplc/xplc/config.sub,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** config.sub 14 Nov 2003 21:25:14 -0000 1.3 --- config.sub 21 Oct 2005 16:22:49 -0000 1.4 *************** *** 2,8 **** # Configuration validation subroutine script. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, ! # 2000, 2001, 2002 Free Software Foundation, Inc. ! timestamp='2002-06-21' # This file is (in principle) common to ALL GNU software. --- 2,8 ---- # 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. *************** *** 71,75 **** GNU config.sub ($timestamp) ! Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. --- 71,75 ---- GNU config.sub ($timestamp) ! Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. *************** *** 119,123 **** maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in ! nto-qnx* | linux-gnu* | storm-chaos* | os2-emx* | windows32-* | rtmk-nova*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` --- 119,124 ---- 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/'` *************** *** 145,149 **** -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ ! -apple | -axis) os= basic_machine=$1 --- 146,150 ---- -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ ! -apple | -axis | -knuth | -cray) os= basic_machine=$1 *************** *** 229,233 **** --- 230,236 ---- | 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 \ *************** *** 235,243 **** | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | i370 | i860 | i960 | ia64 \ ! | ip2k \ ! | m32r | m68000 | m68k | m88k | mcore \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ | mips64orion | mips64orionel \ | mips64vr4100 | mips64vr4100el \ --- 238,247 ---- | 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 \ *************** *** 245,252 **** --- 249,260 ---- | mips64vr5000 | mips64vr5000el \ | mipsisa32 | mipsisa32el \ + | mipsisa32r2 | mipsisa32r2el \ | mipsisa64 | mipsisa64el \ + | mipsisa64r2 | mipsisa64r2el \ | mipsisa64sb1 | mipsisa64sb1el \ + | mipsisa64sr71k | mipsisa64sr71kel \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ + | msp430 \ | ns16k | ns32k \ | openrisc | or32 \ *************** *** 254,265 **** | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ | pyramid \ ! | sh | sh[1234] | sh3e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ ! | sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv9 | sparcv9b \ | strongarm \ ! | tahoe | thumb | tic80 | tron \ | v850 | v850e \ | we32k \ ! | x86 | xscale | xstormy16 | xtensa \ | z8k) basic_machine=$basic_machine-unknown --- 262,274 ---- | 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 *************** *** 292,298 **** | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | avr-* \ ! | bs2000-* \ ! | c[123]* | c30-* | [cjt]90-* | c54x-* \ ! | clipper-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ | elxsi-* \ --- 301,307 ---- | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | avr-* \ ! | bfin-* | bs2000-* \ ! | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ ! | clipper-* | craynv-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ | elxsi-* \ *************** *** 301,311 **** | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | i*86-* | i860-* | i960-* | ia64-* \ ! | ip2k-* \ ! | m32r-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ ! | m88110-* | m88k-* | mcore-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | mips16-* \ | mips64-* | mips64el-* \ | mips64orion-* | mips64orionel-* \ | mips64vr4100-* | mips64vr4100el-* \ --- 310,321 ---- | 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-* \ *************** *** 313,319 **** | mips64vr5000-* | mips64vr5000el-* \ | mipsisa32-* | mipsisa32el-* \ | mipsisa64-* | mipsisa64el-* \ | mipsisa64sb1-* | mipsisa64sb1el-* \ ! | mipstx39 | mipstx39el \ | none-* | np1-* | ns16k-* | ns32k-* \ | orion-* \ --- 323,334 ---- | mips64vr5000-* | mips64vr5000el-* \ | mipsisa32-* | mipsisa32el-* \ + | mipsisa32r2-* | mipsisa32r2el-* \ | mipsisa64-* | mipsisa64el-* \ + | mipsisa64r2-* | mipsisa64r2el-* \ | mipsisa64sb1-* | mipsisa64sb1el-* \ ! | mipsisa64sr71k-* | mipsisa64sr71kel-* \ ! | mipstx39-* | mipstx39el-* \ ! | mmix-* \ ! | msp430-* \ | none-* | np1-* | ns16k-* | ns32k-* \ | orion-* \ *************** *** 322,334 **** | pyramid-* \ | romp-* | rs6000-* \ ! | sh-* | sh[1234]-* | sh3e-* | sh[34]eb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ ! | sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \ ! | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \ ! | tahoe-* | thumb-* | tic30-* | tic54x-* | tic80-* | tron-* \ | v850-* | v850e-* | vax-* \ | we32k-* \ ! | x86-* | x86_64-* | xps100-* | xscale-* | xstormy16-* \ ! | xtensa-* \ | ymp-* \ | z8k-*) --- 337,352 ---- | 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-*) *************** *** 350,353 **** --- 368,374 ---- os=-udi ;; + abacus) + basic_machine=abacus-unknown + ;; adobe68k) basic_machine=m68010-adobe *************** *** 364,367 **** --- 385,394 ---- os=-bsd ;; + amd64) + basic_machine=x86_64-pc + ;; + amd64-*) + basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; amdahl) basic_machine=580-amdahl *************** *** 423,432 **** --- 450,474 ---- 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 *************** *** 451,454 **** --- 493,500 ---- os=-sysv3 ;; + djgpp) + basic_machine=i586-pc + os=-msdosdjgpp + ;; dpx20 | dpx20-*) basic_machine=rs6000-bull *************** *** 629,636 **** basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown ;; - mmix*) - basic_machine=mmix-knuth - os=-mmixware - ;; monitor) basic_machine=m68k-rom68k --- 675,678 ---- *************** *** 724,727 **** --- 766,773 ---- os=-coff ;; + os400) + basic_machine=powerpc-ibm + os=-os400 + ;; OSE68000 | ose68000) basic_machine=m68000-ericsson *************** *** 746,750 **** basic_machine=m68k-tti ;; ! pc532 | pc532-*) basic_machine=ns32k-pc532 ;; --- 792,796 ---- basic_machine=m68k-tti ;; ! pc532 | pc532-*) basic_machine=ns32k-pc532 ;; *************** *** 752,761 **** basic_machine=i586-pc ;; ! pentiumpro | p6 | 6x86 | athlon) basic_machine=i686-pc ;; ! pentiumii | pentium2) basic_machine=i686-pc ;; pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` --- 798,810 ---- 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/^[^-]*-//'` *************** *** 764,770 **** basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ! pentiumii-* | pentium2-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pn) basic_machine=pn-gould --- 813,822 ---- 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 *************** *** 773,792 **** ;; 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/^[^-]*-//'` --- 825,844 ---- ;; 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/^[^-]*-//'` *************** *** 819,822 **** --- 871,884 ---- os=-udi ;; + sb1) + basic_machine=mipsisa64sb1-unknown + ;; + sb1el) + basic_machine=mipsisa64sb1el-unknown + ;; + sei) + basic_machine=mips-sei + os=-seiux + ;; sequent) basic_machine=i386-sequent *************** *** 826,829 **** --- 888,894 ---- os=-hms ;; + sh64) + basic_machine=sh64-unknown + ;; sparclite-wrs | simso-wrs) basic_machine=sparclite-wrs *************** *** 884,888 **** basic_machine=i386-sun ;; ! sv1) basic_machine=sv1-cray os=-unicos --- 949,953 ---- basic_machine=i386-sun ;; ! sv1) basic_machine=sv1-cray os=-unicos *************** *** 892,899 **** os=-dynix ;; - t3d) - basic_machine=alpha-cray - os=-unicos - ;; t3e) basic_machine=alphaev5-cray --- 957,960 ---- *************** *** 908,911 **** --- 969,980 ---- os=-coff ;; + tic55x | c55x*) + basic_machine=tic55x-unknown + os=-coff + ;; + tic6x | c6x*) + basic_machine=tic6x-unknown + os=-coff + ;; tx39) basic_machine=mipstx39-unknown *************** *** 921,924 **** --- 990,997 ---- basic_machine=m68k-ncr ;; + tpf) + basic_machine=s390x-ibm + os=-tpf + ;; udi29k) basic_machine=a29k-amd *************** *** 942,947 **** ;; vpp*|vx|vx-*) ! basic_machine=f301-fujitsu ! ;; vxworks960) basic_machine=i960-wrs --- 1015,1020 ---- ;; vpp*|vx|vx-*) ! basic_machine=f301-fujitsu ! ;; vxworks960) basic_machine=i960-wrs *************** *** 964,972 **** os=-proelf ;; ! windows32) ! basic_machine=i386-pc ! os=-windows32-msvcrt ;; ! xps | xps100) basic_machine=xps100-honeywell ;; --- 1037,1045 ---- os=-proelf ;; ! xbox) ! basic_machine=i686-pc ! os=-mingw32 ;; ! xps | xps100) basic_machine=xps100-honeywell ;; *************** *** 998,1001 **** --- 1071,1077 ---- basic_machine=romp-ibm ;; + mmix) + basic_machine=mmix-knuth + ;; rs6000) basic_machine=rs6000-ibm *************** *** 1014,1018 **** basic_machine=we32k-att ;; ! sh3 | sh4 | sh3eb | sh4eb | sh[1234]le | sh3ele) basic_machine=sh-unknown ;; --- 1090,1094 ---- basic_machine=we32k-att ;; ! sh3 | sh4 | sh[34]eb | sh[1234]le | sh[23]ele) basic_machine=sh-unknown ;; *************** *** 1020,1027 **** basic_machine=sh64-unknown ;; ! sparc | sparcv9 | sparcv9b) basic_machine=sparc-sun ;; ! cydra) basic_machine=cydra-cydrome ;; --- 1096,1103 ---- basic_machine=sh64-unknown ;; ! sparc | sparcv8 | sparcv9 | sparcv9b) basic_machine=sparc-sun ;; ! cydra) basic_machine=cydra-cydrome ;; *************** *** 1038,1045 **** basic_machine=powerpc-apple ;; - c4x*) - basic_machine=c4x-none - os=-coff - ;; *-unknown) # Make sure to match an already-canonicalized machine name. --- 1114,1117 ---- *************** *** 1097,1112 **** | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ ! | -hiux* | -386bsd* | -netbsd* | -openbsd* | -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* | -uxpv* | -beos* | -mpeix* | -udk* \ ! | -interix* | -uwin* | -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*) # Remember, each alternative MUST END IN *, to match a version number. ;; --- 1169,1186 ---- | -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. ;; *************** *** 1120,1125 **** esac ;; -nto*) ! os=-nto-qnx ;; -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ --- 1194,1201 ---- esac ;; + -nto-qnx*) + ;; -nto*) ! os=`echo $os | sed -e 's|nto|nto-qnx|'` ;; -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ *************** *** 1130,1133 **** --- 1206,1212 ---- os=`echo $os | sed -e 's|mac|macos|'` ;; + -linux-dietlibc) + os=-linux-dietlibc + ;; -linux*) os=`echo $os | sed -e 's|linux|linux-gnu|'` *************** *** 1142,1145 **** --- 1221,1227 ---- os=-openedition ;; + -os400*) + os=-os400 + ;; -wince*) os=-wince *************** *** 1163,1166 **** --- 1245,1251 ---- os=-atheos ;; + -syllable*) + os=-syllable + ;; -386bsd) os=-bsd *************** *** 1173,1177 **** ;; -ns2 ) ! os=-nextstep2 ;; -nsk*) --- 1258,1262 ---- ;; -ns2 ) ! os=-nextstep2 ;; -nsk*) *************** *** 1185,1188 **** --- 1270,1276 ---- os=-sysv4 ;; + -tpf*) + os=-tpf + ;; -triton*) os=-sysv3 *************** *** 1212,1217 **** os=-xenix ;; ! -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) ! os=-mint ;; -none) --- 1300,1314 ---- os=-xenix ;; ! -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) ! os=-mint ! ;; ! -aros*) ! os=-aros ! ;; ! -kaos*) ! os=-kaos ! ;; ! -zvmoe) ! os=-zvmoe ;; -none) *************** *** 1246,1254 **** os=-aout ;; # This must come before the *-dec entry. pdp10-*) os=-tops20 ;; ! pdp11-*) os=-none ;; --- 1343,1354 ---- os=-aout ;; + c4x-* | tic4x-*) + os=-coff + ;; # This must come before the *-dec entry. pdp10-*) os=-tops20 ;; ! pdp11-*) os=-none ;; *************** *** 1292,1295 **** --- 1392,1398 ---- os=-aix ;; + *-knuth) + os=-mmixware + ;; *-wec) os=-proelf *************** *** 1343,1350 **** os=-nextstep3 ;; ! *-gould) os=-sysv ;; ! *-highlevel) os=-bsd ;; --- 1446,1453 ---- os=-nextstep3 ;; ! *-gould) os=-sysv ;; ! *-highlevel) os=-bsd ;; *************** *** 1352,1359 **** os=-bsd ;; ! *-sgi) os=-irix ;; ! *-siemens) os=-sysv4 ;; --- 1455,1462 ---- os=-bsd ;; ! *-sgi) os=-irix ;; ! *-siemens) os=-sysv4 ;; *************** *** 1424,1430 **** --- 1527,1539 ---- vendor=ibm ;; + -os400*) + vendor=ibm + ;; -ptx*) vendor=sequent ;; + -tpf*) + vendor=ibm + ;; -vxsim* | -vxworks* | -windiss*) vendor=wrs |
From: Simon L. <sf...@us...> - 2005-10-21 16:19:09
|
Update of /cvsroot/xplc/xplc/uuid/bin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25510/bin Modified Files: uuidgen.c Log Message: Bug report address. Index: uuidgen.c =================================================================== RCS file: /cvsroot/xplc/xplc/uuid/bin/uuidgen.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** uuidgen.c 21 Oct 2005 14:18:55 -0000 1.3 --- uuidgen.c 21 Oct 2005 16:19:01 -0000 1.4 *************** *** 84,87 **** --- 84,89 ---- "universally\n" "unique identifier (UUID), and output it as requested.\n"); + printf("\n" + "Report bugs to <" PACKAGE_BUGREPORT ">.\n"); } |
From: Simon L. <sf...@us...> - 2005-10-21 15:01:02
|
Update of /cvsroot/xplc/xplc/config In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3739/config Modified Files: rules.mk Log Message: Manpages go in man1. Index: rules.mk =================================================================== RCS file: /cvsroot/xplc/xplc/config/rules.mk,v retrieving revision 1.48 retrieving revision 1.49 diff -C2 -d -r1.48 -r1.49 *** rules.mk 21 Oct 2005 14:56:40 -0000 1.48 --- rules.mk 21 Oct 2005 15:00:44 -0000 1.49 *************** *** 106,110 **** installdirs: mkdir -p $(DESTDIR)$(bindir) ! mkdir -p $(DESTDIR)$(mandir) mkdir -p $(DESTDIR)$(libdir)/pkgconfig mkdir -p $(DESTDIR)$(libdir)$(xplcdir_version) --- 106,110 ---- installdirs: mkdir -p $(DESTDIR)$(bindir) ! mkdir -p $(DESTDIR)$(mandir)/man1 mkdir -p $(DESTDIR)$(libdir)/pkgconfig mkdir -p $(DESTDIR)$(libdir)$(xplcdir_version) *************** *** 118,126 **** $(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) $(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)/uuidcdef.1 uninstall: --- 118,126 ---- $(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: *************** *** 130,134 **** rm -f $(DESTDIR)$(libdir)/pkgconfig/xplc$(pc_version).pc rm -f $(DESTDIR)$(bindir)/uuidgen $(DESTDIR)$(bindir)/uuidcdef ! rm -f $(DESTDIR)$(mandir)/uuidgen.1 $(DESTDIR)$(mandir)/uuidcdef.1 rm -rf $(DESTDIR)$(includedir)$(xplcdir_version)/xplc ifneq ($(xplcdir_version),) --- 130,135 ---- 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),) |
From: Simon L. <sf...@us...> - 2005-10-21 14:56:49
|
Update of /cvsroot/xplc/xplc/config In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2514/config Modified Files: config.mk.in rules.mk Log Message: Add a manpage for uuidgen. Index: rules.mk =================================================================== RCS file: /cvsroot/xplc/xplc/config/rules.mk,v retrieving revision 1.47 retrieving revision 1.48 diff -C2 -d -r1.47 -r1.48 *** rules.mk 21 Oct 2005 13:18:22 -0000 1.47 --- rules.mk 21 Oct 2005 14:56:40 -0000 1.48 *************** *** 106,109 **** --- 106,110 ---- installdirs: mkdir -p $(DESTDIR)$(bindir) + mkdir -p $(DESTDIR)$(mandir) mkdir -p $(DESTDIR)$(libdir)/pkgconfig mkdir -p $(DESTDIR)$(libdir)$(xplcdir_version) *************** *** 112,125 **** install: default installdirs $(INSTALL_PROGRAM) libxplc.so $(DESTDIR)$(libdir)/libxplc.so.$(PACKAGE_VERSION) - $(INSTALL_DATA) libxplc.a $(DESTDIR)$(libdir)$(libdir_version) - $(INSTALL_DATA) libxplc-cxx.a $(DESTDIR)$(libdir)$(libdir_version) - $(INSTALL_PROGRAM) uuid/bin/uuidgen $(DESTDIR)$(bindir) $(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 $(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 uninstall: --- 113,126 ---- 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) $(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)/uuidcdef.1 uninstall: *************** *** 129,132 **** --- 130,134 ---- rm -f $(DESTDIR)$(libdir)/pkgconfig/xplc$(pc_version).pc rm -f $(DESTDIR)$(bindir)/uuidgen $(DESTDIR)$(bindir)/uuidcdef + rm -f $(DESTDIR)$(mandir)/uuidgen.1 $(DESTDIR)$(mandir)/uuidcdef.1 rm -rf $(DESTDIR)$(includedir)$(xplcdir_version)/xplc ifneq ($(xplcdir_version),) Index: config.mk.in =================================================================== RCS file: /cvsroot/xplc/xplc/config/config.mk.in,v retrieving revision 1.39 retrieving revision 1.40 diff -C2 -d -r1.39 -r1.40 *** config.mk.in 21 Oct 2005 13:18:22 -0000 1.39 --- config.mk.in 21 Oct 2005 14:56:40 -0000 1.40 *************** *** 40,43 **** --- 40,44 ---- libdir:=@libdir@ bindir:=@bindir@ + mandir:=@mandir@ INSTALL:=@INSTALL@ INSTALL_PROGRAM:=@INSTALL_PROGRAM@ |
From: Simon L. <sf...@us...> - 2005-10-21 14:56:48
|
Update of /cvsroot/xplc/xplc/uuid/bin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2514/uuid/bin Added Files: uuidgen.1 Log Message: Add a manpage for uuidgen. --- NEW FILE: uuidgen.1 --- .\" 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). |
From: Simon L. <sf...@us...> - 2005-10-21 14:19:06
|
Update of /cvsroot/xplc/xplc/uuid/bin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25040 Modified Files: uuidgen.c Log Message: New FSF address. Index: uuidgen.c =================================================================== RCS file: /cvsroot/xplc/xplc/uuid/bin/uuidgen.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** uuidgen.c 21 Oct 2005 14:17:07 -0000 1.2 --- uuidgen.c 21 Oct 2005 14:18:55 -0000 1.3 *************** *** 16,21 **** * 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 --- 16,20 ---- * 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 |
From: Simon L. <sf...@us...> - 2005-10-21 14:17:16
|
Update of /cvsroot/xplc/xplc/uuid/bin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24491 Modified Files: uuidgen.c Log Message: Fix whitespace. Index: uuidgen.c =================================================================== RCS file: /cvsroot/xplc/xplc/uuid/bin/uuidgen.c,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** uuidgen.c 21 Oct 2005 13:18:22 -0000 1.1 --- uuidgen.c 21 Oct 2005 14:17:07 -0000 1.2 *************** *** 75,88 **** 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"); } --- 75,88 ---- 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"); } *************** *** 90,100 **** 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"); } --- 90,100 ---- 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"); } *************** *** 103,107 **** if(!cfg) { fprintf(stderr, ! "%s: Programmer error at %s:%d\n", program, __FILE__, __LINE__); abort(); } --- 103,107 ---- if(!cfg) { fprintf(stderr, ! "%s: Programmer error at %s:%d\n", program, __FILE__, __LINE__); abort(); } *************** *** 132,138 **** default: fprintf(stderr, ! "%s: invalid option -- %c\n" ! "Try `%s --help' for more information.\n", ! program, flag, program); return 1; } --- 132,138 ---- default: fprintf(stderr, ! "%s: invalid option -- %c\n" ! "Try `%s --help' for more information.\n", ! program, flag, program); return 1; } *************** *** 157,163 **** else { fprintf(stderr, ! "%s: unrecognised option `%s'\n" ! "Try `%s --help' for more information.\n", ! program, option, program); ret = 1; } --- 157,163 ---- else { fprintf(stderr, ! "%s: unrecognised option `%s'\n" ! "Try `%s --help' for more information.\n", ! program, option, program); ret = 1; } *************** *** 171,175 **** if(!cfg) { fprintf(stderr, ! "%s: Programmer error at %s:%d\n", program, __FILE__, __LINE__); abort(); } --- 171,175 ---- if(!cfg) { fprintf(stderr, ! "%s: Programmer error at %s:%d\n", program, __FILE__, __LINE__); abort(); } *************** *** 188,233 **** 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; ! } } } --- 188,233 ---- 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; ! } } } *************** *** 246,266 **** 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; } --- 246,266 ---- 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; } |
From: Simon L. <sf...@us...> - 2005-10-21 13:18:45
|
Update of /cvsroot/xplc/xplc/uuid/bin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4380/uuid/bin Added Files: .cvsignore tst_uuid.c uuidgen.c Log Message: 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 --- NEW FILE: .cvsignore --- .*.d tst_uuid uuidgen uuidcdef --- NEW FILE: uuidgen.c --- /* -*- 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., 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 <assert.h> #include <errno.h> #ifdef HAVE_STDLIB_H # include <stdlib.h> #endif #include <stdio.h> #ifdef HAVE_STRING_H # include <string.h> #endif #ifdef HAVE_UNISTD_H # include <unistd.h> #endif #include <uuid/uuid.h> #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"); } 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; } --- NEW FILE: tst_uuid.c --- /* * 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 <stdio.h> #include <stdlib.h> #include <uuid/uuid.h> 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; } |
From: Simon L. <sf...@us...> - 2005-10-21 13:18:38
|
Update of /cvsroot/xplc/xplc/uuid In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4380/uuid Added Files: .cvsignore COPYING ChangeLog clear.c compare.c copy.c gen_uuid.c gen_uuid_nt.c isnull.c pack.c parse.c rules.mk unpack.c unparse.c uuid.h uuidP.h uuid_time.c uuid_types.h.in vars.mk Log Message: 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 --- NEW FILE: compare.c --- /* * 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 <string.h> #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); } --- NEW FILE: rules.mk --- # 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) --- NEW FILE: unpack.c --- /* * 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 <string.h> #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); } --- NEW FILE: .cvsignore --- .*.d *.o libuuid.a uuid_types.h --- NEW FILE: ChangeLog --- 2005-10-18 Simon Law <sf...@ni...> * Imported libuuid into XPLC. * rules.mk vars.mk: Build system changes. * gen_uuid_nt.c: Better Win32 support. 2005-06-30 Theodore Ts'o <ty...@mi...> * Release of E2fsprogs 1.38 2005-03-21 Theodore Ts'o <ty...@mi...> * Release of E2fsprogs 1.37 2006-02-05 Theodore Ts'o <ty...@mi...> * Release of E2fsprogs 1.36 2005-02-05 Theodore Ts'o <ty...@mi...> * Makefile.in: Remove uuid.pc on a "make distclean" 2005-01-26 Theodore Ts'o <ty...@mi...> * uuid.pc.in: Add pkg-config files. 2005-01-18 Theodore Ts'o <ty...@mi...> * Makefile.in: Fix the kernel compile-time echo commands to be consistent and portable 2005-01-17 Theodore Ts'o <ty...@mi...> * uuidP.h: Use inttypes.h in preference to stdint.h for compatibility with older FreeBSD and Solaris systems. 2004-12-14 Theodore Ts'o <ty...@mi...> * 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 <ty...@mi...> * Makefile.in: Use Linux-kernel-style makefile output to make it easier to see errors/warnings. 2004-09-17 Theodore Ts'o <ty...@mi...> * 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 <ty...@mi...> * 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 <ty...@mi...> * 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 <ty...@mi...> * 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 <ty...@mi...> * 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 <ty...@mi...> * gen_uuid.c (get_node_id): Clean up AF_LINK #ifdef's for Darwin. 2004-03-22 Theodore Ts'o <ty...@mi...> * unparse.c (uuid_unparse_lower, uuid_unparse_upper), uuid_unparse.3.in, uuid.h: Add new functions. 2004-03-19 Theodore Ts'o <ty...@mi...> * 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 <br...@be...> * Makefile.in: Use $(BSDLIB_PIC_FLAG) to determine whether to use -fpic or -fPIC 2004-02-28 Theodore Ts'o <ty...@mi...> * Release of E2fsprogs 1.35 2004-01-30 Theodore Ts'o <ty...@mi...> * 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 <ty...@mi...> * Release of E2fsprogs 1.34 2003-04-21 Theodore Ts'o <ty...@mi...> * Release of E2fsprogs 1.33 2003-04-21 Theodore Ts'o <ty...@mi...> * 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 <ty...@mi...> * gen_uuid.c: Add #ifdef checks around #include <sys/ioctl.h> and <sys/socket.h>. 2003-04-03 Theodore Ts'o <ty...@mi...> * 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 <ty...@mi...> * Makefile.in: Add support for Apple Darwin 2003-03-06 Theodore Tso <ty...@mi...> * 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 <ty...@mi...> * Makefile.in, uuidP.h, uuid_types.h.in: Use uuid_types.h instead of ext2_types.h 2002-11-09 Theodore Ts'o <ty...@mi...> * Release of E2fsprogs 1.32 2002-11-08 Theodore Ts'o <ty...@mi...> * Release of E2fsprogs 1.31 2002-10-31 Theodore Ts'o <ty...@mi...> * Release of E2fsprogs 1.30 2002-10-31 Theodore Ts'o <ty...@mi...> * 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 <ty...@mi...> * Release of E2fsprogs 1.29 2001-08-31 Theodore Tso <ty...@th...> * Release of E2fsprogs 1.28 2002-07-15 Theodore Ts'o <ty...@mi...> * 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 <ty...@mi...> * Release of E2fsprogs 1.27 2002-02-24 Theodore Tso <ty...@mi...> * 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 <ty...@th...> * Release of E2fsprogs 1.26 2001-09-20 Theodore Tso <ty...@th...> * Release of E2fsprogs 1.25 2001-09-10 Theodore Tso <ty...@mi...> * 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 <ty...@th...> * Release of E2fsprogs 1.24a 2001-08-30 Theodore Tso <ty...@th...> * Release of E2fsprogs 1.24 2001-08-15 Theodore Tso <ty...@va...> * Release of E2fsprogs 1.23 2001-06-23 Theodore Tso <ty...@va...> * Release of E2fsprogs 1.22 2001-06-21 Theodore Tso <ty...@va...> * uuid.h: Add protection against multiple inclusion 2001-06-15 Theodore Tso <ty...@va...> * Release of E2fsprogs 1.21 2001-06-01 Theodore Tso <ty...@va...> * Makefile.in, uuidP.h: Move include/asm/types.h.in to lib/ext2fs/ext2_types.h.in. 2001-06-01 Theodore Tso <ty...@va...> * 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 <ty...@va...> * Release of E2fsprogs 1.20 2001-05-14 Theodore Tso <ty...@va...> * tst_uuid.c, uuid_time.c: Remove unneeded #include of ext2_fs.h 2001-05-12 Theodore Tso <ty...@va...> * 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 <ty...@va...> * 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 <ty...@va...> * 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 <ty...@va...> * Release of E2fsprogs 1.19 2000-07-07 Theodore Ts'o <ty...@va...> * 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 <ty...@va...> * 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 <ty...@va...> * 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 <ty...@sn...> * Makefile: Add hack dependency rule so that parallel makes work correctly. 2000-04-07 Theodore Ts'o <ty...@va...> * 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 <ty...@si...> * 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 <ty...@va...> * 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 <ty...@va...> * 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 <ty...@va...> * 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 <ty...@va...> * Makefile.in (distclean): Remove TAGS and Makefile.in.old from the source directory. 1999-11-10 <ty...@va...> * Release of E2fsprogs 1.18 1999-10-26 <ty...@va...> * Release of E2fsprogs 1.17 1999-10-26 <ty...@va...> * 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 <ty...@va...> * 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 <ty...@va...> * Release of E2fsprogs 1.16 1999-10-21 <ty...@va...> * uuid_generate.8.in: Update man page to use a more standard format (bold option flags and italicized variables), as suggested by Andreas Dilger (ad...@en...) 1999-09-24 <ty...@va...> * gen_uuid_nt.c: New file which creates a UUID under Windows NT. 1999-07-18 Theodore Ts'o <ty...@rs...> * Release of E2fsprogs 1.15 1999-05-17 <ty...@rs...> * 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 <ty...@rs...> * 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 <ad...@en...> * Created man pages for libuuid functions. 1999-01-09 Theodore Ts'o <ty...@rs...> * Release of E2fsprogs 1.14 1998-12-15 Theodore Ts'o <ty...@rs...> * Release of E2fsprogs 1.13 1998-12-04 Theodore Ts'o <ty...@rs...> * 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 <ty...@rs...> * Release of E2fsprogs 1.12 1998-06-25 Theodore Ts'o <ty...@rs...> * tst_uuid.c (main): Fixed bogus declaration of the main's argv parameter. 1998-04-26 Theodore Ts'o <ty...@rs...> * 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 <ty...@rs...> * 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 <ty...@rs...> * 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 <ty...@rs...> * 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 <ty...@rs...> * Release of E2fsprogs 1.11 Thu Apr 24 12:16:42 1997 Theodre Ts'o <ty...@lo...> * Release of E2fsprogs version 1.10 Thu Apr 17 12:23:38 1997 Theodore Ts'o <ty...@rs...> * Release of E2fsprogs version 1.09 Fri Apr 11 18:56:26 1997 Theodore Ts'o <ty...@rs...> * Release of E2fsprogs version 1.08 Wed Mar 12 13:32:05 1997 Theodore Y. Ts'o <ty...@mi...> * Release of E2fsprogs version 1.07 Sun Mar 2 16:45:36 1997 Theodore Ts'o <ty...@rs...> * Makefile.in (ELF_VERSION): Change version to be 1.1 Thu Feb 6 23:08:07 1997 Theodore Ts'o <ty...@rs...> * 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 <ty...@rs...> * unpack.c, pack.c: Include string.h, since we use memcpy(). Tue Dec 3 13:05:11 1996 Theodore Ts'o <ty...@rs...> * 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 <ty...@rs...> * Makefile.in (DLL_ADDRESS): Updated DLL address for libuuid. Tue Oct 8 02:02:03 1996 Theodore Ts'o <ty...@rs...> * Release of E2fsprogs version 1.06 Thu Sep 12 15:23:07 1996 Theodore Ts'o <ty...@rs...> * Release of E2fsprogs version 1.05 Tue Aug 27 16:50:43 1996 Miles Bader <mi...@gn...> * uuid/gen_uuid.c [HAVE_NET_IF_H] <net/if.h>: Include guarded. [HAVE_NETINET_IN_H] <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 <ty...@rs...> * gen_uuid.c (get_node_id): Add a specific ifdef for the HURD, since it is broken w.r.t getting hardware addresses. --- NEW FILE: gen_uuid.c --- /* * 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 <unistd.h> #endif #ifdef HAVE_STDLIB_H #include <stdlib.h> #endif #include <string.h> #include <fcntl.h> #include <errno.h> #include <sys/types.h> #include <sys/time.h> #include <sys/stat.h> #include <sys/file.h> #ifdef HAVE_SYS_IOCTL_H #include <sys/ioctl.h> #endif #ifdef HAVE_SYS_SOCKET_H #include <sys/socket.h> #endif #ifdef HAVE_SYS_SOCKIO_H #include <sys/sockio.h> #endif #ifdef HAVE_NET_IF_H #include <net/if.h> #endif #ifdef HAVE_NETINET_IN_H #include <netinet/in.h> #endif #ifdef HAVE_NET_IF_DL_H #include <net/if_dl.h> #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 */ --- NEW FILE: uuid.h --- /* * 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 <sys/types.h> #include <sys/time.h> #include <time.h> 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 */ --- NEW FILE: uuidP.h --- /* * 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 <inttypes.h> #else #include <uuid/uuid_types.h> #endif #include <sys/types.h> #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); --- NEW FILE: uuid_types.h.in --- /* * 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 --- NEW FILE: clear.c --- /* * 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); } --- NEW FILE: gen_uuid_nt.c --- /* * gen_uuid_nt.c -- Use NT api to generate uuid * * Written by Andrey Shedel (an...@ns...) * 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 */ --- NEW FILE: unparse.c --- /* * 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 <stdio.h> #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); } --- NEW FILE: vars.mk --- # 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 --- NEW FILE: COPYING --- 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. --- NEW FILE: parse.c --- /* * 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 <stdlib.h> #include <stdio.h> #include <ctype.h> #include <string.h> #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; } --- NEW FILE: pack.c --- /* * 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 <string.h> #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); } --- NEW FILE: uuid_time.c --- /* * 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 <stdio.h> #include <unistd.h> #include <stdlib.h> #include <sys/types.h> #include <sys/time.h> #include <time.h> #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; } #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 --- NEW FILE: copy.c --- /* * 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++; } --- NEW FILE: isnull.c --- /* * 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; } |
From: Simon L. <sf...@us...> - 2005-10-21 13:18:38
|
Update of /cvsroot/xplc/xplc/config In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4380/config Modified Files: config.mk.in rules.mk Log Message: 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 Index: rules.mk =================================================================== RCS file: /cvsroot/xplc/xplc/config/rules.mk,v retrieving revision 1.46 retrieving revision 1.47 diff -C2 -d -r1.46 -r1.47 *** rules.mk 21 Oct 2005 13:03:02 -0000 1.46 --- rules.mk 21 Oct 2005 13:18:22 -0000 1.47 *************** *** 22,25 **** --- 22,29 ---- .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)) *************** *** 101,104 **** --- 105,109 ---- installdirs: + mkdir -p $(DESTDIR)$(bindir) mkdir -p $(DESTDIR)$(libdir)/pkgconfig mkdir -p $(DESTDIR)$(libdir)$(xplcdir_version) *************** *** 107,110 **** --- 112,118 ---- install: default installdirs $(INSTALL_PROGRAM) libxplc.so $(DESTDIR)$(libdir)/libxplc.so.$(PACKAGE_VERSION) + $(INSTALL_DATA) libxplc.a $(DESTDIR)$(libdir)$(libdir_version) + $(INSTALL_DATA) libxplc-cxx.a $(DESTDIR)$(libdir)$(libdir_version) + $(INSTALL_PROGRAM) uuid/bin/uuidgen $(DESTDIR)$(bindir) $(INSTALL_DATA) libxplc.a $(DESTDIR)$(libdir)$(xplcdir_version) $(INSTALL_DATA) libxplc-cxx.a $(DESTDIR)$(libdir)$(xplcdir_version) *************** *** 113,116 **** --- 121,125 ---- $(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 uninstall: *************** *** 119,122 **** --- 128,132 ---- 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 -rf $(DESTDIR)$(includedir)$(xplcdir_version)/xplc ifneq ($(xplcdir_version),) Index: config.mk.in =================================================================== RCS file: /cvsroot/xplc/xplc/config/config.mk.in,v retrieving revision 1.38 retrieving revision 1.39 diff -C2 -d -r1.38 -r1.39 *** config.mk.in 21 Oct 2005 13:03:02 -0000 1.38 --- config.mk.in 21 Oct 2005 13:18:22 -0000 1.39 *************** *** 23,26 **** --- 23,28 ---- # set variables from the configure script + CC=@CC@ + CFLAGS+=@CFLAGS@ CXX=@CXX@ CXXFLAGS+=@CXXFLAGS@ *************** *** 31,38 **** --- 33,43 ---- 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@ INSTALL:=@INSTALL@ INSTALL_PROGRAM:=@INSTALL_PROGRAM@ |
From: Simon L. <sf...@us...> - 2005-10-21 13:18:38
|
Update of /cvsroot/xplc/xplc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4380 Modified Files: configure.ac Log Message: 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 Index: configure.ac =================================================================== RCS file: /cvsroot/xplc/xplc/configure.ac,v retrieving revision 1.38 retrieving revision 1.39 diff -C2 -d -r1.38 -r1.39 *** configure.ac 21 Oct 2005 13:03:02 -0000 1.38 --- configure.ac 21 Oct 2005 13:18:22 -0000 1.39 *************** *** 70,77 **** --- 70,82 ---- [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 *************** *** 115,120 **** fi if test "$enable_optimization" != "no"; then ! CXXFLAGS="$CXXFLAGS -O2" fi --- 120,159 ---- 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 <sys/typesDD.h> + #include <sys/socket.h>]) + with_uuid= + with_uuid_static=uuid/libuuid.a + fi + if test "$enable_optimization" != "no"; then ! CFLAGS="$CFLAGS -O2" fi *************** *** 124,141 **** if test "$enable_debug" != "no"; then ! CXXFLAGS="$CXXFLAGS -ggdb -DDEBUG" if test "$enable_debug" != "yes"; then ! CXXFLAGS="$CXXFLAGS -DDEBUG_$enable_debug" fi else ! CXXFLAGS="$CXXFLAGS -DNDEBUG" fi if test "$enable_fatal_warnings" = "yes"; then ! CXXFLAGS="$CXXFLAGS -Werror" fi if test "$enable_warnings" != "no"; then ! CXXFLAGS="$CXXFLAGS -Wall -Woverloaded-virtual" if test "$enable_warnings" = "yes"; then CXXFLAGS="$CXXFLAGS -Wold-style-cast" --- 163,181 ---- 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" *************** *** 152,156 **** if test "$enable_pic" != "no"; then ! CXXFLAGS="$CXXFLAGS -fpic" fi --- 192,196 ---- if test "$enable_pic" != "no"; then ! CFLAGS="$CFLAGS -fpic" fi *************** *** 166,172 **** if test "$enable_unstable" = "yes"; then ! CXXFLAGS="$CXXFLAGS -DUNSTABLE" fi AC_SUBST(pc_version) AC_SUBST(xplcdir_version) --- 206,214 ---- if test "$enable_unstable" = "yes"; then ! CFLAGS="$CFLAGS -DUNSTABLE" fi + CXXFLAGS="$CXXFLAGS $CFLAGS" + AC_SUBST(pc_version) AC_SUBST(xplcdir_version) *************** *** 175,181 **** AC_SUBST(with_dlopen) AC_SUBST(so_style) AC_SUBST(CVS2CL) ! AC_CONFIG_FILES([config/config.mk dist/xplc.pc dist/xplc-uninstalled.pc examples/simple-module/Makefile examples/simple-module-user/Makefile]) AC_CONFIG_HEADERS([include/autoconf.h]) --- 217,229 ---- 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]) |
From: Simon L. <sf...@us...> - 2005-10-21 13:10:02
|
Update of /cvsroot/xplc/xplc/uuid/bin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3415/bin Log Message: Directory /cvsroot/xplc/xplc/uuid/bin added to the repository |