зеркало из https://github.com/mozilla/gecko-dev.git
bug 711079 - move OTS from libxul to gkmedias.dll on Windows. r=khuey
This commit is contained in:
Родитель
e474281a63
Коммит
5f4ffe886f
|
@ -5,6 +5,26 @@
|
|||
#ifndef OPENTYPE_SANITISER_H_
|
||||
#define OPENTYPE_SANITISER_H_
|
||||
|
||||
#if defined(_WIN32) || defined(__CYGWIN__)
|
||||
#define OTS_DLL_IMPORT __declspec(dllimport)
|
||||
#define OTS_DLL_EXPORT __declspec(dllexport)
|
||||
#else
|
||||
#if __GNUC__ >= 4
|
||||
#define OTS_DLL_IMPORT __attribute__((visibility ("default")))
|
||||
#define OTS_DLL_EXPORT __attribute__((visibility ("default")))
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef OTS_DLL
|
||||
#ifdef OTS_DLL_EXPORTS
|
||||
#define OTS_API OTS_DLL_EXPORT
|
||||
#else
|
||||
#define OTS_API OTS_DLL_IMPORT
|
||||
#endif
|
||||
#else
|
||||
#define OTS_API
|
||||
#endif
|
||||
|
||||
#if defined(_WIN32)
|
||||
typedef signed char int8_t;
|
||||
typedef unsigned char uint8_t;
|
||||
|
@ -183,8 +203,8 @@ class OTSStream {
|
|||
// length: the size, in bytes, of |input|
|
||||
// preserve_graphite_tables: whether to preserve Graphite Layout tables
|
||||
// -----------------------------------------------------------------------------
|
||||
bool Process(OTSStream *output, const uint8_t *input, size_t length,
|
||||
bool preserve_graphite_tables = false);
|
||||
bool OTS_API Process(OTSStream *output, const uint8_t *input, size_t length,
|
||||
bool preserve_graphite_tables = false);
|
||||
|
||||
// Force to disable debug output even when the library is compiled with
|
||||
// -DOTS_DEBUG.
|
||||
|
|
|
@ -34,7 +34,13 @@ include $(DEPTH)/config/autoconf.mk
|
|||
|
||||
MODULE = ots
|
||||
LIBRARY_NAME = mozots
|
||||
FORCE_STATIC_LIB = 1
|
||||
|
||||
ifeq (WINNT,$(OS_TARGET))
|
||||
VISIBILITY_FLAGS =
|
||||
else
|
||||
LIBXUL_LIBRARY = 1
|
||||
endif
|
||||
|
||||
CSRCS = \
|
||||
$(NULL)
|
||||
|
@ -77,17 +83,18 @@ EXPORTS = \
|
|||
../include/ots-memory-stream.h \
|
||||
$(NULL)
|
||||
|
||||
LOCAL_INCLUDES += -I$(srcdir)
|
||||
|
||||
FORCE_STATIC_LIB = 1
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
DEFINES += -DPACKAGE_VERSION="\"moz\""
|
||||
DEFINES += -DPACKAGE_BUGREPORT="\"http://bugzilla.mozilla.org/\""
|
||||
DEFINES += -DNOMINMAX
|
||||
|
||||
ifeq (WINNT,$(OS_TARGET))
|
||||
DEFINES += -DOTS_DLL -DOTS_DLL_EXPORTS
|
||||
endif
|
||||
|
||||
# Suppress ANSI strict warnings
|
||||
# because Googlers don't care about comma-at-end-of-enumerator errors.
|
||||
CXXFLAGS := $(filter-out -pedantic,$(CXXFLAGS))
|
||||
CFLAGS := $(filter-out -pedantic,$(CFLAGS))
|
||||
|
||||
|
|
|
@ -379,6 +379,10 @@ CSRCS += woff.c
|
|||
|
||||
DEFINES += -DIMPL_THEBES -DWOFF_MOZILLA_CLIENT
|
||||
|
||||
ifeq (WINNT,$(OS_TARGET))
|
||||
DEFINES += -DOTS_DLL
|
||||
endif
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
include $(topsrcdir)/ipc/chromium/chromium-config.mk
|
||||
|
||||
|
|
|
@ -49,7 +49,7 @@ ifeq (WINNT,$(OS_TARGET))
|
|||
FORCE_SHARED_LIB = 1
|
||||
endif
|
||||
|
||||
SHARED_LIBRARY_LIBS =
|
||||
SHARED_LIBRARY_LIBS = $(MOZ_OTS_LIBS)
|
||||
|
||||
ifdef MOZ_VORBIS
|
||||
SHARED_LIBRARY_LIBS += \
|
||||
|
@ -93,6 +93,13 @@ SHARED_LIBRARY_LIBS += \
|
|||
EXTRA_DSO_LDOPTS = $(MOZALLOC_LIB) $(NSPR_LIBS)
|
||||
|
||||
ifeq (WINNT,$(OS_TARGET))
|
||||
# OTS uses uncompress2() from libz, so we need to link with this
|
||||
ifdef MOZ_NATIVE_ZLIB
|
||||
EXTRA_DSO_LDOPTS += $(ZLIB_LIBS)
|
||||
else
|
||||
EXTRA_DSO_LDOPTS += $(MOZ_ZLIB_LIBS)
|
||||
endif
|
||||
|
||||
DEFFILE = symbols.def
|
||||
|
||||
symbols.def: symbols.def.in
|
||||
|
|
|
@ -374,7 +374,6 @@ EXTRA_DSO_LDOPTS += \
|
|||
$(NSS_LIBS) \
|
||||
$(MOZ_CAIRO_LIBS) \
|
||||
$(MOZ_HARFBUZZ_LIBS) \
|
||||
$(MOZ_OTS_LIBS) \
|
||||
$(MOZ_APP_EXTRA_LIBS) \
|
||||
$(SQLITE_LIBS) \
|
||||
$(NULL)
|
||||
|
|
Загрузка…
Ссылка в новой задаче