uos-x64上编译lbuuid
This commit is contained in:
parent
9a96ebdaf5
commit
27264b493a
|
@ -15,7 +15,11 @@
|
||||||
<Option createStaticLib="1" />
|
<Option createStaticLib="1" />
|
||||||
<Compiler>
|
<Compiler>
|
||||||
<Add option="-g" />
|
<Add option="-g" />
|
||||||
|
<Add directory="../../../third_party/libuuid/uos/amd64/include" />
|
||||||
</Compiler>
|
</Compiler>
|
||||||
|
<Linker>
|
||||||
|
<Add option="-L../../../third_party/libuuid/uos/amd64/lib -luuid" />
|
||||||
|
</Linker>
|
||||||
</Target>
|
</Target>
|
||||||
<Target title="uos_x86_64_Release">
|
<Target title="uos_x86_64_Release">
|
||||||
<Option output="../../../../release/uos/x86_64/HGBase" prefix_auto="1" extension_auto="1" />
|
<Option output="../../../../release/uos/x86_64/HGBase" prefix_auto="1" extension_auto="1" />
|
||||||
|
@ -26,6 +30,7 @@
|
||||||
<Option createStaticLib="1" />
|
<Option createStaticLib="1" />
|
||||||
<Compiler>
|
<Compiler>
|
||||||
<Add option="-O2" />
|
<Add option="-O2" />
|
||||||
|
<Add directory="../../../third_party/libuuid/uos/amd64/include" />
|
||||||
</Compiler>
|
</Compiler>
|
||||||
<Linker>
|
<Linker>
|
||||||
<Add option="-s" />
|
<Add option="-s" />
|
||||||
|
@ -90,7 +95,6 @@
|
||||||
</Compiler>
|
</Compiler>
|
||||||
<Linker>
|
<Linker>
|
||||||
<Add option="-lpthread" />
|
<Add option="-lpthread" />
|
||||||
<Add option="-luuid" />
|
|
||||||
<Add option="-ldl" />
|
<Add option="-ldl" />
|
||||||
<Add option="-z defs" />
|
<Add option="-z defs" />
|
||||||
<Add option="-B direct" />
|
<Add option="-B direct" />
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
#include <shlobj.h>
|
#include <shlobj.h>
|
||||||
#include <atlstr.h>
|
#include <atlstr.h>
|
||||||
#else
|
#else
|
||||||
#include <uuid/uuid.h>
|
#include "uuid/uuid.h"
|
||||||
#endif
|
#endif
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
@ -18,7 +18,7 @@ HGResult HGAPI HGBase_GetTmpPath(HGChar* path, HGUInt maxLen)
|
||||||
|
|
||||||
#if !defined(HG_CMP_MSC)
|
#if !defined(HG_CMP_MSC)
|
||||||
char tmpPath[512] = {0};
|
char tmpPath[512] = {0};
|
||||||
strcpy(tmpPath, "/tmp/");
|
strcpy(tmpPath, "/tmp/");
|
||||||
#else
|
#else
|
||||||
CHAR tmpPath[MAX_PATH] = { 0 };
|
CHAR tmpPath[MAX_PATH] = { 0 };
|
||||||
DWORD len = GetTempPathA(MAX_PATH, tmpPath);
|
DWORD len = GetTempPathA(MAX_PATH, tmpPath);
|
||||||
|
|
|
@ -0,0 +1,104 @@
|
||||||
|
/*
|
||||||
|
* Public include file for the UUID library
|
||||||
|
*
|
||||||
|
* Copyright (C) 1996, 1997, 1998 Theodore Ts'o.
|
||||||
|
*
|
||||||
|
* %Begin-Header%
|
||||||
|
* Redistribution and use in source and binary forms, with or without
|
||||||
|
* modification, are permitted provided that the following conditions
|
||||||
|
* are met:
|
||||||
|
* 1. Redistributions of source code must retain the above copyright
|
||||||
|
* notice, and the entire permission notice in its entirety,
|
||||||
|
* including the disclaimer of warranties.
|
||||||
|
* 2. Redistributions in binary form must reproduce the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer in the
|
||||||
|
* documentation and/or other materials provided with the distribution.
|
||||||
|
* 3. The name of the author may not be used to endorse or promote
|
||||||
|
* products derived from this software without specific prior
|
||||||
|
* written permission.
|
||||||
|
*
|
||||||
|
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||||
|
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||||
|
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ALL OF
|
||||||
|
* WHICH ARE HEREBY DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE
|
||||||
|
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||||
|
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
|
||||||
|
* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
|
||||||
|
* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||||
|
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||||
|
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
|
||||||
|
* USE OF THIS SOFTWARE, EVEN IF NOT ADVISED OF THE POSSIBILITY OF SUCH
|
||||||
|
* DAMAGE.
|
||||||
|
* %End-Header%
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef _UUID_UUID_H
|
||||||
|
#define _UUID_UUID_H
|
||||||
|
|
||||||
|
#include <sys/types.h>
|
||||||
|
#ifndef _WIN32
|
||||||
|
#include <sys/time.h>
|
||||||
|
#endif
|
||||||
|
#include <time.h>
|
||||||
|
|
||||||
|
typedef unsigned char uuid_t[16];
|
||||||
|
|
||||||
|
/* UUID Variant definitions */
|
||||||
|
#define UUID_VARIANT_NCS 0
|
||||||
|
#define UUID_VARIANT_DCE 1
|
||||||
|
#define UUID_VARIANT_MICROSOFT 2
|
||||||
|
#define UUID_VARIANT_OTHER 3
|
||||||
|
|
||||||
|
/* UUID Type definitions */
|
||||||
|
#define UUID_TYPE_DCE_TIME 1
|
||||||
|
#define UUID_TYPE_DCE_RANDOM 4
|
||||||
|
|
||||||
|
/* Allow UUID constants to be defined */
|
||||||
|
#ifdef __GNUC__
|
||||||
|
#define UUID_DEFINE(name,u0,u1,u2,u3,u4,u5,u6,u7,u8,u9,u10,u11,u12,u13,u14,u15) \
|
||||||
|
static const uuid_t name __attribute__ ((unused)) = {u0,u1,u2,u3,u4,u5,u6,u7,u8,u9,u10,u11,u12,u13,u14,u15}
|
||||||
|
#else
|
||||||
|
#define UUID_DEFINE(name,u0,u1,u2,u3,u4,u5,u6,u7,u8,u9,u10,u11,u12,u13,u14,u15) \
|
||||||
|
static const uuid_t name = {u0,u1,u2,u3,u4,u5,u6,u7,u8,u9,u10,u11,u12,u13,u14,u15}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* clear.c */
|
||||||
|
void uuid_clear(uuid_t uu);
|
||||||
|
|
||||||
|
/* compare.c */
|
||||||
|
int uuid_compare(const uuid_t uu1, const uuid_t uu2);
|
||||||
|
|
||||||
|
/* copy.c */
|
||||||
|
void uuid_copy(uuid_t dst, const uuid_t src);
|
||||||
|
|
||||||
|
/* gen_uuid.c */
|
||||||
|
void uuid_generate(uuid_t out);
|
||||||
|
void uuid_generate_random(uuid_t out);
|
||||||
|
void uuid_generate_time(uuid_t out);
|
||||||
|
int uuid_generate_time_safe(uuid_t out);
|
||||||
|
|
||||||
|
/* isnull.c */
|
||||||
|
int uuid_is_null(const uuid_t uu);
|
||||||
|
|
||||||
|
/* parse.c */
|
||||||
|
int uuid_parse(const char *in, uuid_t uu);
|
||||||
|
|
||||||
|
/* unparse.c */
|
||||||
|
void uuid_unparse(const uuid_t uu, char *out);
|
||||||
|
void uuid_unparse_lower(const uuid_t uu, char *out);
|
||||||
|
void uuid_unparse_upper(const uuid_t uu, char *out);
|
||||||
|
|
||||||
|
/* uuid_time.c */
|
||||||
|
time_t uuid_time(const uuid_t uu, struct timeval *ret_tv);
|
||||||
|
int uuid_type(const uuid_t uu);
|
||||||
|
int uuid_variant(const uuid_t uu);
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* _UUID_UUID_H */
|
Binary file not shown.
|
@ -0,0 +1,41 @@
|
||||||
|
# libuuid.la - a libtool library file
|
||||||
|
# Generated by libtool (GNU libtool) 2.4.2
|
||||||
|
#
|
||||||
|
# Please DO NOT delete this file!
|
||||||
|
# It is necessary for linking the library.
|
||||||
|
|
||||||
|
# The name that we can dlopen(3).
|
||||||
|
dlname=''
|
||||||
|
|
||||||
|
# Names of this library.
|
||||||
|
library_names=''
|
||||||
|
|
||||||
|
# The name of the static archive.
|
||||||
|
old_library='libuuid.a'
|
||||||
|
|
||||||
|
# Linker flags that can not go in dependency_libs.
|
||||||
|
inherited_linker_flags=''
|
||||||
|
|
||||||
|
# Libraries that this one depends upon.
|
||||||
|
dependency_libs=''
|
||||||
|
|
||||||
|
# Names of additional weak libraries provided by this library
|
||||||
|
weak_library_names=''
|
||||||
|
|
||||||
|
# Version information for libuuid.
|
||||||
|
current=1
|
||||||
|
age=0
|
||||||
|
revision=0
|
||||||
|
|
||||||
|
# Is this an already installed library?
|
||||||
|
installed=yes
|
||||||
|
|
||||||
|
# Should we warn about portability when linking against -modules?
|
||||||
|
shouldnotlink=no
|
||||||
|
|
||||||
|
# Files to dlopen/dlpreopen
|
||||||
|
dlopen=''
|
||||||
|
dlpreopen=''
|
||||||
|
|
||||||
|
# Directory that this library needs to be installed in:
|
||||||
|
libdir='/data/home/luoliangyi/code_app/third_party/libuuid/uos/amd64/libuuid-1.0.3/release/lib'
|
|
@ -0,0 +1,11 @@
|
||||||
|
prefix=/data/home/luoliangyi/code_app/third_party/libuuid/uos/amd64/libuuid-1.0.3/release
|
||||||
|
exec_prefix=${prefix}
|
||||||
|
libdir=${exec_prefix}/lib
|
||||||
|
includedir=${prefix}/include
|
||||||
|
|
||||||
|
Name: uuid
|
||||||
|
Description: Universally unique id library
|
||||||
|
Version: 1.0.3
|
||||||
|
Requires:
|
||||||
|
Cflags: -I${includedir}/uuid
|
||||||
|
Libs: -L${libdir} -luuid
|
Loading…
Reference in New Issue