|
 |
5312951 |
From 913ea9316aff50c9031a56ae55f6ba50380739a4 Mon Sep 17 00:00:00 2001
|
|
 |
472dcb8 |
From: Elliott Sales de Andrade <quantum.analyst@gmail.com>
|
|
 |
472dcb8 |
Date: Thu, 3 May 2018 01:01:56 -0400
|
|
 |
5312951 |
Subject: [PATCH 2/5] Unbundle uuid.
|
|
 |
472dcb8 |
|
|
 |
472dcb8 |
Signed-off-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
|
|
 |
472dcb8 |
---
|
|
 |
472dcb8 |
MD5 | 18 --
|
|
 |
472dcb8 |
R/uuid.R | 6 -
|
|
 |
472dcb8 |
src/Makevars.in | 8 +-
|
|
 |
472dcb8 |
src/init.c | 2 -
|
|
 |
472dcb8 |
src/uuid/COPYING | 28 --
|
|
 |
472dcb8 |
src/uuid/Makevars.in | 2 -
|
|
 |
472dcb8 |
src/uuid/Makevars.win | 1 -
|
|
 |
472dcb8 |
src/uuid/R.c | 25 --
|
|
 |
472dcb8 |
src/uuid/clear.c | 43 ----
|
|
 |
472dcb8 |
src/uuid/compare.c | 55 ----
|
|
 |
472dcb8 |
src/uuid/config.h.in | 82 ------
|
|
 |
472dcb8 |
src/uuid/copy.c | 45 ----
|
|
 |
472dcb8 |
src/uuid/gen_uuid.c | 557 ----------------------------------------
|
|
 |
472dcb8 |
src/uuid/isnull.c | 48 ----
|
|
 |
472dcb8 |
src/uuid/pack.c | 69 -----
|
|
 |
472dcb8 |
src/uuid/parse.c | 79 ------
|
|
 |
472dcb8 |
src/uuid/unpack.c | 63 -----
|
|
 |
472dcb8 |
src/uuid/unparse.c | 76 ------
|
|
 |
472dcb8 |
src/uuid/uuid.h | 104 --------
|
|
 |
472dcb8 |
src/uuid/uuidP.h | 63 -----
|
|
 |
472dcb8 |
src/uuid/uuidd.h | 54 ----
|
|
 |
472dcb8 |
src/uuid/win32/config.h | 84 ------
|
|
 |
472dcb8 |
22 files changed, 5 insertions(+), 1507 deletions(-)
|
|
 |
472dcb8 |
delete mode 100644 src/uuid/COPYING
|
|
 |
472dcb8 |
delete mode 100644 src/uuid/Makevars.in
|
|
 |
472dcb8 |
delete mode 100644 src/uuid/Makevars.win
|
|
 |
472dcb8 |
delete mode 100644 src/uuid/R.c
|
|
 |
472dcb8 |
delete mode 100644 src/uuid/clear.c
|
|
 |
472dcb8 |
delete mode 100644 src/uuid/compare.c
|
|
 |
472dcb8 |
delete mode 100644 src/uuid/config.h.in
|
|
 |
472dcb8 |
delete mode 100644 src/uuid/copy.c
|
|
 |
472dcb8 |
delete mode 100644 src/uuid/gen_uuid.c
|
|
 |
472dcb8 |
delete mode 100644 src/uuid/isnull.c
|
|
 |
472dcb8 |
delete mode 100644 src/uuid/pack.c
|
|
 |
472dcb8 |
delete mode 100644 src/uuid/parse.c
|
|
 |
472dcb8 |
delete mode 100644 src/uuid/unpack.c
|
|
 |
472dcb8 |
delete mode 100644 src/uuid/unparse.c
|
|
 |
472dcb8 |
delete mode 100644 src/uuid/uuid.h
|
|
 |
472dcb8 |
delete mode 100644 src/uuid/uuidP.h
|
|
 |
472dcb8 |
delete mode 100644 src/uuid/uuidd.h
|
|
 |
472dcb8 |
delete mode 100644 src/uuid/win32/config.h
|
|
 |
472dcb8 |
|
|
 |
472dcb8 |
diff --git a/MD5 b/MD5
|
|
 |
472dcb8 |
index 1ff3106..3502016 100644
|
|
 |
472dcb8 |
--- a/MD5
|
|
 |
472dcb8 |
+++ b/MD5
|
|
 |
472dcb8 |
@@ -1066,24 +1066,6 @@ f97445842b82e98c855b014788b70de5 *src/topology.c
|
|
 |
472dcb8 |
7f3088b31e11c80c0de807760fa173ce *src/triangles_template1.h
|
|
 |
472dcb8 |
2475f0aeb10d27edef133c0533a11d63 *src/type_indexededgelist.c
|
|
 |
472dcb8 |
79ff3df7bfa26151b9893cffeba4d002 *src/types.c
|
|
 |
472dcb8 |
-cfb66084ea2bfc7648ab47ed1018e8a4 *src/uuid/COPYING
|
|
 |
472dcb8 |
-c733862ac29e8bbd01a49b5ac7d4a780 *src/uuid/Makevars.in
|
|
 |
472dcb8 |
-81a759562546aeea16d466fece227601 *src/uuid/Makevars.win
|
|
 |
472dcb8 |
-3eb0f4eb28341a52ddd7790ad4c043ae *src/uuid/R.c
|
|
 |
472dcb8 |
-137be172372dd9bfeb50ed7aa2869b3e *src/uuid/clear.c
|
|
 |
472dcb8 |
-d2b39a0b3d72632db235a9c6d36ef344 *src/uuid/compare.c
|
|
 |
472dcb8 |
-76087d772af7d37cab53b1a56cf72ade *src/uuid/config.h.in
|
|
 |
472dcb8 |
-d0026e30bb2f3feb7ac1db9827dd4820 *src/uuid/copy.c
|
|
 |
472dcb8 |
-0bf618d5e3f7bbff90c60455fa89b697 *src/uuid/gen_uuid.c
|
|
 |
472dcb8 |
-7374a713629b202c4fb82d650e510acb *src/uuid/isnull.c
|
|
 |
472dcb8 |
-b671656493c2119636a4e981e9aad857 *src/uuid/pack.c
|
|
 |
472dcb8 |
-dcc91eb622c08bf2fca11680c71b92cc *src/uuid/parse.c
|
|
 |
472dcb8 |
-bededb71c0c869f06c3275a79781ed17 *src/uuid/unpack.c
|
|
 |
472dcb8 |
-e51bd355555086e18222fbe3dff9d59f *src/uuid/unparse.c
|
|
 |
472dcb8 |
-35a97c82d22737936a4ba8fb6924bcd4 *src/uuid/uuid.h
|
|
 |
472dcb8 |
-84c21b1a1c769a488f5ff52e91be798a *src/uuid/uuidP.h
|
|
 |
472dcb8 |
-aad9fd83e8f3cc7eb80e2ab0b2c4f84c *src/uuid/uuidd.h
|
|
 |
472dcb8 |
-9e16418d043b96a6061ffb43150c5abd *src/uuid/win32/config.h
|
|
 |
472dcb8 |
b345cf8deb9563717b23547730686212 *src/vector.c
|
|
 |
472dcb8 |
f6c884fce6c20ec8c4e2e3da53624868 *src/vector.pmt
|
|
 |
472dcb8 |
6911588db261b2ab842d009b28d8d902 *src/vector_ptr.c
|
|
 |
472dcb8 |
diff --git a/R/uuid.R b/R/uuid.R
|
|
 |
472dcb8 |
index a6b61b7..211b5fb 100644
|
|
 |
472dcb8 |
--- a/R/uuid.R
|
|
 |
472dcb8 |
+++ b/R/uuid.R
|
|
 |
472dcb8 |
@@ -1,9 +1,3 @@
|
|
 |
472dcb8 |
-
|
|
 |
472dcb8 |
-generate_uuid <- function(use_time = NA) {
|
|
 |
472dcb8 |
- .Call(C_UUID_gen, as.logical(use_time))
|
|
 |
472dcb8 |
-}
|
|
 |
472dcb8 |
-
|
|
 |
472dcb8 |
-
|
|
 |
