From dc0ee6361a8f50b9ae60f67e8bfefbf2093c10a5 Mon Sep 17 00:00:00 2001 From: Peter Edberg Date: Thu, 24 Apr 2008 00:30:41 +0000 Subject: [PATCH] ICU-6245 Fix build with UCONFIG_NO_SERVICE 1 (e.g. for Cygwin/MSVC) by adding dummy invocation of Mutex for that case X-SVN-Rev: 23825 --- .gitattributes | 1 + icu4c/source/common/Makefile.in | 4 ++-- icu4c/source/common/mutex.cpp | 18 ++++++++++++++++++ 3 files changed, 21 insertions(+), 2 deletions(-) create mode 100644 icu4c/source/common/mutex.cpp diff --git a/.gitattributes b/.gitattributes index 52a3962c2e..19dc172057 100644 --- a/.gitattributes +++ b/.gitattributes @@ -48,6 +48,7 @@ README text !eol *.spp -text *.tri2 -text +icu4c/source/common/mutex.cpp -text icu4c/source/samples/layout/cgnomelayout.c -text icu4c/source/samples/ucnv/data02.bin -text icu4c/source/test/compat/tzone.pl -text diff --git a/icu4c/source/common/Makefile.in b/icu4c/source/common/Makefile.in index 6efb25907d..43b38661f2 100644 --- a/icu4c/source/common/Makefile.in +++ b/icu4c/source/common/Makefile.in @@ -1,6 +1,6 @@ #****************************************************************************** # -# Copyright (C) 1999-2007, International Business Machines +# Copyright (C) 1999-2008, International Business Machines # Corporation and others. All Rights Reserved. # #****************************************************************************** @@ -85,7 +85,7 @@ uarrsort.o brkiter.o ubrk.o brkeng.o dictbe.o triedict.o \ rbbi.o rbbidata.o rbbinode.o rbbirb.o rbbiscan.o rbbisetb.o rbbistbl.o rbbitblb.o \ serv.o servnotf.o servls.o servlk.o servlkf.o servrbf.o servslkf.o \ uidna.o usprep.o punycode.o \ -util.o util_props.o parsepos.o locbased.o cwchar.o wintz.o +util.o util_props.o parsepos.o locbased.o cwchar.o wintz.o mutex.o ## Header files to install HEADERS = $(srcdir)/unicode/*.h unicode/*.h diff --git a/icu4c/source/common/mutex.cpp b/icu4c/source/common/mutex.cpp new file mode 100644 index 0000000000..b54a847bfa --- /dev/null +++ b/icu4c/source/common/mutex.cpp @@ -0,0 +1,18 @@ +/** +******************************************************************************* +* Copyright (C) 2008, International Business Machines Corporation. * +* All Rights Reserved. * +******************************************************************************* +*/ + +#include "unicode/utypes.h" + +#if UCONFIG_NO_SERVICE + +/* If UCONFIG_NO_SERVICE, then there is no invocation of Mutex elsewhere in + common, so add one here to force an export */ +#include "mutex.h" +static Mutex *aMutex = 0; + +/* UCONFIG_NO_SERVICE */ +#endif