Skip to content

Commit

Permalink
Fix ICU compliation when not using 51.x
Browse files Browse the repository at this point in the history
'brew update' to a newer icu4c on OS X exposed that we aren't
being consistent in how we include it resulting in linker errors due to
confusion regarding what the icu namespace is.

Reviewed By: @sgolemon

Differential Revision: D1019529
  • Loading branch information
scannell authored and sgolemon committed Oct 21, 2013
1 parent 03567b7 commit 073579b
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 4 deletions.
3 changes: 2 additions & 1 deletion hphp/runtime/ext/icu/ICUMatcher.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,14 @@
#define incl_HPHP_ICU_MATCHER_H_

#include <boost/scoped_ptr.hpp>
#include <unicode/regex.h>

// Avoid dragging in the icu namespace.
#ifndef U_USING_ICU_NAMESPACE
#define U_USING_ICU_NAMESPACE 0
#endif

#include <unicode/regex.h>

namespace HPHP {
// Wrapper class around icu::RegexMatcher that provides a default constructor
// so that it can be used in thread-local storage.
Expand Down
3 changes: 2 additions & 1 deletion hphp/runtime/ext/icu/ICUTransliterator.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,14 @@
#define incl_HPHP_ICU_TRANSLITERATOR_H_

#include <boost/scoped_ptr.hpp>
#include <unicode/translit.h>

// Avoid dragging in the icu namespace.
#ifndef U_USING_ICU_NAMESPACE
#define U_USING_ICU_NAMESPACE 0
#endif

#include <unicode/translit.h>

namespace HPHP {
// Wrapper class around icu::Transliterator that provides a default constructor
// so that it can be used in thread-local storage.
Expand Down
4 changes: 2 additions & 2 deletions hphp/runtime/ext/icu/LifeEventTokenizer.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@
#include <vector>
#include <boost/scoped_ptr.hpp>

#include <unicode/rbbi.h> // icu

// Avoid dragging in the icu namespace.
#ifndef U_USING_ICU_NAMESPACE
#define U_USING_ICU_NAMESPACE 0
#endif

#include <unicode/rbbi.h> // icu

namespace HPHP {

typedef icu::RuleBasedBreakIterator BreakIterator;
Expand Down
5 changes: 5 additions & 0 deletions hphp/zend/zend-html.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@

#include "hphp/util/base.h"

// Avoid dragging in the icu namespace.
#ifndef U_USING_ICU_NAMESPACE
#define U_USING_ICU_NAMESPACE 0
#endif

namespace HPHP {
///////////////////////////////////////////////////////////////////////////////
/**
Expand Down

0 comments on commit 073579b

Please sign in to comment.