472dcb8 |
get_graph_id <- function(graph) {
|
|
 |
472dcb8 |
if (!warn_version(graph)) {
|
|
 |
472dcb8 |
.Call(C_R_igraph_get_graph_id, graph)
|
|
 |
472dcb8 |
diff --git a/src/Makevars.in b/src/Makevars.in
|
|
 |
472dcb8 |
index 108ba1a..acf9946 100644
|
|
 |
472dcb8 |
--- a/src/Makevars.in
|
|
 |
472dcb8 |
+++ b/src/Makevars.in
|
|
 |
472dcb8 |
@@ -4,11 +4,13 @@ PKG_CFLAGS=-DUSING_R -I. -Iinclude -Ics -Iplfit \
|
|
 |
472dcb8 |
-ISuiteSparse_config \
|
|
 |
472dcb8 |
@CPPFLAGS@ @CFLAGS@ -DNDEBUG -DNPARTITION -DNTIMER -DNCAMD -DNPRINT\
|
|
 |
472dcb8 |
-DPACKAGE_VERSION=\"@PACKAGE_VERSION@\" -DINTERNAL_ARPACK \
|
|
 |
472dcb8 |
- -DIGRAPH_THREAD_LOCAL=/**/
|
|
 |
472dcb8 |
+ -DIGRAPH_THREAD_LOCAL=/**/ \
|
|
 |
472dcb8 |
+ $(shell pkg-config --cflags uuid)
|
|
 |
472dcb8 |
PKG_CXXFLAGS= -DUSING_R -DIGRAPH_THREAD_LOCAL=/**/ -DNDEBUG -Iprpack -I. \
|
|
 |
472dcb8 |
-Iinclude -DPRPACK_IGRAPH_SUPPORT
|
|
 |
472dcb8 |
-PKG_LIBS=@XML2_LIBS@ @GMP_LIBS@ @GLPK_LIBS@ $(LAPACK_LIBS) $(BLAS_LIBS) $(FLIBS)
|
|
 |
472dcb8 |
+PKG_LIBS=@XML2_LIBS@ @GMP_LIBS@ @GLPK_LIBS@ $(LAPACK_LIBS) $(BLAS_LIBS) $(FLIBS) \
|
|
 |
472dcb8 |
+ $(shell pkg-config --libs uuid)
|
|
 |
472dcb8 |
|
|
 |
472dcb8 |
all: $(SHLIB)
|
|
 |
472dcb8 |
|
|
 |
472dcb8 |
-OBJECTS=AMD/Source/amd.o AMD/Source/amd_1.o AMD/Source/amd_2.o AMD/Source/amd_aat.o AMD/Source/amd_control.o AMD/Source/amd_defaults.o AMD/Source/amd_dump.o AMD/Source/amd_global.o AMD/Source/amd_info.o AMD/Source/amd_order.o AMD/Source/amd_post_tree.o AMD/Source/amd_postorder.o AMD/Source/amd_preprocess.o AMD/Source/amd_valid.o AMD/Source/amdbar.o CHOLMOD/Check/cholmod_check.o CHOLMOD/Check/cholmod_read.o CHOLMOD/Check/cholmod_write.o CHOLMOD/Cholesky/cholmod_amd.o CHOLMOD/Cholesky/cholmod_analyze.o CHOLMOD/Cholesky/cholmod_colamd.o CHOLMOD/Cholesky/cholmod_etree.o CHOLMOD/Cholesky/cholmod_factorize.o CHOLMOD/Cholesky/cholmod_postorder.o CHOLMOD/Cholesky/cholmod_rcond.o CHOLMOD/Cholesky/cholmod_resymbol.o CHOLMOD/Cholesky/cholmod_rowcolcounts.o CHOLMOD/Cholesky/cholmod_rowfac.o CHOLMOD/Cholesky/cholmod_solve.o CHOLMOD/Cholesky/cholmod_spsolve.o CHOLMOD/Core/cholmod_aat.o CHOLMOD/Core/cholmod_add.o CHOLMOD/Core/cholmod_band.o CHOLMOD/Core/cholmod_change_factor.o CHOLMOD/Core/cholmod_common.o CHOLMOD/Core/cholmod_complex.o CHOLMOD/Core/cholmod_copy.o CHOLMOD/Core/cholmod_dense.o CHOLMOD/Core/cholmod_error.o CHOLMOD/Core/cholmod_factor.o CHOLMOD/Core/cholmod_memory.o CHOLMOD/Core/cholmod_sparse.o CHOLMOD/Core/cholmod_transpose.o CHOLMOD/Core/cholmod_triplet.o CHOLMOD/Core/cholmod_version.o CHOLMOD/MatrixOps/cholmod_drop.o CHOLMOD/MatrixOps/cholmod_horzcat.o CHOLMOD/MatrixOps/cholmod_norm.o CHOLMOD/MatrixOps/cholmod_scale.o CHOLMOD/MatrixOps/cholmod_sdmult.o CHOLMOD/MatrixOps/cholmod_ssmult.o CHOLMOD/MatrixOps/cholmod_submatrix.o CHOLMOD/MatrixOps/cholmod_symmetry.o CHOLMOD/MatrixOps/cholmod_vertcat.o CHOLMOD/Modify/cholmod_rowadd.o CHOLMOD/Modify/cholmod_rowdel.o CHOLMOD/Modify/cholmod_updown.o CHOLMOD/Partition/cholmod_camd.o CHOLMOD/Partition/cholmod_ccolamd.o CHOLMOD/Partition/cholmod_csymamd.o CHOLMOD/Partition/cholmod_metis.o CHOLMOD/Partition/cholmod_nesdis.o CHOLMOD/Supernodal/cholmod_super_numeric.o CHOLMOD/Supernodal/cholmod_super_solve.o CHOLMOD/Supernodal/cholmod_super_symbolic.o COLAMD/Source/colamd.o COLAMD/Source/colamd_global.o DensityGrid.o DensityGrid_3d.o NetDataTypes.o NetRoutines.o SuiteSparse_config/SuiteSparse_config.o adjlist.o arpack.o array.o atlas.o attributes.o basic_query.o bfgs.o bigint.o bignum.o bipartite.o blas.o bliss.o bliss/bliss_heap.o bliss/defs.o bliss/graph.o bliss/orbit.o bliss/partition.o bliss/uintseqhash.o bliss/utils.o cattributes.o centrality.o cliquer/cliquer.o cliquer/cliquer_graph.o cliquer/reorder.o cliques.o clustertool.o cocitation.o cohesive_blocks.o coloring.o community.o complex.o components.o conversion.o cores.o cs/cs_add.o cs/cs_amd.o cs/cs_chol.o cs/cs_cholsol.o cs/cs_compress.o cs/cs_counts.o cs/cs_cumsum.o cs/cs_dfs.o cs/cs_dmperm.o cs/cs_droptol.o cs/cs_dropzeros.o cs/cs_dupl.o cs/cs_entry.o cs/cs_ereach.o cs/cs_etree.o cs/cs_fkeep.o cs/cs_gaxpy.o cs/cs_happly.o cs/cs_house.o cs/cs_ipvec.o cs/cs_leaf.o cs/cs_load.o cs/cs_lsolve.o cs/cs_ltsolve.o cs/cs_lu.o cs/cs_lusol.o cs/cs_malloc.o cs/cs_maxtrans.o cs/cs_multiply.o cs/cs_norm.o cs/cs_permute.o cs/cs_pinv.o cs/cs_post.o cs/cs_print.o cs/cs_pvec.o cs/cs_qr.o cs/cs_qrsol.o cs/cs_randperm.o cs/cs_reach.o cs/cs_scatter.o cs/cs_scc.o cs/cs_schol.o cs/cs_spsolve.o cs/cs_sqr.o cs/cs_symperm.o cs/cs_tdfs.o cs/cs_transpose.o cs/cs_updown.o cs/cs_usolve.o cs/cs_util.o cs/cs_utsolve.o decomposition.o distances.o dotproduct.o dqueue.o drl_graph.o drl_graph_3d.o drl_layout.o drl_layout_3d.o drl_parse.o eigen.o embedding.o fast_community.o feedback_arc_set.o flow.o foreign-dl-lexer.o foreign-dl-parser.o foreign-gml-lexer.o foreign-gml-parser.o foreign-graphml.o foreign-lgl-lexer.o foreign-lgl-parser.o foreign-ncol-lexer.o foreign-ncol-parser.o foreign-pajek-lexer.o foreign-pajek-parser.o foreign.o forestfire.o fortran_intrinsics.o games.o gengraph_box_list.o gengraph_degree_sequence.o gengraph_graph_molloy_hash.o gengraph_graph_molloy_optimized.o gengraph_mr-connected.o gengraph_powerlaw.o gengraph_random.o glet.o glpk_support.o gml_tree.o hacks.o heap.o igraph_buckets.o igraph_cliquer.o igraph_error.o igraph_estack.o igraph_fixed_vectorlist.o igraph_grid.o igraph_hashtable.o igraph_heap.o igraph_hrg.o igraph_hrg_types.o igraph_marked_queue.o igraph_psumtree.o igraph_set.o igraph_stack.o igraph_strvector.o igraph_trie.o infomap.o infomap_FlowGraph.o infomap_Greedy.o infomap_Node.o interrupt.o iterators.o lad.o lapack.o layout.o layout_dh.o layout_fr.o layout_gem.o layout_kk.o lsap.o matching.o math.o matrix.o maximal_cliques.o memory.o microscopic_update.o mixing.o motifs.o operators.o optimal_modularity.o other.o paths.o plfit/error.o plfit/gss.o plfit/kolmogorov.o plfit/lbfgs.o plfit/options.o plfit/plfit.o plfit/zeta.o pottsmodel_2.o progress.o prpack.o prpack/prpack_base_graph.o prpack/prpack_igraph_graph.o prpack/prpack_preprocessed_ge_graph.o prpack/prpack_preprocessed_gs_graph.o prpack/prpack_preprocessed_scc_graph.o prpack/prpack_preprocessed_schur_graph.o prpack/prpack_result.o prpack/prpack_solver.o prpack/prpack_utils.o qsort.o qsort_r.o random.o random_walk.o sbm.o scan.o scg.o scg_approximate_methods.o scg_exact_scg.o scg_kmeans.o scg_optimal_method.o scg_utils.o separators.o sir.o spanning_trees.o sparsemat.o spectral_properties.o spmatrix.o st-cuts.o statusbar.o structural_properties.o structure_generators.o sugiyama.o topology.o triangles.o type_indexededgelist.o types.o vector.o vector_ptr.o version.o visitors.o walktrap.o walktrap_communities.o walktrap_graph.o walktrap_heap.o zeroin.o dgetv0.o dlaqrb.o dmout.o dnaitr.o dnapps.o dnaup2.o dnaupd.o dnconv.o dneigh.o dneupd.o dngets.o dsaitr.o dsapps.o dsaup2.o dsaupd.o dsconv.o dseigt.o dsesrt.o dseupd.o dsgets.o dsortc.o dsortr.o dstatn.o dstats.o dstqrb.o dvout.o ivout.o second.o simpleraytracer/Color.o simpleraytracer/Light.o simpleraytracer/Point.o simpleraytracer/RIgraphRay.o simpleraytracer/Ray.o simpleraytracer/RayTracer.o simpleraytracer/RayVector.o simpleraytracer/Shape.o simpleraytracer/Sphere.o simpleraytracer/Triangle.o simpleraytracer/unit_limiter.o uuid/R.o uuid/clear.o uuid/compare.o uuid/copy.o uuid/gen_uuid.o uuid/isnull.o uuid/pack.o uuid/parse.o uuid/unpack.o uuid/unparse.o rinterface.o rinterface_extra.o lazyeval.o
|
|
 |
472dcb8 |
+OBJECTS=AMD/Source/amd.o AMD/Source/amd_1.o AMD/Source/amd_2.o AMD/Source/amd_aat.o AMD/Source/amd_control.o AMD/Source/amd_defaults.o AMD/Source/amd_dump.o AMD/Source/amd_global.o AMD/Source/amd_info.o AMD/Source/amd_order.o AMD/Source/amd_post_tree.o AMD/Source/amd_postorder.o AMD/Source/amd_preprocess.o AMD/Source/amd_valid.o AMD/Source/amdbar.o CHOLMOD/Check/cholmod_check.o CHOLMOD/Check/cholmod_read.o CHOLMOD/Check/cholmod_write.o CHOLMOD/Cholesky/cholmod_amd.o CHOLMOD/Cholesky/cholmod_analyze.o CHOLMOD/Cholesky/cholmod_colamd.o CHOLMOD/Cholesky/cholmod_etree.o CHOLMOD/Cholesky/cholmod_factorize.o CHOLMOD/Cholesky/cholmod_postorder.o CHOLMOD/Cholesky/cholmod_rcond.o CHOLMOD/Cholesky/cholmod_resymbol.o CHOLMOD/Cholesky/cholmod_rowcolcounts.o CHOLMOD/Cholesky/cholmod_rowfac.o CHOLMOD/Cholesky/cholmod_solve.o CHOLMOD/Cholesky/cholmod_spsolve.o CHOLMOD/Core/cholmod_aat.o CHOLMOD/Core/cholmod_add.o CHOLMOD/Core/cholmod_band.o CHOLMOD/Core/cholmod_change_factor.o CHOLMOD/Core/cholmod_common.o CHOLMOD/Core/cholmod_complex.o CHOLMOD/Core/cholmod_copy.o CHOLMOD/Core/cholmod_dense.o CHOLMOD/Core/cholmod_error.o CHOLMOD/Core/cholmod_factor.o CHOLMOD/Core/cholmod_memory.o CHOLMOD/Core/cholmod_sparse.o CHOLMOD/Core/cholmod_transpose.o CHOLMOD/Core/cholmod_triplet.o CHOLMOD/Core/cholmod_version.o CHOLMOD/MatrixOps/cholmod_drop.o CHOLMOD/MatrixOps/cholmod_horzcat.o CHOLMOD/MatrixOps/cholmod_norm.o CHOLMOD/MatrixOps/cholmod_scale.o CHOLMOD/MatrixOps/cholmod_sdmult.o CHOLMOD/MatrixOps/cholmod_ssmult.o CHOLMOD/MatrixOps/cholmod_submatrix.o CHOLMOD/MatrixOps/cholmod_symmetry.o CHOLMOD/MatrixOps/cholmod_vertcat.o CHOLMOD/Modify/cholmod_rowadd.o CHOLMOD/Modify/cholmod_rowdel.o CHOLMOD/Modify/cholmod_updown.o CHOLMOD/Partition/cholmod_camd.o CHOLMOD/Partition/cholmod_ccolamd.o CHOLMOD/Partition/cholmod_csymamd.o CHOLMOD/Partition/cholmod_metis.o CHOLMOD/Partition/cholmod_nesdis.o CHOLMOD/Supernodal/cholmod_super_numeric.o CHOLMOD/Supernodal/cholmod_super_solve.o CHOLMOD/Supernodal/cholmod_super_symbolic.o COLAMD/Source/colamd.o COLAMD/Source/colamd_global.o DensityGrid.o DensityGrid_3d.o NetDataTypes.o NetRoutines.o SuiteSparse_config/SuiteSparse_config.o adjlist.o arpack.o array.o atlas.o attributes.o basic_query.o bfgs.o bigint.o bignum.o bipartite.o blas.o bliss.o bliss/bliss_heap.o bliss/defs.o bliss/graph.o bliss/orbit.o bliss/partition.o bliss/uintseqhash.o bliss/utils.o cattributes.o centrality.o cliquer/cliquer.o cliquer/cliquer_graph.o cliquer/reorder.o cliques.o clustertool.o cocitation.o cohesive_blocks.o coloring.o community.o complex.o components.o conversion.o cores.o cs/cs_add.o cs/cs_amd.o cs/cs_chol.o cs/cs_cholsol.o cs/cs_compress.o cs/cs_counts.o cs/cs_cumsum.o cs/cs_dfs.o cs/cs_dmperm.o cs/cs_droptol.o cs/cs_dropzeros.o cs/cs_dupl.o cs/cs_entry.o cs/cs_ereach.o cs/cs_etree.o cs/cs_fkeep.o cs/cs_gaxpy.o cs/cs_happly.o cs/cs_house.o cs/cs_ipvec.o cs/cs_leaf.o cs/cs_load.o cs/cs_lsolve.o cs/cs_ltsolve.o cs/cs_lu.o cs/cs_lusol.o cs/cs_malloc.o cs/cs_maxtrans.o cs/cs_multiply.o cs/cs_norm.o cs/cs_permute.o cs/cs_pinv.o cs/cs_post.o cs/cs_print.o cs/cs_pvec.o cs/cs_qr.o cs/cs_qrsol.o cs/cs_randperm.o cs/cs_reach.o cs/cs_scatter.o cs/cs_scc.o cs/cs_schol.o cs/cs_spsolve.o cs/cs_sqr.o cs/cs_symperm.o cs/cs_tdfs.o cs/cs_transpose.o cs/cs_updown.o cs/cs_usolve.o cs/cs_util.o cs/cs_utsolve.o decomposition.o distances.o dotproduct.o dqueue.o drl_graph.o drl_graph_3d.o drl_layout.o drl_layout_3d.o drl_parse.o eigen.o embedding.o fast_community.o feedback_arc_set.o flow.o foreign-dl-lexer.o foreign-dl-parser.o foreign-gml-lexer.o foreign-gml-parser.o foreign-graphml.o foreign-lgl-lexer.o foreign-lgl-parser.o foreign-ncol-lexer.o foreign-ncol-parser.o foreign-pajek-lexer.o foreign-pajek-parser.o foreign.o forestfire.o fortran_intrinsics.o games.o gengraph_box_list.o gengraph_degree_sequence.o gengraph_graph_molloy_hash.o gengraph_graph_molloy_optimized.o gengraph_mr-connected.o gengraph_powerlaw.o gengraph_random.o glet.o glpk_support.o gml_tree.o hacks.o heap.o igraph_buckets.o igraph_cliquer.o igraph_error.o igraph_estack.o igraph_fixed_vectorlist.o igraph_grid.o igraph_hashtable.o igraph_heap.o igraph_hrg.o igraph_hrg_types.o igraph_marked_queue.o igraph_psumtree.o igraph_set.o igraph_stack.o igraph_strvector.o igraph_trie.o infomap.o infomap_FlowGraph.o infomap_Greedy.o infomap_Node.o interrupt.o iterators.o lad.o lapack.o layout.o layout_dh.o layout_fr.o layout_gem.o layout_kk.o lsap.o matching.o math.o matrix.o maximal_cliques.o memory.o microscopic_update.o mixing.o motifs.o operators.o optimal_modularity.o other.o paths.o plfit/error.o plfit/gss.o plfit/kolmogorov.o plfit/lbfgs.o plfit/options.o plfit/plfit.o plfit/zeta.o pottsmodel_2.o progress.o prpack.o prpack/prpack_base_graph.o prpack/prpack_igraph_graph.o prpack/prpack_preprocessed_ge_graph.o prpack/prpack_preprocessed_gs_graph.o prpack/prpack_preprocessed_scc_graph.o prpack/prpack_preprocessed_schur_graph.o prpack/prpack_result.o prpack/prpack_solver.o prpack/prpack_utils.o qsort.o qsort_r.o random.o random_walk.o sbm.o scan.o scg.o scg_approximate_methods.o scg_exact_scg.o scg_kmeans.o scg_optimal_method.o scg_utils.o separators.o sir.o spanning_trees.o sparsemat.o spectral_properties.o spmatrix.o st-cuts.o statusbar.o structural_properties.o structure_generators.o sugiyama.o topology.o triangles.o type_indexededgelist.o types.o vector.o vector_ptr.o version.o visitors.o walktrap.o walktrap_communities.o walktrap_graph.o walktrap_heap.o zeroin.o dgetv0.o dlaqrb.o dmout.o dnaitr.o dnapps.o dnaup2.o dnaupd.o dnconv.o dneigh.o dneupd.o dngets.o dsaitr.o dsapps.o dsaup2.o dsaupd.o dsconv.o dseigt.o dsesrt.o dseupd.o dsgets.o dsortc.o dsortr.o dstatn.o dstats.o dstqrb.o dvout.o ivout.o second.o simpleraytracer/Color.o simpleraytracer/Light.o simpleraytracer/Point.o simpleraytracer/RIgraphRay.o simpleraytracer/Ray.o simpleraytracer/RayTracer.o simpleraytracer/RayVector.o simpleraytracer/Shape.o simpleraytracer/Sphere.o simpleraytracer/Triangle.o simpleraytracer/unit_limiter.o rinterface.o rinterface_extra.o lazyeval.o
|
|
 |
472dcb8 |
diff --git a/src/init.c b/src/init.c
|
|
 |
472dcb8 |
index a6c00a5..d419442 100644
|
|
 |
472dcb8 |
--- a/src/init.c
|
|
 |
472dcb8 |
+++ b/src/init.c
|
|
 |
472dcb8 |
@@ -373,7 +373,6 @@ extern SEXP R_igraph_write_graph_leda(SEXP, SEXP, SEXP, SEXP);
|
|
 |
472dcb8 |
extern SEXP R_igraph_write_graph_lgl(SEXP, SEXP, SEXP, SEXP, SEXP);
|
|
 |
472dcb8 |
extern SEXP R_igraph_write_graph_ncol(SEXP, SEXP, SEXP, SEXP);
|
|
 |
472dcb8 |
extern SEXP R_igraph_write_graph_pajek(SEXP, SEXP);
|
|
 |
472dcb8 |
-extern SEXP UUID_gen(SEXP);
|
|
 |
472dcb8 |
|
|
 |
472dcb8 |
static const R_CMethodDef CEntries[] = {
|
|
 |
472dcb8 |
{"igraphhcass2", (DL_FUNC) &igraphhcass2, 6},
|
|
 |
472dcb8 |
@@ -735,6 +734,5 @@ static const R_CallMethodDef CallEntries[] = {
|
|
 |
472dcb8 |
{"R_igraph_write_graph_lgl", (DL_FUNC) &R_igraph_write_graph_lgl, 5},
|
|
 |
472dcb8 |
{"R_igraph_write_graph_ncol", (DL_FUNC) &R_igraph_write_graph_ncol, 4},
|
|
 |
472dcb8 |
{"R_igraph_write_graph_pajek", (DL_FUNC) &R_igraph_write_graph_pajek, 2},
|
|
 |
472dcb8 |
- {"UUID_gen", (DL_FUNC) &UUID_gen, 1},
|
|
 |
472dcb8 |
{NULL, NULL, 0}
|
|
 |
472dcb8 |
};
|
|
 |
472dcb8 |
diff --git a/src/uuid/COPYING b/src/uuid/COPYING
|
|
 |
472dcb8 |
deleted file mode 100644
|
|
 |
472dcb8 |
index e7a8054..0000000
|
|
 |
472dcb8 |
--- a/src/uuid/COPYING
|
|
 |
472dcb8 |
+++ /dev/null
|
|
 |
472dcb8 |
@@ -1,28 +0,0 @@
|
|
 |
472dcb8 |
-This library is free software; you can redistribute it and/or
|
|
 |
472dcb8 |
-modify it under the terms of the Modified BSD License:
|
|
 |
472dcb8 |
-
|
|
 |
472dcb8 |
-Redistribution and use in source and binary forms, with or without
|
|
 |
472dcb8 |
-modification, are permitted provided that the following conditions
|
|
 |
472dcb8 |
-are met:
|
|
 |
472dcb8 |
-1. Redistributions of source code must retain the above copyright
|
|
 |
472dcb8 |
- notice, and the entire permission notice in its entirety,
|
|
 |
472dcb8 |
- including the disclaimer of warranties.
|
|
 |
472dcb8 |
-2. Redistributions in binary form must reproduce the above copyright
|
|
 |
472dcb8 |
- notice, this list of conditions and the following disclaimer in the
|
|
 |
472dcb8 |
- documentation and/or other materials provided with the distribution.
|
|
 |
472dcb8 |
-3. The name of the author may not be used to endorse or promote
|
|
 |
472dcb8 |
- products derived from this software without specific prior
|
|
 |
472dcb8 |
- written permission.
|
|
 |
472dcb8 |
-
|
|
 |
472dcb8 |
-THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
|
 |
472dcb8 |
-WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
|
 |
472dcb8 |
-OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ALL OF
|
|
 |
472dcb8 |
-WHICH ARE HEREBY DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE
|
|
 |
472dcb8 |
-LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
|
 |
472dcb8 |
-CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
|
|
 |
472dcb8 |
-OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
|
|
 |
472dcb8 |
-BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
|
 |
472dcb8 |
-LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
 |
472dcb8 |
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
|
|
 |
472dcb8 |
-USE OF THIS SOFTWARE, EVEN IF NOT ADVISED OF THE POSSIBILITY OF SUCH
|
|
 |
472dcb8 |
-DAMAGE.
|
|
 |
472dcb8 |
diff --git a/src/uuid/Makevars.in b/src/uuid/Makevars.in
|
|
 |
472dcb8 |
deleted file mode 100644
|
|
 |
472dcb8 |
index 0ab302b..0000000
|
|
 |
472dcb8 |
--- a/src/uuid/Makevars.in
|
|
 |
472dcb8 |
+++ /dev/null
|
|
 |
472dcb8 |
@@ -1,2 +0,0 @@
|
|
 |
472dcb8 |
-PKG_CPPFLAGS=@CPPFLAGS@
|
|
 |
472dcb8 |
-PKG_LIBS=@LIBS@
|
|
 |
472dcb8 |
diff --git a/src/uuid/Makevars.win b/src/uuid/Makevars.win
|
|
 |
472dcb8 |
deleted file mode 100644
|
|
 |
472dcb8 |
index 248e1ce..0000000
|
|
 |
472dcb8 |
--- a/src/uuid/Makevars.win
|
|
 |
472dcb8 |
+++ /dev/null
|
|
 |
472dcb8 |
@@ -1 +0,0 @@
|
|
 |
472dcb8 |
-PKG_CPPFLAGS=-Iwin32
|
|
 |
472dcb8 |
diff --git a/src/uuid/R.c b/src/uuid/R.c
|
|
 |
472dcb8 |
deleted file mode 100644
|
|
 |
472dcb8 |
index b956b8d..0000000
|
|
 |
472dcb8 |
--- a/src/uuid/R.c
|
|
 |
472dcb8 |
+++ /dev/null
|
|
 |
472dcb8 |
@@ -1,25 +0,0 @@
|
|
 |
472dcb8 |
-#include "uuid.h"
|
|
 |
472dcb8 |
-
|
|
 |
472dcb8 |
-#include <Rinternals.h>
|
|
 |
472dcb8 |
-#include "igraph_random.h"
|
|
 |
472dcb8 |
-
|
|
 |
472dcb8 |
-SEXP UUID_gen(SEXP sTime) {
|
|
 |
472dcb8 |
-
|
|
 |
472dcb8 |
- RNG_BEGIN();
|
|
 |
472dcb8 |
-
|
|
 |
472dcb8 |
- uuid_t u;
|
|
 |
472dcb8 |
- char c[40];
|
|
 |
472dcb8 |
- int use_time = asInteger(sTime);
|
|
 |
472dcb8 |
- if (use_time == TRUE)
|
|
 |
472dcb8 |
- uuid_generate_time(u);
|
|
 |
472dcb8 |
- else if (use_time == FALSE)
|
|
 |
472dcb8 |
- uuid_generate_random(u);
|
|
 |
472dcb8 |
- else
|
|
 |
472dcb8 |
- uuid_generate(u);
|
|
 |
472dcb8 |
- uuid_unparse_lower(u, c);
|
|
 |
472dcb8 |
-
|
|
 |
472dcb8 |
- RNG_END();
|
|
 |
472dcb8 |
-
|
|
 |
472dcb8 |
- return mkString(c);
|
|
 |
472dcb8 |
-}
|
|
 |
472dcb8 |
-
|
|
 |
472dcb8 |
diff --git a/src/uuid/clear.c b/src/uuid/clear.c
|
|
 |
472dcb8 |
deleted file mode 100644
|
|
 |
472dcb8 |
index ad1f066..0000000
|
|
 |
472dcb8 |
--- a/src/uuid/clear.c
|
|
 |
472dcb8 |
+++ /dev/null
|
|
 |
472dcb8 |
@@ -1,43 +0,0 @@
|
|
 |
472dcb8 |
-/*
|
|
 |
472dcb8 |
- * clear.c -- Clear a UUID
|
|
 |
472dcb8 |
- *
|
|
 |
472dcb8 |
- * Copyright (C) 1996, 1997 Theodore Ts'o.
|
|
 |
472dcb8 |
- *
|
|
 |
472dcb8 |
- * %Begin-Header%
|
|
 |
472dcb8 |
- * Redistribution and use in source and binary forms, with or without
|
|
 |
472dcb8 |
- * modification, are permitted provided that the following conditions
|
|
 |
472dcb8 |
- * are met:
|
|
 |
472dcb8 |
- * 1. Redistributions of source code must retain the above copyright
|
|
 |
472dcb8 |
- * notice, and the entire permission notice in its entirety,
|
|
 |
472dcb8 |
- * including the disclaimer of warranties.
|
|
 |
472dcb8 |
- * 2. Redistributions in binary form must reproduce the above copyright
|
|
 |
472dcb8 |
- * notice, this list of conditions and the following disclaimer in the
|
|
 |
472dcb8 |
- * documentation and/or other materials provided with the distribution.
|
|
 |
472dcb8 |
- * 3. The name of the author may not be used to endorse or promote
|
|
 |
472dcb8 |
- * products derived from this software without specific prior
|
|
 |
472dcb8 |
- * written permission.
|
|
 |
472dcb8 |
- *
|
|
 |
472dcb8 |
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
|
 |
472dcb8 |
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
|
 |
472dcb8 |
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ALL OF
|
|
 |
472dcb8 |
- * WHICH ARE HEREBY DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE
|
|
 |
472dcb8 |
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
|
 |
472dcb8 |
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
|
|
 |
472dcb8 |
- * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
|
|
 |
472dcb8 |
- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
|
 |
472dcb8 |
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
 |
472dcb8 |
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
|
|
 |
472dcb8 |
- * USE OF THIS SOFTWARE, EVEN IF NOT ADVISED OF THE POSSIBILITY OF SUCH
|
|
 |
472dcb8 |
- * DAMAGE.
|
|
 |
472dcb8 |
- * %End-Header%
|
|
 |
472dcb8 |
- */
|
|
 |
472dcb8 |
-
|
|
 |
472dcb8 |
-#include <string.h>
|
|
 |
472dcb8 |
-
|
|
 |
472dcb8 |
-#include "uuidP.h"
|
|
 |
472dcb8 |
-
|
|
 |
472dcb8 |
-void uuid_clear(uuid_t uu)
|
|
 |
472dcb8 |
-{
|
|
 |
472dcb8 |
- memset(uu, 0, 16);
|
|
 |
472dcb8 |
-}
|
|
 |
472dcb8 |
-
|
|
 |
472dcb8 |
diff --git a/src/uuid/compare.c b/src/uuid/compare.c
|
|
 |
472dcb8 |
deleted file mode 100644
|
|
 |
472dcb8 |
index 8f3437a..0000000
|
|
 |
472dcb8 |
--- a/src/uuid/compare.c
|
|
 |
472dcb8 |
+++ /dev/null
|
|
 |
472dcb8 |
@@ -1,55 +0,0 @@
|
|
 |
472dcb8 |
-/*
|
|
 |
472dcb8 |
- * compare.c --- compare whether or not two UUIDs are the same
|
|
 |
472dcb8 |
- *
|
|
 |
472dcb8 |
- * Returns 0 if the two UUIDs are different, and 1 if they are the same.
|
|
 |
472dcb8 |
- *
|
|
 |
472dcb8 |
- * Copyright (C) 1996, 1997 Theodore Ts'o.
|
|
 |
472dcb8 |
- *
|
|
 |
472dcb8 |
- * %Begin-Header%
|
|
 |
472dcb8 |
- * Redistribution and use in source and binary forms, with or without
|
|
 |
472dcb8 |
- * modification, are permitted provided that the following conditions
|
|
 |
472dcb8 |
- * are met:
|
|
 |
472dcb8 |
- * 1. Redistributions of source code must retain the above copyright
|
|
 |
472dcb8 |
- * notice, and the entire permission notice in its entirety,
|
|
 |
472dcb8 |
- * including the disclaimer of warranties.
|
|
 |
472dcb8 |
- * 2. Redistributions in binary form must reproduce the above copyright
|
|
 |
472dcb8 |
- * notice, this list of conditions and the following disclaimer in the
|
|
 |
472dcb8 |
- * documentation and/or other materials provided with the distribution.
|
|
 |
472dcb8 |
- * 3. The name of the author may not be used to endorse or promote
|
|
 |
472dcb8 |
- * products derived from this software without specific prior
|
|
 |
472dcb8 |
- * written permission.
|
|
 |
472dcb8 |
- *
|
|
 |
472dcb8 |
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
|
 |
472dcb8 |
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
|
 |
472dcb8 |
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ALL OF
|
|
 |
472dcb8 |
- * WHICH ARE HEREBY DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE
|
|
 |
472dcb8 |
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
|
 |
472dcb8 |
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
|
|
 |
472dcb8 |
- * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
|
|
 |
472dcb8 |
- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
|
 |
472dcb8 |
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
 |
472dcb8 |
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
|
|
 |
472dcb8 |
- * USE OF THIS SOFTWARE, EVEN IF NOT ADVISED OF THE POSSIBILITY OF SUCH
|
|
 |
472dcb8 |
- * DAMAGE.
|
|
 |
472dcb8 |
- * %End-Header%
|
|
 |
472dcb8 |
- */
|
|
 |
472dcb8 |
-
|
|
 |
472dcb8 |
-#include "uuidP.h"
|
|
 |
472dcb8 |
-#include <string.h>
|
|
 |
472dcb8 |
-
|
|
 |
472dcb8 |
-#define UUCMP(u1,u2) if (u1 != u2) return((u1 < u2) ? -1 : 1);
|
|
 |
472dcb8 |
-
|
|
 |
472dcb8 |
-int uuid_compare(const uuid_t uu1, const uuid_t uu2)
|
|
 |
472dcb8 |
-{
|
|
 |
472dcb8 |
- struct uuid uuid1, uuid2;
|
|
 |
472dcb8 |
-
|
|
 |
472dcb8 |
- uuid_unpack(uu1, &uuid1);
|
|
 |
472dcb8 |
- uuid_unpack(uu2, &uuid2);
|
|
 |
472dcb8 |
-
|
|
 |
472dcb8 |
- UUCMP(uuid1.time_low, uuid2.time_low);
|
|
 |
472dcb8 |
- UUCMP(uuid1.time_mid, uuid2.time_mid);
|
|
 |
472dcb8 |
- UUCMP(uuid1.time_hi_and_version, uuid2.time_hi_and_version);
|
|
 |
472dcb8 |
- UUCMP(uuid1.clock_seq, uuid2.clock_seq);
|
|
 |
472dcb8 |
- return memcmp(uuid1.node, uuid2.node, 6);
|
|
 |
472dcb8 |
-}
|
|
 |
472dcb8 |
-
|
|
 |
472dcb8 |
diff --git a/src/uuid/config.h.in b/src/uuid/config.h.in
|
|
 |
472dcb8 |
deleted file mode 100644
|
|
 |
472dcb8 |
index b6f72b3..0000000
|
|
 |
472dcb8 |
--- a/src/uuid/config.h.in
|
|
 |
472dcb8 |
+++ /dev/null
|
|
 |
472dcb8 |
@@ -1,82 +0,0 @@
|
|
 |
472dcb8 |
-/* src/config.h.in. Generated from configure.ac by autoheader. */
|
|
 |
472dcb8 |
-
|
|
 |
472dcb8 |
-/* Define to 1 if you have the <inttypes.h> header file. */
|
|
 |
472dcb8 |
-#undef HAVE_INTTYPES_H
|
|
 |
472dcb8 |
-
|
|
 |
472dcb8 |
-/* Define to 1 if you have the `jrand48' function. */
|
|
 |
472dcb8 |
-#undef HAVE_JRAND48
|
|
 |
472dcb8 |
-
|
|
 |
472dcb8 |
-/* Define to 1 if you have the <memory.h> header file. */
|
|
 |
472dcb8 |
-#undef HAVE_MEMORY_H
|
|
 |
472dcb8 |
-
|
|
 |
472dcb8 |
-/* Define to 1 if you have the <netinet/in.h> header file. */
|
|
 |
472dcb8 |
-#undef HAVE_NETINET_IN_H
|
|
 |
472dcb8 |
-
|
|
 |
472dcb8 |
-/* Define to 1 if you have the <net/if_dl.h> header file. */
|
|
 |
472dcb8 |
-#undef HAVE_NET_IF_DL_H
|
|
 |
472dcb8 |
-
|
|
 |
472dcb8 |
-/* Define to 1 if you have the <net/if.h> header file. */
|
|
 |
472dcb8 |
-#undef HAVE_NET_IF_H
|
|
 |
472dcb8 |
-
|
|
 |
472dcb8 |
-/* Define if struct sockaddr contains sa_len */
|
|
 |
472dcb8 |
-#undef HAVE_SA_LEN
|
|
 |
472dcb8 |
-
|
|
 |
472dcb8 |
-/* Define to 1 if you have the <stdint.h> header file. */
|
|
 |
472dcb8 |
-#undef HAVE_STDINT_H
|
|
 |
472dcb8 |
-
|
|
 |
472dcb8 |
-/* Define to 1 if you have the <stdlib.h> header file. */
|
|
 |
472dcb8 |
-#undef HAVE_STDLIB_H
|
|
 |
472dcb8 |
-
|
|
 |
472dcb8 |
-/* Define to 1 if you have the <strings.h> header file. */
|
|
 |
472dcb8 |
-#undef HAVE_STRINGS_H
|
|
 |
472dcb8 |
-
|
|
 |
472dcb8 |
-/* Define to 1 if you have the <string.h> header file. */
|
|
 |
472dcb8 |
-#undef HAVE_STRING_H
|
|
 |
472dcb8 |
-
|
|
 |
472dcb8 |
-/* Define to 1 if you have the <sys/file.h> header file. */
|
|
 |
472dcb8 |
-#undef HAVE_SYS_FILE_H
|
|
 |
472dcb8 |
-
|
|
 |
472dcb8 |
-/* Define to 1 if you have the <sys/ioctl.h> header file. */
|
|
 |
472dcb8 |
-#undef HAVE_SYS_IOCTL_H
|
|
 |
472dcb8 |
-
|
|
 |
472dcb8 |
-/* Define to 1 if you have the <sys/socket.h> header file. */
|
|
 |
472dcb8 |
-#undef HAVE_SYS_SOCKET_H
|
|
 |
472dcb8 |
-
|
|
 |
472dcb8 |
-/* Define to 1 if you have the <sys/sockio.h> header file. */
|
|
 |
472dcb8 |
-#undef HAVE_SYS_SOCKIO_H
|
|
 |
472dcb8 |
-
|
|
 |
472dcb8 |
-/* Define to 1 if you have the <sys/stat.h> header file. */
|
|
 |
472dcb8 |
-#undef HAVE_SYS_STAT_H
|
|
 |
472dcb8 |
-
|
|
 |
472dcb8 |
-/* Define to 1 if you have the <sys/syscall.h> header file. */
|
|
 |
472dcb8 |
-#undef HAVE_SYS_SYSCALL_H
|
|
 |
472dcb8 |
-
|
|
 |
472dcb8 |
-/* Define to 1 if you have the <sys/time.h> header file. */
|
|
 |
472dcb8 |
-#undef HAVE_SYS_TIME_H
|
|
 |
472dcb8 |
-
|
|
 |
472dcb8 |
-/* Define to 1 if you have the <sys/types.h> header file. */
|
|
 |
472dcb8 |
-#undef HAVE_SYS_TYPES_H
|
|
 |
472dcb8 |
-
|
|
 |
472dcb8 |
-/* Define to 1 if you have the <sys/un.h> header file. */
|
|
 |
472dcb8 |
-#undef HAVE_SYS_UN_H
|
|
 |
472dcb8 |
-
|
|
 |
472dcb8 |
-/* Define to 1 if you have the <unistd.h> header file. */
|
|
 |
472dcb8 |
-#undef HAVE_UNISTD_H
|
|
 |
472dcb8 |
-
|
|
 |
472dcb8 |
-/* Define to the address where bug reports for this package should be sent. */
|
|
 |
472dcb8 |
-#undef PACKAGE_BUGREPORT
|
|
 |
472dcb8 |
-
|
|
 |
472dcb8 |
-/* Define to the full name of this package. */
|
|
 |
472dcb8 |
-#undef PACKAGE_NAME
|
|
 |
472dcb8 |
-
|
|
 |
472dcb8 |
-/* Define to the full name and version of this package. */
|
|
 |
472dcb8 |
-#undef PACKAGE_STRING
|
|
 |
472dcb8 |
-
|
|
 |
472dcb8 |
-/* Define to the one symbol short name of this package. */
|
|
 |
472dcb8 |
-#undef PACKAGE_TARNAME
|
|
 |
472dcb8 |
-
|
|
 |
472dcb8 |
-/* Define to the version of this package. */
|
|
 |
472dcb8 |
-#undef PACKAGE_VERSION
|
|
 |
472dcb8 |
-
|
|
 |
472dcb8 |
-/* Define to 1 if you have the ANSI C header files. */
|
|
 |
472dcb8 |
-#undef STDC_HEADERS
|
|
 |
472dcb8 |
diff --git a/src/uuid/copy.c b/src/uuid/copy.c
|
|
 |
472dcb8 |
deleted file mode 100644
|
|
 |
472dcb8 |
index ead33aa..0000000
|
|
 |
472dcb8 |
--- a/src/uuid/copy.c
|
|
 |
472dcb8 |
+++ /dev/null
|
|
 |
472dcb8 |
@@ -1,45 +0,0 @@
|
|
 |
472dcb8 |
-/*
|
|
 |
472dcb8 |
- * copy.c --- copy UUIDs
|
|
 |
472dcb8 |
- *
|
|
 |
472dcb8 |
- * Copyright (C) 1996, 1997 Theodore Ts'o.
|
|
 |
472dcb8 |
- *
|
|
 |
472dcb8 |
- * %Begin-Header%
|
|
 |
472dcb8 |
- * Redistribution and use in source and binary forms, with or without
|
|
 |
472dcb8 |
- * modification, are permitted provided that the following conditions
|
|
 |
472dcb8 |
- * are met:
|
|
 |
472dcb8 |
- * 1. Redistributions of source code must retain the above copyright
|
|
 |
472dcb8 |
- * notice, and the entire permission notice in its entirety,
|
|
 |
472dcb8 |
- * including the disclaimer of warranties.
|
|
 |
472dcb8 |
- * 2. Redistributions in binary form must reproduce the above copyright
|
|
 |
472dcb8 |
- * notice, this list of conditions and the following disclaimer in the
|
|
 |
472dcb8 |
- * documentation and/or other materials provided with the distribution.
|
|
 |
472dcb8 |
- * 3. The name of the author may not be used to endorse or promote
|
|
 |
472dcb8 |
- * products derived from this software without specific prior
|
|
 |
472dcb8 |
- * written permission.
|
|
 |
472dcb8 |
- *
|
|
 |
472dcb8 |
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
|
 |
472dcb8 |
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
|
 |
472dcb8 |
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ALL OF
|
|
 |
472dcb8 |
- * WHICH ARE HEREBY DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE
|
|
 |
472dcb8 |
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
|
 |
472dcb8 |
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
|
|
 |
472dcb8 |
- * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
|
|
 |
472dcb8 |
- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
|
 |
472dcb8 |
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
 |
472dcb8 |
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
|
|
 |
472dcb8 |
- * USE OF THIS SOFTWARE, EVEN IF NOT ADVISED OF THE POSSIBILITY OF SUCH
|
|
 |
472dcb8 |
- * DAMAGE.
|
|
 |
472dcb8 |
- * %End-Header%
|
|
 |
472dcb8 |
- */
|
|
 |
472dcb8 |
-
|
|
 |
472dcb8 |
-#include "uuidP.h"
|
|
 |
472dcb8 |
-
|
|
 |
472dcb8 |
-void uuid_copy(uuid_t dst, const uuid_t src)
|
|
 |
472dcb8 |
-{
|
|
 |
472dcb8 |
- unsigned char *cp1;
|
|
 |
472dcb8 |
- const unsigned char *cp2;
|
|
 |
472dcb8 |
- int i;
|
|
 |
472dcb8 |
-
|
|
 |
472dcb8 |
- for (i=0, cp1 = dst, cp2 = src; i < 16; i++)
|
|
 |
472dcb8 |
- *cp1++ = *cp2++;
|
|
 |
472dcb8 |
-}
|
|
 |
472dcb8 |
diff --git a/src/uuid/gen_uuid.c b/src/uuid/gen_uuid.c
|
|
 |
472dcb8 |
deleted file mode 100644
|
|
 |
472dcb8 |
index e7c12b3..0000000
|
|
 |
472dcb8 |
--- a/src/uuid/gen_uuid.c
|
|
 |
472dcb8 |
+++ /dev/null
|
|
 |
472dcb8 |
@@ -1,557 +0,0 @@
|
|
 |
472dcb8 |
-/*
|
|
 |
472dcb8 |
- * gen_uuid.c --- generate a DCE-compatible uuid
|
|
 |
472dcb8 |
- *
|
|
 |
472dcb8 |
- * Copyright (C) 1996, 1997, 1998, 1999 Theodore Ts'o.
|
|
 |
472dcb8 |
- *
|
|
 |
472dcb8 |
- * %Begin-Header%
|
|
 |
472dcb8 |
- * Redistribution and use in source and binary forms, with or without
|
|
 |
472dcb8 |
- * modification, are permitted provided that the following conditions
|
|
 |
472dcb8 |
- * are met:
|
|
 |
472dcb8 |
- * 1. Redistributions of source code must retain the above copyright
|
|
 |
472dcb8 |
- * notice, and the entire permission notice in its entirety,
|
|
 |
472dcb8 |
- * including the disclaimer of warranties.
|
|
 |
472dcb8 |
- * 2. Redistributions in binary form must reproduce the above copyright
|
|
 |
472dcb8 |
- * notice, this list of conditions and the following disclaimer in the
|
|
 |
472dcb8 |
- * documentation and/or other materials provided with the distribution.
|
|
 |
472dcb8 |
- * 3. The name of the author may not be used to endorse or promote
|
|
 |
472dcb8 |
- * products derived from this software without specific prior
|
|
 |
472dcb8 |
- * written permission.
|
|
 |
472dcb8 |
- *
|
|
 |
472dcb8 |
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
|
 |
472dcb8 |
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
|
 |
472dcb8 |
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ALL OF
|
|
 |
472dcb8 |
- * WHICH ARE HEREBY DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE
|
|
 |
472dcb8 |
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
|
 |
472dcb8 |
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
|
|
 |
472dcb8 |
- * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
|
|
 |
472dcb8 |
- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
|
 |
472dcb8 |
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
 |
472dcb8 |
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
|
|
 |
472dcb8 |
- * USE OF THIS SOFTWARE, EVEN IF NOT ADVISED OF THE POSSIBILITY OF SUCH
|
|
 |
472dcb8 |
- * DAMAGE.
|
|
 |
472dcb8 |
- * %End-Header%
|
|
 |
472dcb8 |
- */
|
|
 |
472dcb8 |
-
|
|
 |
472dcb8 |
-/*
|
|
 |
472dcb8 |
- * Force inclusion of SVID stuff since we need it if we're compiling in
|
|
 |
472dcb8 |
- * gcc-wall wall mode
|
|
 |
472dcb8 |
- */
|
|
 |
472dcb8 |
-#define _DEFAULT_SOURCE
|
|
 |
472dcb8 |
-
|
|
 |
472dcb8 |
-#include "config.h"
|
|
 |
472dcb8 |
-
|
|
 |
472dcb8 |
-#ifdef _WIN32
|
|
 |
472dcb8 |
-#define _WIN32_WINNT 0x0500
|
|
 |
472dcb8 |
-#include <windows.h>
|
|
 |
472dcb8 |
-#define UUID MYUUID
|
|
 |
472dcb8 |
-#endif
|
|
 |
472dcb8 |
-#include <stdio.h>
|
|
 |
472dcb8 |
-#ifdef HAVE_UNISTD_H
|
|
 |
472dcb8 |
-#include <unistd.h>
|
|
 |
472dcb8 |
-#endif
|
|
 |
472dcb8 |
-#ifdef HAVE_STDLIB_H
|
|
 |
472dcb8 |
-#include <stdlib.h>
|
|
 |
472dcb8 |
-#endif
|
|
 |
472dcb8 |
-#include <string.h>
|
|
 |
472dcb8 |
-#include <fcntl.h>
|
|
 |
472dcb8 |
-#include <errno.h>
|
|
 |
472dcb8 |
-#include <limits.h>
|
|
 |
472dcb8 |
-#include <sys/types.h>
|
|
 |
472dcb8 |
-#ifdef HAVE_SYS_TIME_H
|
|
 |
472dcb8 |
-#include <sys/time.h>
|
|
 |
472dcb8 |
-#endif
|
|
 |
472dcb8 |
-#include <sys/stat.h>
|
|
 |
472dcb8 |
-#ifdef HAVE_SYS_FILE_H
|
|
 |
472dcb8 |
-#include <sys/file.h>
|
|
 |
472dcb8 |
-#endif
|
|
 |
472dcb8 |
-#ifdef HAVE_SYS_IOCTL_H
|
|
 |
472dcb8 |
-#include <sys/ioctl.h>
|
|
 |
472dcb8 |
-#endif
|
|
 |
472dcb8 |
-#ifdef HAVE_SYS_SOCKET_H
|
|
 |
472dcb8 |
-#include <sys/socket.h>
|
|
 |
472dcb8 |
-#endif
|
|
 |
472dcb8 |
-#ifdef HAVE_SYS_UN_H
|
|
 |
472dcb8 |
-#include <sys/un.h>
|
|
 |
472dcb8 |
-#endif
|
|
 |
472dcb8 |
-#ifdef HAVE_SYS_SOCKIO_H
|
|
 |
472dcb8 |
-#include <sys/sockio.h>
|
|
 |
472dcb8 |
-#endif
|
|
 |
472dcb8 |
-#ifdef HAVE_NET_IF_H
|
|
 |
472dcb8 |
-#include <net/if.h>
|
|
 |
472dcb8 |
-#endif
|
|
 |
472dcb8 |
-#ifdef HAVE_NETINET_IN_H
|
|
 |
472dcb8 |
-#include <netinet/in.h>
|
|
 |
472dcb8 |
-#endif
|
|
 |
472dcb8 |
-#ifdef HAVE_NET_IF_DL_H
|
|
 |
472dcb8 |
-#include <net/if_dl.h>
|
|
 |
472dcb8 |
-#endif
|
|
 |
472dcb8 |
-#if defined(__linux__) && defined(HAVE_SYS_SYSCALL_H)
|
|
 |
472dcb8 |
-#include <sys/syscall.h>
|
|
 |
472dcb8 |
-#endif
|
|
 |
472dcb8 |
-
|
|
 |
472dcb8 |
-#include "uuidP.h"
|
|
 |
472dcb8 |
-#include "uuidd.h"
|
|
 |
472dcb8 |
-
|
|
 |
472dcb8 |
-#ifdef USING_R
|
|
 |
472dcb8 |
-#include "igraph_random.h"
|
|
 |
472dcb8 |
-#define srand(x) ;
|
|
 |
472dcb8 |
-#define rand() RNG_INTEGER(0, RAND_MAX)
|
|
 |
472dcb8 |
-#endif
|
|
 |
472dcb8 |
-
|
|
 |
472dcb8 |
-#ifdef HAVE_TLS
|
|
 |
472dcb8 |
-#define THREAD_LOCAL static __thread
|
|
 |
472dcb8 |
-#else
|
|
 |
472dcb8 |
-#define THREAD_LOCAL static
|
|
 |
472dcb8 |
-#endif
|
|
 |
472dcb8 |
-
|
|
 |
472dcb8 |
-#ifdef _WIN32
|
|
 |
472dcb8 |
-#if 0 /* MinGW has gettimeofday so we don't need this */
|
|
 |
472dcb8 |
-static int gettimeofday (struct timeval *tv, void *dummy)
|
|
 |
472dcb8 |
-{
|
|
 |
472dcb8 |
- FILETIME ftime;
|
|
 |
472dcb8 |
- uint64_t n;
|
|
 |
472dcb8 |
-
|
|
 |
472dcb8 |
- GetSystemTimeAsFileTime (&ftime);
|
|
 |
472dcb8 |
- n = (((uint64_t) ftime.dwHighDateTime << 32)
|
|
 |
472dcb8 |
- + (uint64_t) ftime.dwLowDateTime);
|
|
 |
472dcb8 |
- if (n) {
|
|
 |
472dcb8 |
- n /= 10;
|
|
 |
472dcb8 |
- n -= ((369 * 365 + 89) * (uint64_t) 86400) * 1000000;
|
|
 |
472dcb8 |
- }
|
|
 |
472dcb8 |
-
|
|
 |
472dcb8 |
- tv->tv_sec = n / 1000000;
|
|
 |
472dcb8 |
- tv->tv_usec = n % 1000000;
|
|
 |
472dcb8 |
-}
|
|
 |
472dcb8 |
-#endif
|
|
 |
472dcb8 |
-
|
|
 |
472dcb8 |
-#ifdef __MINGW32__
|
|
 |
472dcb8 |
-int gettimeofday (struct timeval *tv, void *dummy);
|
|
 |
472dcb8 |
-#endif
|
|
 |
472dcb8 |
-#ifdef __MINGW64__
|
|
 |
472dcb8 |
-int gettimeofday (struct timeval *tv, void *dummy);
|
|
 |
472dcb8 |
-#endif
|
|
 |
472dcb8 |
-
|
|
 |
472dcb8 |
-static int getuid (void)
|
|
 |
472dcb8 |
-{
|
|
 |
472dcb8 |
- return 1;
|
|
 |
472dcb8 |
-}
|
|
 |
472dcb8 |
-#endif
|
|
 |
472dcb8 |
-
|
|
 |
472dcb8 |
-/*
|
|
 |
472dcb8 |
- * Get the ethernet hardware address, if we can find it...
|
|
 |
472dcb8 |
- *
|
|
 |
472dcb8 |
- * XXX for a windows version, probably should use GetAdaptersInfo:
|
|
 |
472dcb8 |
- * http://www.codeguru.com/cpp/i-n/network/networkinformation/article.php/c5451
|
|
 |
472dcb8 |
- * commenting out get_node_id just to get gen_uuid to compile under windows
|
|
 |
472dcb8 |
- * is not the right way to go!
|
|
 |
472dcb8 |
- */
|
|
 |
472dcb8 |
-static int get_node_id(unsigned char *node_id)
|
|
 |
472dcb8 |
-{
|
|
 |
472dcb8 |
-#ifdef HAVE_NET_IF_H
|
|
 |
472dcb8 |
- int sd;
|
|
 |
472dcb8 |
- struct ifreq ifr, *ifrp;
|
|
 |
472dcb8 |
- struct ifconf ifc;
|
|
 |
472dcb8 |
- char buf[1024];
|
|
 |
472dcb8 |
- int n, i;
|
|
 |
472dcb8 |
- unsigned char *a;
|
|
 |
472dcb8 |
-#ifdef HAVE_NET_IF_DL_H
|
|
 |
472dcb8 |
- struct sockaddr_dl *sdlp;
|
|
 |
472dcb8 |
-#endif
|
|
 |
472dcb8 |
-
|
|
 |
472dcb8 |
-/*
|
|
 |
472dcb8 |
- * BSD 4.4 defines the size of an ifreq to be
|
|
 |
472dcb8 |
- * max(sizeof(ifreq), sizeof(ifreq.ifr_name)+ifreq.ifr_addr.sa_len
|
|
 |
472dcb8 |
- * However, under earlier systems, sa_len isn't present, so the size is
|
|
 |
472dcb8 |
- * just sizeof(struct ifreq)
|
|
 |
472dcb8 |
- */
|
|
 |
472dcb8 |
-#ifdef HAVE_SA_LEN
|
|
 |
472dcb8 |
-#define max(x, y) (((x) > (y)) ? (x) : (y))
|
|
 |
472dcb8 |
-#define ifreq_size(i) max(sizeof(struct ifreq),\
|
|
 |
472dcb8 |
- sizeof((i).ifr_name)+(i).ifr_addr.sa_len)
|
|
 |
472dcb8 |
-#else
|
|
 |
472dcb8 |
-#define ifreq_size(i) sizeof(struct ifreq)
|
|
 |
472dcb8 |
-#endif /* HAVE_SA_LEN */
|
|
 |
472dcb8 |
-
|
|
 |
472dcb8 |
- sd = socket(AF_INET, SOCK_DGRAM, IPPROTO_IP);
|
|
 |
472dcb8 |
- if (sd < 0) {
|
|
 |
472dcb8 |
- return -1;
|
|
 |
472dcb8 |
- }
|
|
 |
472dcb8 |
- memset(buf, 0, sizeof(buf));
|
|
 |
472dcb8 |
- ifc.ifc_len = sizeof(buf);
|
|
 |
472dcb8 |
- ifc.ifc_buf = buf;
|
|
 |
472dcb8 |
- if (ioctl (sd, SIOCGIFCONF, (char *)&ifc) < 0) {
|
|
 |
472dcb8 |
- close(sd);
|
|
 |
472dcb8 |
- return -1;
|
|
 |
472dcb8 |
- }
|
|
 |
472dcb8 |
- n = ifc.ifc_len;
|
|
 |
472dcb8 |
- for (i = 0; i < n; i+= ifreq_size(*ifrp) ) {
|
|
 |
472dcb8 |
- ifrp = (struct ifreq *)((char *) ifc.ifc_buf+i);
|
|
 |
472dcb8 |
- strncpy(ifr.ifr_name, ifrp->ifr_name, IFNAMSIZ);
|
|
 |
472dcb8 |
-#ifdef SIOCGIFHWADDR
|
|
 |
472dcb8 |
- if (ioctl(sd, SIOCGIFHWADDR, &ifr) < 0)
|
|
 |
472dcb8 |
- continue;
|
|
 |
472dcb8 |
- a = (unsigned char *) &ifr.ifr_hwaddr.sa_data;
|
|
 |
472dcb8 |
-#else
|
|
 |
472dcb8 |
-#ifdef SIOCGENADDR
|
|
 |
472dcb8 |
- if (ioctl(sd, SIOCGENADDR, &ifr) < 0)
|
|
 |
472dcb8 |
- continue;
|
|
 |
472dcb8 |
- a = (unsigned char *) ifr.ifr_enaddr;
|
|
 |
472dcb8 |
-#else
|
|
 |
472dcb8 |
-#ifdef HAVE_NET_IF_DL_H
|
|
 |
472dcb8 |
- sdlp = (struct sockaddr_dl *) &ifrp->ifr_addr;
|
|
 |
472dcb8 |
- if ((sdlp->sdl_family != AF_LINK) || (sdlp->sdl_alen != 6))
|
|
 |
472dcb8 |
- continue;
|
|
 |
472dcb8 |
- a = (unsigned char *) &sdlp->sdl_data[sdlp->sdl_nlen];
|
|
 |
472dcb8 |
-#else
|
|
 |
472dcb8 |
- /*
|
|
 |
472dcb8 |
- * XXX we don't have a way of getting the hardware
|
|
 |
472dcb8 |
- * address
|
|
 |
472dcb8 |
- */
|
|
 |
472dcb8 |
- close(sd);
|
|
 |
472dcb8 |
- return 0;
|
|
 |
472dcb8 |
-#endif /* HAVE_NET_IF_DL_H */
|
|
 |
472dcb8 |
-#endif /* SIOCGENADDR */
|
|
 |
472dcb8 |
-#endif /* SIOCGIFHWADDR */
|
|
 |
472dcb8 |
- if (!a[0] && !a[1] && !a[2] && !a[3] && !a[4] && !a[5])
|
|
 |
472dcb8 |
- continue;
|
|
 |
472dcb8 |
- if (node_id) {
|
|
 |
472dcb8 |
- memcpy(node_id, a, 6);
|
|
 |
472dcb8 |
- close(sd);
|
|
 |
472dcb8 |
- return 1;
|
|
 |
472dcb8 |
- }
|
|
 |
472dcb8 |
- }
|
|
 |
472dcb8 |
- close(sd);
|
|
 |
472dcb8 |
-#endif
|
|
 |
472dcb8 |
- return 0;
|
|
 |
472dcb8 |
-}
|
|
 |
472dcb8 |
-
|
|
 |
472dcb8 |
-#if defined(__linux__) && defined(__NR_gettid) && defined(HAVE_JRAND48)
|
|
 |
472dcb8 |
-#define DO_JRAND_MIX
|
|
 |
472dcb8 |
-static unsigned short ul_jrand_seed[3];
|
|
 |
472dcb8 |
-#endif
|
|
 |
472dcb8 |
-
|
|
 |
472dcb8 |
-static int random_get_fd(void)
|
|
 |
472dcb8 |
-{
|
|
 |
472dcb8 |
- int i, fd = -1;
|
|
 |
472dcb8 |
- struct timeval tv;
|
|
 |
472dcb8 |
-
|
|
 |
472dcb8 |
- gettimeofday(&tv, NULL);
|
|
 |
472dcb8 |
-#ifndef _WIN32
|
|
 |
472dcb8 |
- fd = open("/dev/urandom", O_RDONLY);
|
|
 |
472dcb8 |
- if (fd == -1)
|
|
 |
472dcb8 |
- fd = open("/dev/random", O_RDONLY | O_NONBLOCK);
|
|
 |
472dcb8 |
- if (fd >= 0) {
|
|
 |
472dcb8 |
- i = fcntl(fd, F_GETFD);
|
|
 |
472dcb8 |
- if (i >= 0)
|
|
 |
472dcb8 |
- fcntl(fd, F_SETFD, i | FD_CLOEXEC);
|
|
 |
472dcb8 |
- }
|
|
 |
472dcb8 |
-#endif
|
|
 |
472dcb8 |
- srand((getpid() << 16) ^ getuid() ^ tv.tv_sec ^ tv.tv_usec);
|
|
 |
472dcb8 |
-
|
|
 |
472dcb8 |
-#ifdef DO_JRAND_MIX
|
|
 |
472dcb8 |
- ul_jrand_seed[0] = getpid() ^ (tv.tv_sec & 0xFFFF);
|
|
 |
472dcb8 |
- ul_jrand_seed[1] = getppid() ^ (tv.tv_usec & 0xFFFF);
|
|
 |
472dcb8 |
- ul_jrand_seed[2] = (tv.tv_sec ^ tv.tv_usec) >> 16;
|
|
 |
472dcb8 |
-#endif
|
|
 |
472dcb8 |
- /* Crank the random number generator a few times */
|
|
 |
472dcb8 |
- gettimeofday(&tv, NULL);
|
|
 |
472dcb8 |
- for (i = (tv.tv_sec ^ tv.tv_usec) & 0x1F; i > 0; i--)
|
|
 |
472dcb8 |
- rand();
|
|
 |
472dcb8 |
- return fd;
|
|
 |
472dcb8 |
-}
|
|
 |
472dcb8 |
-
|
|
 |
472dcb8 |
-/*
|
|
 |
472dcb8 |
- * Generate a stream of random nbytes into buf.
|
|
 |
472dcb8 |
- * Use /dev/urandom if possible, and if not,
|
|
 |
472dcb8 |
- * use glibc pseudo-random functions.
|
|
 |
472dcb8 |
- */
|
|
 |
472dcb8 |
-static void random_get_bytes(void *buf, size_t nbytes)
|
|
 |
472dcb8 |
-{
|
|
 |
472dcb8 |
- size_t i, n = nbytes;
|
|
 |
472dcb8 |
- int fd = random_get_fd();
|
|
 |
472dcb8 |
- int lose_counter = 0;
|
|
 |
472dcb8 |
- unsigned char *cp = (unsigned char *) buf;
|
|
 |
472dcb8 |
-
|
|
 |
472dcb8 |
- if (fd >= 0) {
|
|
 |
472dcb8 |
- while (n > 0) {
|
|
 |
472dcb8 |
- ssize_t x = read(fd, cp, n);
|
|
 |
472dcb8 |
- if (x <= 0) {
|
|
 |
472dcb8 |
- if (lose_counter++ > 16)
|
|
 |
472dcb8 |
- break;
|
|
 |
472dcb8 |
- continue;
|
|
 |
472dcb8 |
- }
|
|
 |
472dcb8 |
- n -= x;
|
|
 |
472dcb8 |
- cp += x;
|
|
 |
472dcb8 |
- lose_counter = 0;
|
|
 |
472dcb8 |
- }
|
|
 |
472dcb8 |
-
|
|
 |
472dcb8 |
- close(fd);
|
|
 |
472dcb8 |
- }
|
|
 |
472dcb8 |
-
|
|
 |
472dcb8 |
- /*
|
|
 |
472dcb8 |
- * We do this all the time, but this is the only source of
|
|
 |
472dcb8 |
- * randomness if /dev/random/urandom is out to lunch.
|
|
 |
472dcb8 |
- */
|
|
 |
472dcb8 |
- for (cp = buf, i = 0; i < nbytes; i++)
|
|
 |
472dcb8 |
- *cp++ ^= (rand() >> 7) & 0xFF;
|
|
 |
472dcb8 |
-
|
|
 |
472dcb8 |
-#ifdef DO_JRAND_MIX
|
|
 |
472dcb8 |
- {
|
|
 |
472dcb8 |
- unsigned short tmp_seed[3];
|
|
 |
472dcb8 |
-
|
|
 |
472dcb8 |
- memcpy(tmp_seed, ul_jrand_seed, sizeof(tmp_seed));
|
|
 |
472dcb8 |
- ul_jrand_seed[2] = ul_jrand_seed[2] ^ syscall(__NR_gettid);
|
|
 |
472dcb8 |
- for (cp = buf, i = 0; i < nbytes; i++)
|
|
 |
472dcb8 |
- *cp++ ^= (jrand48(tmp_seed) >> 7) & 0xFF;
|
|
 |
472dcb8 |
- memcpy(ul_jrand_seed, tmp_seed,
|
|
 |
472dcb8 |
- sizeof(ul_jrand_seed)-sizeof(unsigned short));
|
|
 |
472dcb8 |
- }
|
|
 |
472dcb8 |
-#endif
|
|
 |
472dcb8 |
-
|
|
 |
472dcb8 |
- return;
|
|
 |
472dcb8 |
-}
|
|
 |
472dcb8 |
-
|
|
 |
472dcb8 |
-#ifdef _WIN32 /* compatibility layer */
|
|
 |
472dcb8 |
-#define LOCK_EX 1
|
|
 |
472dcb8 |
-#define LOCK_UN 2
|
|
 |
472dcb8 |
-static int flock(int fd, int op)
|
|
 |
472dcb8 |
-{
|
|
 |
472dcb8 |
- HANDLE h = (HANDLE) _get_osfhandle(fd);
|
|
 |
472dcb8 |
- OVERLAPPED offset;
|
|
 |
472dcb8 |
- if (h < 0)
|
|
 |
472dcb8 |
- return -1;
|
|
 |
472dcb8 |
- memset(&offset, 0, sizeof(offset));
|
|
 |
472dcb8 |
- switch (op) {
|
|
 |
472dcb8 |
- case LOCK_EX:
|
|
 |
472dcb8 |
- return (LockFileEx(h, LOCKFILE_EXCLUSIVE_LOCK, 0, 1, 0, &offset)) ? 0 : -1;
|
|
 |
472dcb8 |
- case LOCK_UN:
|
|
 |
472dcb8 |
- UnlockFileEx(h, 0, 1, 0, &offset);
|
|
 |
472dcb8 |
- return 0;
|
|
 |
472dcb8 |
- }
|
|
 |
472dcb8 |
- return -1;
|
|
 |
472dcb8 |
-}
|
|
 |
472dcb8 |
-#endif
|
|
 |
472dcb8 |
-
|
|
 |
472dcb8 |
-/* Assume that the gettimeofday() has microsecond granularity */
|
|
 |
472dcb8 |
-#define MAX_ADJUSTMENT 10
|
|
 |
472dcb8 |
-
|
|
 |
472dcb8 |
-/*
|
|
 |
472dcb8 |
- * Get clock from global sequence clock counter.
|
|
 |
472dcb8 |
- *
|
|
 |
472dcb8 |
- * Return -1 if the clock counter could not be opened/locked (in this case
|
|
 |
472dcb8 |
- * pseudorandom value is returned in @ret_clock_seq), otherwise return 0.
|
|
 |
472dcb8 |
- */
|
|
 |
472dcb8 |
-static int get_clock(uint32_t *clock_high, uint32_t *clock_low,
|
|
 |
472dcb8 |
- uint16_t *ret_clock_seq, int *num)
|
|
 |
472dcb8 |
-{
|
|
 |
472dcb8 |
- THREAD_LOCAL int adjustment = 0;
|
|
 |
472dcb8 |
- THREAD_LOCAL struct timeval last = {0, 0};
|
|
 |
472dcb8 |
- THREAD_LOCAL int state_fd = -2;
|
|
 |
472dcb8 |
- THREAD_LOCAL FILE *state_f;
|
|
 |
472dcb8 |
- THREAD_LOCAL uint16_t clock_seq;
|
|
 |
472dcb8 |
- struct timeval tv;
|
|
 |
472dcb8 |
- uint64_t clock_reg;
|
|
 |
472dcb8 |
- mode_t save_umask;
|
|
 |
472dcb8 |
- int len;
|
|
 |
472dcb8 |
- int ret = 0;
|
|
 |
472dcb8 |
-
|
|
 |
472dcb8 |
- if (state_fd == -2) {
|
|
 |
472dcb8 |
- save_umask = umask(0);
|
|
 |
472dcb8 |
- state_fd = open(LIBUUID_CLOCK_FILE, O_RDWR|O_CREAT, 0660);
|
|
 |
472dcb8 |
- (void) umask(save_umask);
|
|
 |
472dcb8 |
- if (state_fd != -1) {
|
|
 |
472dcb8 |
- state_f = fdopen(state_fd, "r+");
|
|
 |
472dcb8 |
- if (!state_f) {
|
|
 |
472dcb8 |
- close(state_fd);
|
|
 |
472dcb8 |
- state_fd = -1;
|
|
 |
472dcb8 |
- ret = -1;
|
|
 |
472dcb8 |
- }
|
|
 |
472dcb8 |
- }
|
|
 |
472dcb8 |
- else
|
|
 |
472dcb8 |
- ret = -1;
|
|
 |
472dcb8 |
- }
|
|
 |
472dcb8 |
- if (state_fd >= 0) {
|
|
 |
472dcb8 |
- rewind(state_f);
|
|
 |
472dcb8 |
- }
|
|
 |
472dcb8 |
- if (state_fd >= 0) {
|
|
 |
472dcb8 |
- unsigned int cl;
|
|
 |
472dcb8 |
- unsigned long tv1, tv2;
|
|
 |
472dcb8 |
- int a;
|
|
 |
472dcb8 |
-
|
|
 |
472dcb8 |
- if (fscanf(state_f, "clock: %04x tv: %lu %lu adj: %d\n",
|
|
 |
472dcb8 |
- &cl, &tv1, &tv2, &a) == 4) {
|
|
 |
472dcb8 |
- clock_seq = cl & 0x3FFF;
|
|
 |
472dcb8 |
- last.tv_sec = tv1;
|
|
 |
472dcb8 |
- last.tv_usec = tv2;
|
|
 |
472dcb8 |
- adjustment = a;
|
|
 |
472dcb8 |
- }
|
|
 |
472dcb8 |
- }
|
|
 |
472dcb8 |
-
|
|
 |
472dcb8 |
- if ((last.tv_sec == 0) && (last.tv_usec == 0)) {
|
|
 |
472dcb8 |
- random_get_bytes(&clock_seq, sizeof(clock_seq));
|
|
 |
472dcb8 |
- clock_seq &= 0x3FFF;
|
|
 |
472dcb8 |
- gettimeofday(&last, NULL);
|
|
 |
472dcb8 |
- last.tv_sec--;
|
|
 |
472dcb8 |
- }
|
|
 |
472dcb8 |
-
|
|
 |
472dcb8 |
-try_again:
|
|
 |
472dcb8 |
- gettimeofday(&tv, NULL);
|
|
 |
472dcb8 |
- if ((tv.tv_sec < last.tv_sec) ||
|
|
 |
472dcb8 |
- ((tv.tv_sec == last.tv_sec) &&
|
|
 |
472dcb8 |
- (tv.tv_usec < last.tv_usec))) {
|
|
 |
472dcb8 |
- clock_seq = (clock_seq+1) & 0x3FFF;
|
|
 |
472dcb8 |
- adjustment = 0;
|
|
 |
472dcb8 |
- last = tv;
|
|
 |
472dcb8 |
- } else if ((tv.tv_sec == last.tv_sec) &&
|
|
 |
472dcb8 |
- (tv.tv_usec == last.tv_usec)) {
|
|
 |
472dcb8 |
- if (adjustment >= MAX_ADJUSTMENT)
|
|
 |
472dcb8 |
- goto try_again;
|
|
 |
472dcb8 |
- adjustment++;
|
|
 |
472dcb8 |
- } else {
|
|
 |
472dcb8 |
- adjustment = 0;
|
|
 |
472dcb8 |
- last = tv;
|
|
 |
472dcb8 |
- }
|
|
 |
472dcb8 |
-
|
|
 |
472dcb8 |
- clock_reg = tv.tv_usec*10 + adjustment;
|
|
 |
472dcb8 |
- clock_reg += ((uint64_t) tv.tv_sec)*10000000;
|
|
 |
472dcb8 |
- clock_reg += (((uint64_t) 0x01B21DD2) << 32) + 0x13814000;
|
|
 |
472dcb8 |
-
|
|
 |
472dcb8 |
- if (num && (*num > 1)) {
|
|
 |
472dcb8 |
- adjustment += *num - 1;
|
|
 |
472dcb8 |
- last.tv_usec += adjustment / 10;
|
|
 |
472dcb8 |
- adjustment = adjustment % 10;
|
|
 |
472dcb8 |
- last.tv_sec += last.tv_usec / 1000000;
|
|
 |
472dcb8 |
- last.tv_usec = last.tv_usec % 1000000;
|
|
 |
472dcb8 |
- }
|
|
 |
472dcb8 |
-
|
|
 |
472dcb8 |
- if (state_fd >= 0) {
|
|
 |
472dcb8 |
- rewind(state_f);
|
|
 |
472dcb8 |
- len = fprintf(state_f,
|
|
 |
472dcb8 |
- "clock: %04x tv: %016lu %08lu adj: %08d\n",
|
|
 |
472dcb8 |
- clock_seq, (unsigned long) last.tv_sec, (unsigned long) last.tv_usec, adjustment);
|
|
 |
472dcb8 |
- fflush(state_f);
|
|
 |
472dcb8 |
- if (ftruncate(state_fd, len) < 0) {
|
|
 |
472dcb8 |
- fprintf(state_f, " \n");
|
|
 |
472dcb8 |
- fflush(state_f);
|
|
 |
472dcb8 |
- }
|
|
 |
472dcb8 |
- rewind(state_f);
|
|
 |
472dcb8 |
- }
|
|
 |
472dcb8 |
-
|
|
 |
472dcb8 |
- *clock_high = clock_reg >> 32;
|
|
 |
472dcb8 |
- *clock_low = clock_reg;
|
|
 |
472dcb8 |
- *ret_clock_seq = clock_seq;
|
|
 |
472dcb8 |
- return ret;
|
|
 |
472dcb8 |
-}
|
|
 |
472dcb8 |
-
|
|
 |
472dcb8 |
-
|
|
 |
472dcb8 |
-int __uuid_generate_time(uuid_t out, int *num)
|
|
 |
472dcb8 |
-{
|
|
 |
472dcb8 |
- static unsigned char node_id[6];
|
|
 |
472dcb8 |
- static int has_init = 0;
|
|
 |
472dcb8 |
- struct uuid uu;
|
|
 |
472dcb8 |
- uint32_t clock_mid;
|
|
 |
472dcb8 |
- int ret;
|
|
 |
472dcb8 |
-
|
|
 |
472dcb8 |
- if (!has_init) {
|
|
 |
472dcb8 |
- if (get_node_id(node_id) <= 0) {
|
|
 |
472dcb8 |
- random_get_bytes(node_id, 6);
|
|
 |
472dcb8 |
- /*
|
|
 |
472dcb8 |
- * Set multicast bit, to prevent conflicts
|
|
 |
472dcb8 |
- * with IEEE 802 addresses obtained from
|
|
 |
472dcb8 |
- * network cards
|
|
 |
472dcb8 |
- */
|
|
 |
472dcb8 |
- node_id[0] |= 0x01;
|
|
 |
472dcb8 |
- }
|
|
 |
472dcb8 |
- has_init = 1;
|
|
 |
472dcb8 |
- }
|
|
 |
472dcb8 |
- ret = get_clock(&clock_mid, &uu.time_low, &uu.clock_seq, num);
|
|
 |
472dcb8 |
- uu.clock_seq |= 0x8000;
|
|
 |
472dcb8 |
- uu.time_mid = (uint16_t) clock_mid;
|
|
 |
472dcb8 |
- uu.time_hi_and_version = ((clock_mid >> 16) & 0x0FFF) | 0x1000;
|
|
 |
472dcb8 |
- memcpy(uu.node, node_id, 6);
|
|
 |
472dcb8 |
- uuid_pack(&uu, out);
|
|
 |
472dcb8 |
- return ret;
|
|
 |
472dcb8 |
-}
|
|
 |
472dcb8 |
-
|
|
 |
472dcb8 |
-/*
|
|
 |
472dcb8 |
- * Generate time-based UUID and store it to @out
|
|
 |
472dcb8 |
- *
|
|
 |
472dcb8 |
- * Since there is no daemon here, use fall-back right away
|
|
 |
472dcb8 |
- */
|
|
 |
472dcb8 |
-static int uuid_generate_time_generic(uuid_t out) {
|
|
 |
472dcb8 |
- return __uuid_generate_time(out, 0);
|
|
 |
472dcb8 |
-}
|
|
 |
472dcb8 |
-
|
|
 |
472dcb8 |
-/*
|
|
 |
472dcb8 |
- * Generate time-based UUID and store it to @out.
|
|
 |
472dcb8 |
- *
|
|
 |
472dcb8 |
- * Discards return value from uuid_generate_time_generic()
|
|
 |
472dcb8 |
- */
|
|
 |
472dcb8 |
-void uuid_generate_time(uuid_t out)
|
|
 |
472dcb8 |
-{
|
|
 |
472dcb8 |
- (void)uuid_generate_time_generic(out);
|
|
 |
472dcb8 |
-}
|
|
 |
472dcb8 |
-
|
|
 |
472dcb8 |
-
|
|
 |
472dcb8 |
-int uuid_generate_time_safe(uuid_t out)
|
|
 |
472dcb8 |
-{
|
|
 |
472dcb8 |
- return uuid_generate_time_generic(out);
|
|
 |
472dcb8 |
-}
|
|
 |
472dcb8 |
-
|
|
 |
472dcb8 |
-
|
|
 |
472dcb8 |
-void __uuid_generate_random(uuid_t out, int *num)
|
|
 |
472dcb8 |
-{
|
|
 |
472dcb8 |
- uuid_t buf;
|
|
 |
472dcb8 |
- struct uuid uu;
|
|
 |
472dcb8 |
- int i, n;
|
|
 |
472dcb8 |
-
|
|
 |
472dcb8 |
- if (!num || !*num)
|
|
 |
472dcb8 |
- n = 1;
|
|
 |
472dcb8 |
- else
|
|
 |
472dcb8 |
- n = *num;
|
|
 |
472dcb8 |
-
|
|
 |
472dcb8 |
- for (i = 0; i < n; i++) {
|
|
 |
472dcb8 |
- random_get_bytes(buf, sizeof(buf));
|
|
 |
472dcb8 |
- uuid_unpack(buf, &uu);
|
|
 |
472dcb8 |
-
|
|
 |
472dcb8 |
- uu.clock_seq = (uu.clock_seq & 0x3FFF) | 0x8000;
|
|
 |
472dcb8 |
- uu.time_hi_and_version = (uu.time_hi_and_version & 0x0FFF)
|
|
 |
472dcb8 |
- | 0x4000;
|
|
 |
472dcb8 |
- uuid_pack(&uu, out);
|
|
 |
472dcb8 |
- out += sizeof(uuid_t);
|
|
 |
472dcb8 |
- }
|
|
 |
472dcb8 |
-}
|
|
 |
472dcb8 |
-
|
|
 |
472dcb8 |
-void uuid_generate_random(uuid_t out)
|
|
 |
472dcb8 |
-{
|
|
 |
472dcb8 |
- int num = 1;
|
|
 |
472dcb8 |
- /* No real reason to use the daemon for random uuid's -- yet */
|
|
 |
472dcb8 |
-
|
|
 |
472dcb8 |
- __uuid_generate_random(out, &num);
|
|
 |
472dcb8 |
-}
|
|
 |
472dcb8 |
-
|
|
 |
472dcb8 |
-/*
|
|
 |
472dcb8 |
- * Check whether good random source (/dev/random or /dev/urandom)
|
|
 |
472dcb8 |
- * is available.
|
|
 |
472dcb8 |
- */
|
|
 |
472dcb8 |
-static int have_random_source(void)
|
|
 |
472dcb8 |
-{
|
|
 |
472dcb8 |
- struct stat s;
|
|
 |
472dcb8 |
-
|
|
 |
472dcb8 |
- return (!stat("/dev/random", &s) || !stat("/dev/urandom", &s);;
|
|
 |
472dcb8 |
-}
|
|
 |
472dcb8 |
-
|
|
 |
472dcb8 |
-
|
|
 |
472dcb8 |
-/*
|
|
 |
472dcb8 |
- * This is the generic front-end to uuid_generate_random and
|
|
 |
472dcb8 |
- * uuid_generate_time. It uses uuid_generate_random only if
|
|
 |
472dcb8 |
- * /dev/urandom is available, since otherwise we won't have
|
|
 |
472dcb8 |
- * high-quality randomness.
|
|
 |
472dcb8 |
- */
|
|
 |
472dcb8 |
-void uuid_generate(uuid_t out)
|
|
 |
472dcb8 |
-{
|
|
 |
472dcb8 |
- if (have_random_source())
|
|
 |
472dcb8 |
- uuid_generate_random(out);
|
|
 |
472dcb8 |
- else
|
|
 |
472dcb8 |
- uuid_generate_time(out);
|
|
 |
472dcb8 |
-}
|
|
 |
472dcb8 |
diff --git a/src/uuid/isnull.c b/src/uuid/isnull.c
|
|
 |
472dcb8 |
deleted file mode 100644
|
|
 |
472dcb8 |
index 931e7e7..0000000
|
|
 |
472dcb8 |
--- a/src/uuid/isnull.c
|
|
 |
472dcb8 |
+++ /dev/null
|
|
 |
472dcb8 |
@@ -1,48 +0,0 @@
|
|
 |
472dcb8 |
-/*
|
|
 |
472dcb8 |
- * isnull.c --- Check whether or not the UUID is null
|
|
 |
472dcb8 |
- *
|
|
 |
472dcb8 |
- * Copyright (C) 1996, 1997 Theodore Ts'o.
|
|
 |
472dcb8 |
- *
|
|
 |
472dcb8 |
- * %Begin-Header%
|
|
 |
472dcb8 |
- * Redistribution and use in source and binary forms, with or without
|
|
 |
472dcb8 |
- * modification, are permitted provided that the following conditions
|
|
 |
472dcb8 |
- * are met:
|
|
 |
472dcb8 |
- * 1. Redistributions of source code must retain the above copyright
|
|
 |
472dcb8 |
- * notice, and the entire permission notice in its entirety,
|
|
 |
472dcb8 |
- * including the disclaimer of warranties.
|
|
 |
472dcb8 |
- * 2. Redistributions in binary form must reproduce the above copyright
|
|
 |
472dcb8 |
- * notice, this list of conditions and the following disclaimer in the
|
|
 |
472dcb8 |
- * documentation and/or other materials provided with the distribution.
|
|
 |
472dcb8 |
- * 3. The name of the author may not be used to endorse or promote
|
|
 |
472dcb8 |
- * products derived from this software without specific prior
|
|
 |
472dcb8 |
- * written permission.
|
|
 |
472dcb8 |
- *
|
|
 |
472dcb8 |
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
|
 |
472dcb8 |
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
|
 |
472dcb8 |
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ALL OF
|
|
 |
472dcb8 |
- * WHICH ARE HEREBY DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE
|
|
 |
472dcb8 |
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
|
 |
472dcb8 |
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
|
|
 |
472dcb8 |
- * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
|
|
 |
472dcb8 |
- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
|
 |
472dcb8 |
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
 |
472dcb8 |
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
|
|
 |
472dcb8 |
- * USE OF THIS SOFTWARE, EVEN IF NOT ADVISED OF THE POSSIBILITY OF SUCH
|
|
 |
472dcb8 |
- * DAMAGE.
|
|
 |
472dcb8 |
- * %End-Header%
|
|
 |
472dcb8 |
- */
|
|
 |
472dcb8 |
-
|
|
 |
472dcb8 |
-#include "uuidP.h"
|
|
 |
472dcb8 |
-
|
|
 |
472dcb8 |
-/* Returns 1 if the uuid is the NULL uuid */
|
|
 |
472dcb8 |
-int uuid_is_null(const uuid_t uu)
|
|
 |
472dcb8 |
-{
|
|
 |
472dcb8 |
- const unsigned char *cp;
|
|
 |
472dcb8 |
- int i;
|
|
 |
472dcb8 |
-
|
|
 |
472dcb8 |
- for (i=0, cp = uu; i < 16; i++)
|
|
 |
472dcb8 |
- if (*cp++)
|
|
 |
472dcb8 |
- return 0;
|
|
 |
472dcb8 |
- return 1;
|
|
 |
472dcb8 |
-}
|
|
 |
472dcb8 |
-
|
|
 |
472dcb8 |
diff --git a/src/uuid/pack.c b/src/uuid/pack.c
|
|
 |
472dcb8 |
deleted file mode 100644
|
|
 |
472dcb8 |
index 6e12476..0000000
|
|
 |
472dcb8 |
--- a/src/uuid/pack.c
|
|
 |
472dcb8 |
+++ /dev/null
|
|
 |
472dcb8 |
@@ -1,69 +0,0 @@
|
|
 |
472dcb8 |
-/*
|
|
 |
472dcb8 |
- * Internal routine for packing UUIDs
|
|
 |
472dcb8 |
- *
|
|
 |
472dcb8 |
- * Copyright (C) 1996, 1997 Theodore Ts'o.
|
|
 |
472dcb8 |
- *
|
|
 |
472dcb8 |
- * %Begin-Header%
|
|
 |
472dcb8 |
- * Redistribution and use in source and binary forms, with or without
|
|
 |
472dcb8 |
- * modification, are permitted provided that the following conditions
|
|
 |
472dcb8 |
- * are met:
|
|
 |
472dcb8 |
- * 1. Redistributions of source code must retain the above copyright
|
|
 |
472dcb8 |
- * notice, and the entire permission notice in its entirety,
|
|
 |
472dcb8 |
- * including the disclaimer of warranties.
|
|
 |
472dcb8 |
- * 2. Redistributions in binary form must reproduce the above copyright
|
|
 |
472dcb8 |
- * notice, this list of conditions and the following disclaimer in the
|
|
 |
472dcb8 |
- * documentation and/or other materials provided with the distribution.
|
|
 |
472dcb8 |
- * 3. The name of the author may not be used to endorse or promote
|
|
 |
472dcb8 |
- * products derived from this software without specific prior
|
|
 |
472dcb8 |
- * written permission.
|
|
 |
472dcb8 |
- *
|
|
 |
472dcb8 |
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
|
 |
472dcb8 |
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
|
 |
472dcb8 |
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ALL OF
|
|
 |
472dcb8 |
- * WHICH ARE HEREBY DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE
|
|
 |
472dcb8 |
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
|
 |
472dcb8 |
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
|
|
 |
472dcb8 |
- * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
|
|
 |
472dcb8 |
- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
|
 |
472dcb8 |
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
 |
472dcb8 |
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
|
|
 |
472dcb8 |
- * USE OF THIS SOFTWARE, EVEN IF NOT ADVISED OF THE POSSIBILITY OF SUCH
|
|
 |
472dcb8 |
- * DAMAGE.
|
|
 |
472dcb8 |
- * %End-Header%
|
|
 |
472dcb8 |
- */
|
|
 |
472dcb8 |
-
|
|
 |
472dcb8 |
-#include <string.h>
|
|
 |
472dcb8 |
-#include "uuidP.h"
|
|
 |
472dcb8 |
-
|
|
 |
472dcb8 |
-void uuid_pack(const struct uuid *uu, uuid_t ptr)
|
|
 |
472dcb8 |
-{
|
|
 |
472dcb8 |
- uint32_t tmp;
|
|
 |
472dcb8 |
- unsigned char *out = ptr;
|
|
 |
472dcb8 |
-
|
|
 |
472dcb8 |
- tmp = uu->time_low;
|
|
 |
472dcb8 |
- out[3] = (unsigned char) tmp;
|
|
 |
472dcb8 |
- tmp >>= 8;
|
|
 |
472dcb8 |
- out[2] = (unsigned char) tmp;
|
|
 |
472dcb8 |
- tmp >>= 8;
|
|
 |
472dcb8 |
- out[1] = (unsigned char) tmp;
|
|
 |
472dcb8 |
- tmp >>= 8;
|
|
 |
472dcb8 |
- out[0] = (unsigned char) tmp;
|
|
 |
472dcb8 |
-
|
|
 |
472dcb8 |
- tmp = uu->time_mid;
|
|
 |
472dcb8 |
- out[5] = (unsigned char) tmp;
|
|
 |
472dcb8 |
- tmp >>= 8;
|
|
 |
472dcb8 |
- out[4] = (unsigned char) tmp;
|
|
 |
472dcb8 |
-
|
|
 |
472dcb8 |
- tmp = uu->time_hi_and_version;
|
|
 |
472dcb8 |
- out[7] = (unsigned char) tmp;
|
|
 |
472dcb8 |
- tmp >>= 8;
|
|
 |
472dcb8 |
- out[6] = (unsigned char) tmp;
|
|
 |
472dcb8 |
-
|
|
 |
472dcb8 |
- tmp = uu->clock_seq;
|
|
 |
472dcb8 |
- out[9] = (unsigned char) tmp;
|
|
 |
472dcb8 |
- tmp >>= 8;
|
|
 |
472dcb8 |
- out[8] = (unsigned char) tmp;
|
|
 |
472dcb8 |
-
|
|
 |
472dcb8 |
- memcpy(out+10, uu->node, 6);
|
|
 |
472dcb8 |
-}
|
|
 |
472dcb8 |
-
|
|
 |
472dcb8 |
diff --git a/src/uuid/parse.c b/src/uuid/parse.c
|
|
 |
472dcb8 |
deleted file mode 100644
|
|
 |
472dcb8 |
index 074383e..0000000
|
|
 |
472dcb8 |
--- a/src/uuid/parse.c
|
|
 |
472dcb8 |
+++ /dev/null
|
|
 |
472dcb8 |
@@ -1,79 +0,0 @@
|
|
 |
472dcb8 |
-/*
|
|
 |
472dcb8 |
- * parse.c --- UUID parsing
|
|
 |
472dcb8 |
- *
|
|
 |
472dcb8 |
- * Copyright (C) 1996, 1997 Theodore Ts'o.
|
|
 |
472dcb8 |
- *
|
|
 |
472dcb8 |
- * %Begin-Header%
|
|
 |
472dcb8 |
- * Redistribution and use in source and binary forms, with or without
|
|
 |
472dcb8 |
- * modification, are permitted provided that the following conditions
|
|
 |
472dcb8 |
- * are met:
|
|
 |
472dcb8 |
- * 1. Redistributions of source code must retain the above copyright
|
|
 |
472dcb8 |
- * notice, and the entire permission notice in its entirety,
|
|
 |
472dcb8 |
- * including the disclaimer of warranties.
|
|
 |
472dcb8 |
- * 2. Redistributions in binary form must reproduce the above copyright
|
|
 |
472dcb8 |
- * notice, this list of conditions and the following disclaimer in the
|
|
 |
472dcb8 |
- * documentation and/or other materials provided with the distribution.
|
|
 |
472dcb8 |
- * 3. The name of the author may not be used to endorse or promote
|
|
 |
472dcb8 |
- * products derived from this software without specific prior
|
|
 |
472dcb8 |
- * written permission.
|
|
 |
472dcb8 |
- *
|
|
 |
472dcb8 |
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
|
 |
472dcb8 |
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
|
 |
472dcb8 |
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ALL OF
|
|
 |
472dcb8 |
- * WHICH ARE HEREBY DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE
|
|
 |
472dcb8 |
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
|
 |
472dcb8 |
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
|
|
 |
472dcb8 |
- * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
|
|
 |
472dcb8 |
- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
|
 |
472dcb8 |
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
 |
472dcb8 |
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
|
|
 |
472dcb8 |
- * USE OF THIS SOFTWARE, EVEN IF NOT ADVISED OF THE POSSIBILITY OF SUCH
|
|
 |
472dcb8 |
- * DAMAGE.
|
|
 |
472dcb8 |
- * %End-Header%
|
|
 |
472dcb8 |
- */
|
|
 |
472dcb8 |
-
|
|
 |
472dcb8 |
-#include <stdlib.h>
|
|
 |
472dcb8 |
-#include <stdio.h>
|
|
 |
472dcb8 |
-#include <ctype.h>
|
|
 |
472dcb8 |
-#include <string.h>
|
|
 |
472dcb8 |
-
|
|
 |
472dcb8 |
-#include "uuidP.h"
|
|
 |
472dcb8 |
-
|
|
 |
472dcb8 |
-int uuid_parse(const char *in, uuid_t uu)
|
|
 |
472dcb8 |
-{
|
|
 |
472dcb8 |
- struct uuid uuid;
|
|
 |
472dcb8 |
- int i;
|
|
 |
472dcb8 |
- const char *cp;
|
|
 |
472dcb8 |
- char buf[3];
|
|
 |
472dcb8 |
-
|
|
 |
472dcb8 |
- if (strlen(in) != 36)
|
|
 |
472dcb8 |
- return -1;
|
|
 |
472dcb8 |
- for (i=0, cp = in; i <= 36; i++,cp++) {
|
|
 |
472dcb8 |
- if ((i == 8) || (i == 13) || (i == 18) ||
|
|
 |
472dcb8 |
- (i == 23)) {
|
|
 |
472dcb8 |
- if (*cp == '-')
|
|
 |
472dcb8 |
- continue;
|
|
 |
472dcb8 |
- else
|
|
 |
472dcb8 |
- return -1;
|
|
 |
472dcb8 |
- }
|
|
 |
472dcb8 |
- if (i== 36)
|
|
 |
472dcb8 |
- if (*cp == 0)
|
|
 |
472dcb8 |
- continue;
|
|
 |
472dcb8 |
- if (!isxdigit(*cp))
|
|
 |
472dcb8 |
- return -1;
|
|
 |
472dcb8 |
- }
|
|
 |
472dcb8 |
- uuid.time_low = strtoul(in, NULL, 16);
|
|
 |
472dcb8 |
- uuid.time_mid = strtoul(in+9, NULL, 16);
|
|
 |
472dcb8 |
- uuid.time_hi_and_version = strtoul(in+14, NULL, 16);
|
|
 |
472dcb8 |
- uuid.clock_seq = strtoul(in+19, NULL, 16);
|
|
 |
472dcb8 |
- cp = in+24;
|
|
 |
472dcb8 |
- buf[2] = 0;
|
|
 |
472dcb8 |
- for (i=0; i < 6; i++) {
|
|
 |
472dcb8 |
- buf[0] = *cp++;
|
|
 |
472dcb8 |
- buf[1] = *cp++;
|
|
 |
472dcb8 |
- uuid.node[i] = strtoul(buf, NULL, 16);
|
|
 |
472dcb8 |
- }
|
|
 |
472dcb8 |
-
|
|
 |
472dcb8 |
- uuid_pack(&uuid, uu);
|
|
 |
472dcb8 |
- return 0;
|
|
 |
472dcb8 |
-}
|
|
 |
472dcb8 |
diff --git a/src/uuid/unpack.c b/src/uuid/unpack.c
|
|
 |
472dcb8 |
deleted file mode 100644
|
|
 |
472dcb8 |
index beaaff3..0000000
|
|
 |
472dcb8 |
--- a/src/uuid/unpack.c
|
|
 |
472dcb8 |
+++ /dev/null
|
|
 |
472dcb8 |
@@ -1,63 +0,0 @@
|
|
 |
472dcb8 |
-/*
|
|
 |
472dcb8 |
- * Internal routine for unpacking UUID
|
|
 |
472dcb8 |
- *
|
|
 |
472dcb8 |
- * Copyright (C) 1996, 1997 Theodore Ts'o.
|
|
 |
472dcb8 |
- *
|
|
 |
472dcb8 |
- * %Begin-Header%
|
|
 |
472dcb8 |
- * Redistribution and use in source and binary forms, with or without
|
|
 |
472dcb8 |
- * modification, are permitted provided that the following conditions
|
|
 |
472dcb8 |
- * are met:
|
|
 |
472dcb8 |
- * 1. Redistributions of source code must retain the above copyright
|
|
 |
472dcb8 |
- * notice, and the entire permission notice in its entirety,
|
|
 |
472dcb8 |
- * including the disclaimer of warranties.
|
|
 |
472dcb8 |
- * 2. Redistributions in binary form must reproduce the above copyright
|
|
 |
472dcb8 |
- * notice, this list of conditions and the following disclaimer in the
|
|
 |
472dcb8 |
- * documentation and/or other materials provided with the distribution.
|
|
 |
472dcb8 |
- * 3. The name of the author may not be used to endorse or promote
|
|
 |
472dcb8 |
- * products derived from this software without specific prior
|
|
 |
472dcb8 |
- * written permission.
|
|
 |
472dcb8 |
- *
|
|
 |
472dcb8 |
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
|
 |
472dcb8 |
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
|
 |
472dcb8 |
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ALL OF
|
|
 |
472dcb8 |
- * WHICH ARE HEREBY DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE
|
|
 |
472dcb8 |
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
|
 |
472dcb8 |
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
|
|
 |
472dcb8 |
- * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
|
|
 |
472dcb8 |
- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
|
 |
472dcb8 |
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
 |
472dcb8 |
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
|
|
 |
472dcb8 |
- * USE OF THIS SOFTWARE, EVEN IF NOT ADVISED OF THE POSSIBILITY OF SUCH
|
|
 |
472dcb8 |
- * DAMAGE.
|
|
 |
472dcb8 |
- * %End-Header%
|
|
 |
472dcb8 |
- */
|
|
 |
472dcb8 |
-
|
|
 |
472dcb8 |
-#include <string.h>
|
|
 |
472dcb8 |
-#include "uuidP.h"
|
|
 |
472dcb8 |
-
|
|
 |
472dcb8 |
-void uuid_unpack(const uuid_t in, struct uuid *uu)
|
|
 |
472dcb8 |
-{
|
|
 |
472dcb8 |
- const uint8_t *ptr = in;
|
|
 |
472dcb8 |
- uint32_t tmp;
|
|
 |
472dcb8 |
-
|
|
 |
472dcb8 |
- tmp = *ptr++;
|
|
 |
472dcb8 |
- tmp = (tmp << 8) | *ptr++;
|
|
 |
472dcb8 |
- tmp = (tmp << 8) | *ptr++;
|
|
 |
472dcb8 |
- tmp = (tmp << 8) | *ptr++;
|
|
 |
472dcb8 |
- uu->time_low = tmp;
|
|
 |
472dcb8 |
-
|
|
 |
472dcb8 |
- tmp = *ptr++;
|
|
 |
472dcb8 |
- tmp = (tmp << 8) | *ptr++;
|
|
 |
472dcb8 |
- uu->time_mid = tmp;
|
|
 |
472dcb8 |
-
|
|
 |
472dcb8 |
- tmp = *ptr++;
|
|
 |
472dcb8 |
- tmp = (tmp << 8) | *ptr++;
|
|
 |
472dcb8 |
- uu->time_hi_and_version = tmp;
|
|
 |
472dcb8 |
-
|
|
 |
472dcb8 |
- tmp = *ptr++;
|
|
 |
472dcb8 |
- tmp = (tmp << 8) | *ptr++;
|
|
 |
472dcb8 |
- uu->clock_seq = tmp;
|
|
 |
472dcb8 |
-
|
|
 |
472dcb8 |
- memcpy(uu->node, ptr, 6);
|
|
 |
472dcb8 |
-}
|
|
 |
472dcb8 |
-
|
|
 |
472dcb8 |
diff --git a/src/uuid/unparse.c b/src/uuid/unparse.c
|
|
 |
472dcb8 |
deleted file mode 100644
|
|
 |
472dcb8 |
index a95bbb0..0000000
|
|
 |
472dcb8 |
--- a/src/uuid/unparse.c
|
|
 |
472dcb8 |
+++ /dev/null
|
|
 |
472dcb8 |
@@ -1,76 +0,0 @@
|
|
 |
472dcb8 |
-/*
|
|
 |
472dcb8 |
- * unparse.c -- convert a UUID to string
|
|
 |
472dcb8 |
- *
|
|
 |
472dcb8 |
- * Copyright (C) 1996, 1997 Theodore Ts'o.
|
|
 |
472dcb8 |
- *
|
|
 |
472dcb8 |
- * %Begin-Header%
|
|
 |
472dcb8 |
- * Redistribution and use in source and binary forms, with or without
|
|
 |
472dcb8 |
- * modification, are permitted provided that the following conditions
|
|
 |
472dcb8 |
- * are met:
|
|
 |
472dcb8 |
- * 1. Redistributions of source code must retain the above copyright
|
|
 |
472dcb8 |
- * notice, and the entire permission notice in its entirety,
|
|
 |
472dcb8 |
- * including the disclaimer of warranties.
|
|
 |
472dcb8 |
- * 2. Redistributions in binary form must reproduce the above copyright
|
|
 |
472dcb8 |
- * notice, this list of conditions and the following disclaimer in the
|
|
 |
472dcb8 |
- * documentation and/or other materials provided with the distribution.
|
|
 |
472dcb8 |
- * 3. The name of the author may not be used to endorse or promote
|
|
 |
472dcb8 |
- * products derived from this software without specific prior
|
|
 |
472dcb8 |
- * written permission.
|
|
 |
472dcb8 |
- *
|
|
 |
472dcb8 |
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
|
 |
472dcb8 |
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
|
 |
472dcb8 |
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ALL OF
|
|
 |
472dcb8 |
- * WHICH ARE HEREBY DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE
|
|
 |
472dcb8 |
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
|
 |
472dcb8 |
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
|
|
 |
472dcb8 |
- * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
|
|
 |
472dcb8 |
- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
|
 |
472dcb8 |
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
 |
472dcb8 |
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
|
|
 |
472dcb8 |
- * USE OF THIS SOFTWARE, EVEN IF NOT ADVISED OF THE POSSIBILITY OF SUCH
|
|
 |
472dcb8 |
- * DAMAGE.
|
|
 |
472dcb8 |
- * %End-Header%
|
|
 |
472dcb8 |
- */
|
|
 |
472dcb8 |
-
|
|
 |
472dcb8 |
-#include <stdio.h>
|
|
 |
472dcb8 |
-
|
|
 |
472dcb8 |
-#include "uuidP.h"
|
|
 |
472dcb8 |
-
|
|
 |
472dcb8 |
-static const char *fmt_lower =
|
|
 |
472dcb8 |
- "%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x";
|
|
 |
472dcb8 |
-
|
|
 |
472dcb8 |
-static const char *fmt_upper =
|
|
 |
472dcb8 |
- "%08X-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X";
|
|
 |
472dcb8 |
-
|
|
 |
472dcb8 |
-#ifdef UUID_UNPARSE_DEFAULT_UPPER
|
|
 |
472dcb8 |
-#define FMT_DEFAULT fmt_upper
|
|
 |
472dcb8 |
-#else
|
|
 |
472dcb8 |
-#define FMT_DEFAULT fmt_lower
|
|
 |
472dcb8 |
-#endif
|
|
 |
472dcb8 |
-
|
|
 |
472dcb8 |
-static void uuid_unparse_x(const uuid_t uu, char *out, const char *fmt)
|
|
 |
472dcb8 |
-{
|
|
 |
472dcb8 |
- struct uuid uuid;
|
|
 |
472dcb8 |
-
|
|
 |
472dcb8 |
- uuid_unpack(uu, &uuid);
|
|
 |
472dcb8 |
- sprintf(out, fmt,
|
|
 |
472dcb8 |
- uuid.time_low, uuid.time_mid, uuid.time_hi_and_version,
|
|
 |
472dcb8 |
- uuid.clock_seq >> 8, uuid.clock_seq & 0xFF,
|
|
 |
472dcb8 |
- uuid.node[0], uuid.node[1], uuid.node[2],
|
|
 |
472dcb8 |
- uuid.node[3], uuid.node[4], uuid.node[5]);
|
|
 |
472dcb8 |
-}
|
|
 |
472dcb8 |
-
|
|
 |
472dcb8 |
-void uuid_unparse_lower(const uuid_t uu, char *out)
|
|
 |
472dcb8 |
-{
|
|
 |
472dcb8 |
- uuid_unparse_x(uu, out, fmt_lower);
|
|
 |
472dcb8 |
-}
|
|
 |
472dcb8 |
-
|
|
 |
472dcb8 |
-void uuid_unparse_upper(const uuid_t uu, char *out)
|
|
 |
472dcb8 |
-{
|
|
 |
472dcb8 |
- uuid_unparse_x(uu, out, fmt_upper);
|
|
 |
472dcb8 |
-}
|
|
 |
472dcb8 |
-
|
|
 |
472dcb8 |
-void uuid_unparse(const uuid_t uu, char *out)
|
|
 |
472dcb8 |
-{
|
|
 |
472dcb8 |
- uuid_unparse_x(uu, out, FMT_DEFAULT);
|
|
 |
472dcb8 |
-}
|
|
 |
472dcb8 |
diff --git a/src/uuid/uuid.h b/src/uuid/uuid.h
|
|
 |
472dcb8 |
deleted file mode 100644
|
|
 |
472dcb8 |
index 874d65a..0000000
|
|
 |
472dcb8 |
--- a/src/uuid/uuid.h
|
|
 |
472dcb8 |
+++ /dev/null
|
|
 |
472dcb8 |
@@ -1,104 +0,0 @@
|
|
 |
472dcb8 |
-/*
|
|
 |
472dcb8 |
- * Public include file for the UUID library
|
|
 |
472dcb8 |
- *
|
|
 |
472dcb8 |
- * Copyright (C) 1996, 1997, 1998 Theodore Ts'o.
|
|
 |
472dcb8 |
- *
|
|
 |
472dcb8 |
- * %Begin-Header%
|
|
 |
472dcb8 |
- * Redistribution and use in source and binary forms, with or without
|
|
 |
472dcb8 |
- * modification, are permitted provided that the following conditions
|
|
 |
472dcb8 |
- * are met:
|
|
 |
472dcb8 |
- * 1. Redistributions of source code must retain the above copyright
|
|
 |
472dcb8 |
- * notice, and the entire permission notice in its entirety,
|
|
 |
472dcb8 |
- * including the disclaimer of warranties.
|
|
 |
472dcb8 |
- * 2. Redistributions in binary form must reproduce the above copyright
|
|
 |
472dcb8 |
- * notice, this list of conditions and the following disclaimer in the
|
|
 |
472dcb8 |
- * documentation and/or other materials provided with the distribution.
|
|
 |
472dcb8 |
- * 3. The name of the author may not be used to endorse or promote
|
|
 |
472dcb8 |
- * products derived from this software without specific prior
|
|
 |
472dcb8 |
- * written permission.
|
|
 |
472dcb8 |
- *
|
|
 |
472dcb8 |
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
|
 |
472dcb8 |
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
|
 |
472dcb8 |
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ALL OF
|
|
 |
472dcb8 |
- * WHICH ARE HEREBY DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE
|
|
 |
472dcb8 |
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
|
 |
472dcb8 |
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
|
|
 |
472dcb8 |
- * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
|
|
 |
472dcb8 |
- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
|
 |
472dcb8 |
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
 |
472dcb8 |
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
|
|
 |
472dcb8 |
- * USE OF THIS SOFTWARE, EVEN IF NOT ADVISED OF THE POSSIBILITY OF SUCH
|
|
 |
472dcb8 |
- * DAMAGE.
|
|
 |
472dcb8 |
- * %End-Header%
|
|
 |
472dcb8 |
- */
|
|
 |
472dcb8 |
-
|
|
 |
472dcb8 |
-#ifndef _UUID_UUID_H
|
|
 |
472dcb8 |
-#define _UUID_UUID_H
|
|
 |
472dcb8 |
-
|
|
 |
472dcb8 |
-#include <sys/types.h>
|
|
 |
472dcb8 |
-#ifndef _WIN32
|
|
 |
472dcb8 |
-#include <sys/time.h>
|
|
 |
472dcb8 |
-#endif
|
|
 |
472dcb8 |
-#include <time.h>
|
|
 |
472dcb8 |
-
|
|
 |
472dcb8 |
-typedef unsigned char uuid_t[16];
|
|
 |
472dcb8 |
-
|
|
 |
472dcb8 |
-/* UUID Variant definitions */
|
|
 |
472dcb8 |
-#define UUID_VARIANT_NCS 0
|
|
 |
472dcb8 |
-#define UUID_VARIANT_DCE 1
|
|
 |
472dcb8 |
-#define UUID_VARIANT_MICROSOFT 2
|
|
 |
472dcb8 |
-#define UUID_VARIANT_OTHER 3
|
|
 |
472dcb8 |
-
|
|
 |
472dcb8 |
-/* UUID Type definitions */
|
|
 |
472dcb8 |
-#define UUID_TYPE_DCE_TIME 1
|
|
 |
472dcb8 |
-#define UUID_TYPE_DCE_RANDOM 4
|
|
 |
472dcb8 |
-
|
|
 |
472dcb8 |
-/* Allow UUID constants to be defined */
|
|
 |
472dcb8 |
-#ifdef __GNUC__
|
|
 |
472dcb8 |
-#define UUID_DEFINE(name,u0,u1,u2,u3,u4,u5,u6,u7,u8,u9,u10,u11,u12,u13,u14,u15) \
|
|
 |
472dcb8 |
- static const uuid_t name __attribute__ ((unused)) = {u0,u1,u2,u3,u4,u5,u6,u7,u8,u9,u10,u11,u12,u13,u14,u15}
|
|
 |
472dcb8 |
-#else
|
|
 |
472dcb8 |
-#define UUID_DEFINE(name,u0,u1,u2,u3,u4,u5,u6,u7,u8,u9,u10,u11,u12,u13,u14,u15) \
|
|
 |
472dcb8 |
- static const uuid_t name = {u0,u1,u2,u3,u4,u5,u6,u7,u8,u9,u10,u11,u12,u13,u14,u15}
|
|
 |
472dcb8 |
-#endif
|
|
 |
472dcb8 |
-
|
|
 |
472dcb8 |
-#ifdef __cplusplus
|
|
 |
472dcb8 |
-extern "C" {
|
|
 |
472dcb8 |
-#endif
|
|
 |
472dcb8 |
-
|
|
 |
472dcb8 |
-/* clear.c */
|
|
 |
472dcb8 |
-void uuid_clear(uuid_t uu);
|
|
 |
472dcb8 |
-
|
|
 |
472dcb8 |
-/* compare.c */
|
|
 |
472dcb8 |
-int uuid_compare(const uuid_t uu1, const uuid_t uu2);
|
|
 |
472dcb8 |
-
|
|
 |
472dcb8 |
-/* copy.c */
|
|
 |
472dcb8 |
-void uuid_copy(uuid_t dst, const uuid_t src);
|
|
 |
472dcb8 |
-
|
|
 |
472dcb8 |
-/* gen_uuid.c */
|
|
 |
472dcb8 |
-void uuid_generate(uuid_t out);
|
|
 |
472dcb8 |
-void uuid_generate_random(uuid_t out);
|
|
 |
472dcb8 |
-void uuid_generate_time(uuid_t out);
|
|
 |
472dcb8 |
-int uuid_generate_time_safe(uuid_t out);
|
|
 |
472dcb8 |
-
|
|
 |
472dcb8 |
-/* isnull.c */
|
|
 |
472dcb8 |
-int uuid_is_null(const uuid_t uu);
|
|
 |
472dcb8 |
-
|
|
 |
472dcb8 |
-/* parse.c */
|
|
 |
472dcb8 |
-int uuid_parse(const char *in, uuid_t uu);
|
|
 |
472dcb8 |
-
|
|
 |
472dcb8 |
-/* unparse.c */
|
|
 |
472dcb8 |
-void uuid_unparse(const uuid_t uu, char *out);
|
|
 |
472dcb8 |
-void uuid_unparse_lower(const uuid_t uu, char *out);
|
|
 |
472dcb8 |
-void uuid_unparse_upper(const uuid_t uu, char *out);
|
|
 |
472dcb8 |
-
|
|
 |
472dcb8 |
-/* uuid_time.c */
|
|
 |
472dcb8 |
-time_t uuid_time(const uuid_t uu, struct timeval *ret_tv);
|
|
 |
472dcb8 |
-int uuid_type(const uuid_t uu);
|
|
 |
472dcb8 |
-int uuid_variant(const uuid_t uu);
|
|
 |
472dcb8 |
-
|
|
 |
472dcb8 |
-#ifdef __cplusplus
|
|
 |
472dcb8 |
-}
|
|
 |
472dcb8 |
-#endif
|
|
 |
472dcb8 |
-
|
|
 |
472dcb8 |
-#endif /* _UUID_UUID_H */
|
|
 |
472dcb8 |
diff --git a/src/uuid/uuidP.h b/src/uuid/uuidP.h
|
|
 |
472dcb8 |
deleted file mode 100644
|
|
 |
472dcb8 |
index 604d8bf..0000000
|
|
 |
472dcb8 |
--- a/src/uuid/uuidP.h
|
|
 |
472dcb8 |
+++ /dev/null
|
|
 |
472dcb8 |
@@ -1,63 +0,0 @@
|
|
 |
472dcb8 |
-/*
|
|
 |
472dcb8 |
- * uuid.h -- private header file for uuids
|
|
 |
472dcb8 |
- *
|
|
 |
472dcb8 |
- * Copyright (C) 1996, 1997 Theodore Ts'o.
|
|
 |
472dcb8 |
- *
|
|
 |
472dcb8 |
- * %Begin-Header%
|
|
 |
472dcb8 |
- * Redistribution and use in source and binary forms, with or without
|
|
 |
472dcb8 |
- * modification, are permitted provided that the following conditions
|
|
 |
472dcb8 |
- * are met:
|
|
 |
472dcb8 |
- * 1. Redistributions of source code must retain the above copyright
|
|
 |
472dcb8 |
- * notice, and the entire permission notice in its entirety,
|
|
 |
472dcb8 |
- * including the disclaimer of warranties.
|
|
 |
472dcb8 |
- * 2. Redistributions in binary form must reproduce the above copyright
|
|
 |
472dcb8 |
- * notice, this list of conditions and the following disclaimer in the
|
|
 |
472dcb8 |
- * documentation and/or other materials provided with the distribution.
|
|
 |
472dcb8 |
- * 3. The name of the author may not be used to endorse or promote
|
|
 |
472dcb8 |
- * products derived from this software without specific prior
|
|
 |
472dcb8 |
- * written permission.
|
|
 |
472dcb8 |
- *
|
|
 |
472dcb8 |
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
|
 |
472dcb8 |
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
|
 |
472dcb8 |
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ALL OF
|
|
 |
472dcb8 |
- * WHICH ARE HEREBY DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE
|
|
 |
472dcb8 |
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
|
 |
472dcb8 |
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
|
|
 |
472dcb8 |
- * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
|
|
 |
472dcb8 |
- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
|
 |
472dcb8 |
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
 |
472dcb8 |
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
|
|
 |
472dcb8 |
- * USE OF THIS SOFTWARE, EVEN IF NOT ADVISED OF THE POSSIBILITY OF SUCH
|
|
 |
472dcb8 |
- * DAMAGE.
|
|
 |
472dcb8 |
- * %End-Header%
|
|
 |
472dcb8 |
- */
|
|
 |
472dcb8 |
-
|
|
 |
472dcb8 |
-#include <inttypes.h>
|
|
 |
472dcb8 |
-#include <sys/types.h>
|
|
 |
472dcb8 |
-
|
|
 |
472dcb8 |
-#include "config.h"
|
|
 |
472dcb8 |
-
|
|
 |
472dcb8 |
-#include "uuid.h"
|
|
 |
472dcb8 |
-
|
|
 |
472dcb8 |
-#define LIBUUID_CLOCK_FILE "/var/lib/libuuid/clock.txt"
|
|
 |
472dcb8 |
-
|
|
 |
472dcb8 |
-/*
|
|
 |
472dcb8 |
- * Offset between 15-Oct-1582 and 1-Jan-70
|
|
 |
472dcb8 |
- */
|
|
 |
472dcb8 |
-#define TIME_OFFSET_HIGH 0x01B21DD2
|
|
 |
472dcb8 |
-#define TIME_OFFSET_LOW 0x13814000
|
|
 |
472dcb8 |
-
|
|
 |
472dcb8 |
-struct uuid {
|
|
 |
472dcb8 |
- uint32_t time_low;
|
|
 |
472dcb8 |
- uint16_t time_mid;
|
|
 |
472dcb8 |
- uint16_t time_hi_and_version;
|
|
 |
472dcb8 |
- uint16_t clock_seq;
|
|
 |
472dcb8 |
- uint8_t node[6];
|
|
 |
472dcb8 |
-};
|
|
 |
472dcb8 |
-
|
|
 |
472dcb8 |
-
|
|
 |
472dcb8 |
-/*
|
|
 |
472dcb8 |
- * prototypes
|
|
 |
472dcb8 |
- */
|
|
 |
472dcb8 |
-void uuid_pack(const struct uuid *uu, uuid_t ptr);
|
|
 |
472dcb8 |
-void uuid_unpack(const uuid_t in, struct uuid *uu);
|
|
 |
472dcb8 |
diff --git a/src/uuid/uuidd.h b/src/uuid/uuidd.h
|
|
 |
472dcb8 |
deleted file mode 100644
|
|
 |
472dcb8 |
index 2f70968..0000000
|
|
 |
472dcb8 |
--- a/src/uuid/uuidd.h
|
|
 |
472dcb8 |
+++ /dev/null
|
|
 |
472dcb8 |
@@ -1,54 +0,0 @@
|
|
 |
472dcb8 |
-/*
|
|
 |
472dcb8 |
- * Definitions used by the uuidd daemon
|
|
 |
472dcb8 |
- *
|
|
 |
472dcb8 |
- * Copyright (C) 2007 Theodore Ts'o.
|
|
 |
472dcb8 |
- *
|
|
 |
472dcb8 |
- * %Begin-Header%
|
|
 |
472dcb8 |
- * Redistribution and use in source and binary forms, with or without
|
|
 |
472dcb8 |
- * modification, are permitted provided that the following conditions
|
|
 |
472dcb8 |
- * are met:
|
|
 |
472dcb8 |
- * 1. Redistributions of source code must retain the above copyright
|
|
 |
472dcb8 |
- * notice, and the entire permission notice in its entirety,
|
|
 |
472dcb8 |
- * including the disclaimer of warranties.
|
|
 |
472dcb8 |
- * 2. Redistributions in binary form must reproduce the above copyright
|
|
 |
472dcb8 |
- * notice, this list of conditions and the following disclaimer in the
|
|
 |
472dcb8 |
- * documentation and/or other materials provided with the distribution.
|
|
 |
472dcb8 |
- * 3. The name of the author may not be used to endorse or promote
|
|
 |
472dcb8 |
- * products derived from this software without specific prior
|
|
 |
472dcb8 |
- * written permission.
|
|
 |
472dcb8 |
- *
|
|
 |
472dcb8 |
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
|
 |
472dcb8 |
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
|
 |
472dcb8 |
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ALL OF
|
|
 |
472dcb8 |
- * WHICH ARE HEREBY DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE
|
|
 |
472dcb8 |
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
|
 |
472dcb8 |
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
|
|
 |
472dcb8 |
- * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
|
|
 |
472dcb8 |
- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
|
 |
472dcb8 |
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
 |
472dcb8 |
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
|
|
 |
472dcb8 |
- * USE OF THIS SOFTWARE, EVEN IF NOT ADVISED OF THE POSSIBILITY OF SUCH
|
|
 |
472dcb8 |
- * DAMAGE.
|
|
 |
472dcb8 |
- * %End-Header%
|
|
 |
472dcb8 |
- */
|
|
 |
472dcb8 |
-
|
|
 |
472dcb8 |
-#ifndef _UUID_UUIDD_H
|
|
 |
472dcb8 |
-#define _UUID_UUIDD_H
|
|
 |
472dcb8 |
-
|
|
 |
472dcb8 |
-#define UUIDD_DIR _PATH_LOCALSTATEDIR "/uuidd"
|
|
 |
472dcb8 |
-#define UUIDD_SOCKET_PATH UUIDD_DIR "/request"
|
|
 |
472dcb8 |
-#define UUIDD_PIDFILE_PATH UUIDD_DIR "/uuidd.pid"
|
|
 |
472dcb8 |
-#define UUIDD_PATH "/usr/sbin/uuidd"
|
|
 |
472dcb8 |
-
|
|
 |
472dcb8 |
-#define UUIDD_OP_GETPID 0
|
|
 |
472dcb8 |
-#define UUIDD_OP_GET_MAXOP 1
|
|
 |
472dcb8 |
-#define UUIDD_OP_TIME_UUID 2
|
|
 |
472dcb8 |
-#define UUIDD_OP_RANDOM_UUID 3
|
|
 |
472dcb8 |
-#define UUIDD_OP_BULK_TIME_UUID 4
|
|
 |
472dcb8 |
-#define UUIDD_OP_BULK_RANDOM_UUID 5
|
|
 |
472dcb8 |
-#define UUIDD_MAX_OP UUIDD_OP_BULK_RANDOM_UUID
|
|
 |
472dcb8 |
-
|
|
 |
472dcb8 |
-extern int __uuid_generate_time(uuid_t out, int *num);
|
|
 |
472dcb8 |
-extern void __uuid_generate_random(uuid_t out, int *num);
|
|
 |
472dcb8 |
-
|
|
 |
472dcb8 |
-#endif /* _UUID_UUID_H */
|
|
 |
472dcb8 |
diff --git a/src/uuid/win32/config.h b/src/uuid/win32/config.h
|
|
 |
472dcb8 |
deleted file mode 100644
|
|
 |
472dcb8 |
index ffb2aba..0000000
|
|
 |
472dcb8 |
--- a/src/uuid/win32/config.h
|
|
 |
472dcb8 |
+++ /dev/null
|
|
 |
472dcb8 |
@@ -1,84 +0,0 @@
|
|
 |
472dcb8 |
-/* src/config.h. Generated from config.h.in by configure. */
|
|
 |
472dcb8 |
-/* src/config.h.in. Generated from configure.ac by autoheader. */
|
|
 |
472dcb8 |
-/* -- reflects MinGW + Win32 -- */
|
|
 |
472dcb8 |
-
|
|
 |
472dcb8 |
-/* Define to 1 if you have the <inttypes.h> header file. */
|
|
 |
472dcb8 |
-#define HAVE_INTTYPES_H 1
|
|
 |
472dcb8 |
-
|
|
 |
472dcb8 |
-/* Define to 1 if you have the `jrand48' function. */
|
|
 |
472dcb8 |
-/* #undef HAVE_JRAND48 */
|
|
 |
472dcb8 |
-
|
|
 |
472dcb8 |
-/* Define to 1 if you have the <memory.h> header file. */
|
|
 |
472dcb8 |
-#define HAVE_MEMORY_H 1
|
|
 |
472dcb8 |
-
|
|
 |
472dcb8 |
-/* Define to 1 if you have the <netinet/in.h> header file. */
|
|
 |
472dcb8 |
-/* #undef HAVE_NETINET_IN_H */
|
|
 |
472dcb8 |
-
|
|
 |
472dcb8 |
-/* Define to 1 if you have the <net/if_dl.h> header file. */
|
|
 |
472dcb8 |
-/* #undef HAVE_NET_IF_DL_H */
|
|
 |
472dcb8 |
-
|
|
 |
472dcb8 |
-/* Define to 1 if you have the <net/if.h> header file. */
|
|
 |
472dcb8 |
-/* #undef HAVE_NET_IF_H */
|
|
 |
472dcb8 |
-
|
|
 |
472dcb8 |
-/* Define if struct sockaddr contains sa_len */
|
|
 |
472dcb8 |
-/* #undef HAVE_SA_LEN */
|
|
 |
472dcb8 |
-
|
|
 |
472dcb8 |
-/* Define to 1 if you have the <stdint.h> header file. */
|
|
 |
472dcb8 |
-#define HAVE_STDINT_H 1
|
|
 |
472dcb8 |
-
|
|
 |
472dcb8 |
-/* Define to 1 if you have the <stdlib.h> header file. */
|
|
 |
472dcb8 |
-#define HAVE_STDLIB_H 1
|
|
 |
472dcb8 |
-
|
|
 |
472dcb8 |
-/* Define to 1 if you have the <strings.h> header file. */
|
|
 |
472dcb8 |
-#define HAVE_STRINGS_H 1
|
|
 |
472dcb8 |
-
|
|
 |
472dcb8 |
-/* Define to 1 if you have the <string.h> header file. */
|
|
 |
472dcb8 |
-#define HAVE_STRING_H 1
|
|
 |
472dcb8 |
-
|
|
 |
472dcb8 |
-/* Define to 1 if you have the <sys/file.h> header file. */
|
|
 |
472dcb8 |
-#define HAVE_SYS_FILE_H 1
|
|
 |
472dcb8 |
-
|
|
 |
472dcb8 |
-/* Define to 1 if you have the <sys/ioctl.h> header file. */
|
|
 |
472dcb8 |
-/* #undef HAVE_SYS_IOCTL_H */
|
|
 |
472dcb8 |
-
|
|
 |
472dcb8 |
-/* Define to 1 if you have the <sys/socket.h> header file. */
|
|
 |
472dcb8 |
-/* #undef HAVE_SYS_SOCKET_H */
|
|
 |
472dcb8 |
-
|
|
 |
472dcb8 |
-/* Define to 1 if you have the <sys/sockio.h> header file. */
|
|
 |
472dcb8 |
-/* #undef HAVE_SYS_SOCKIO_H */
|
|
 |
472dcb8 |
-
|
|
 |
472dcb8 |
-/* Define to 1 if you have the <sys/stat.h> header file. */
|
|
 |
472dcb8 |
-#define HAVE_SYS_STAT_H 1
|
|
 |
472dcb8 |
-
|
|
 |
472dcb8 |
-/* Define to 1 if you have the <sys/syscall.h> header file. */
|
|
 |
472dcb8 |
-/* #undef HAVE_SYS_SYSCALL_H */
|
|
 |
472dcb8 |
-
|
|
 |
472dcb8 |
-/* Define to 1 if you have the <sys/time.h> header file. */
|
|
 |
472dcb8 |
-#define HAVE_SYS_TIME_H 1
|
|
 |
472dcb8 |
-
|
|
 |
472dcb8 |
-/* Define to 1 if you have the <sys/types.h> header file. */
|
|
 |
472dcb8 |
-#define HAVE_SYS_TYPES_H 1
|
|
 |
472dcb8 |
-
|
|
 |
472dcb8 |
-/* Define to 1 if you have the <sys/un.h> header file. */
|
|
 |
472dcb8 |
-/* #undef HAVE_SYS_UN_H */
|
|
 |
472dcb8 |
-
|
|
 |
472dcb8 |
-/* Define to 1 if you have the <unistd.h> header file. */
|
|
 |
472dcb8 |
-#define HAVE_UNISTD_H 1
|
|
 |
472dcb8 |
-
|
|
 |
472dcb8 |
-/* Define to the address where bug reports for this package should be sent. */
|
|
 |
472dcb8 |
-#define PACKAGE_BUGREPORT "Simon.Urbanek@r-project.org"
|
|
 |
472dcb8 |
-
|
|
 |
472dcb8 |
-/* Define to the full name of this package. */
|
|
 |
472dcb8 |
-#define PACKAGE_NAME "uuid"
|
|
 |
472dcb8 |
-
|
|
 |
472dcb8 |
-/* Define to the full name and version of this package. */
|
|
 |
472dcb8 |
-#define PACKAGE_STRING "uuid 0.1"
|
|
 |
472dcb8 |
-
|
|
 |
472dcb8 |
-/* Define to the one symbol short name of this package. */
|
|
 |
472dcb8 |
-#define PACKAGE_TARNAME "uuid"
|
|
 |
472dcb8 |
-
|
|
 |
472dcb8 |
-/* Define to the version of this package. */
|
|
 |
472dcb8 |
-#define PACKAGE_VERSION "0.1"
|
|
 |
472dcb8 |
-
|
|
 |
472dcb8 |
-/* Define to 1 if you have the ANSI C header files. */
|
|
 |
472dcb8 |
-#define STDC_HEADERS 1
|
|
 |
472dcb8 |
--
|
|
 |
472dcb8 |
2.17.1
|
|
 |
472dcb8 |
|