Commit Graph

37 Commits

Author SHA1 Message Date
Behdad Esfahbod b368a0736b [atomic] Remove IBM/AIX implementation
The C++11 implementation shall be enough for everyone.
2021-02-22 17:24:09 -07:00
Behdad Esfahbod 52f9126960 [atomic] Remove Windows implementation
Since we require C++11 now, there's no point to do a macro version check.
Which means we don't hit the MSVC issue defining __cplusplus wrongly.
2021-02-22 17:22:09 -07:00
Behdad Esfahbod a666fe64a9 [atomic] Comment 2021-02-22 17:21:27 -07:00
Behdad Esfahbod 3528a21e8d [atomic] Remove Apple implementation
Continuation of https://github.com/harfbuzz/harfbuzz/pull/676
2021-02-22 17:19:43 -07:00
Behdad Esfahbod 140797d4a2 [constexpr] hb_atomic_int_t 2021-02-22 17:19:26 -07:00
Behdad Esfahbod c2fc2aa44c [atomic] Remove Solaris intrinsics 2021-02-20 15:20:33 -07:00
Behdad Esfahbod 7099a6dca1 [atomic] Remove old Intel primitives implementation 2021-02-20 15:20:06 -07:00
Behdad Esfahbod 5e489670e1 Remove hb-warning.cc
Fixes https://github.com/harfbuzz/harfbuzz/issues/2005
2019-10-22 15:03:47 -07:00
Eli Zaretskii d5e5f37832 This makes minor changes to allow building HarfBuzz with
mingw.org's MinGW.

src/hb-algs.hh: Don't compile _BitScanForward and _BitScanReverse
for GCC >= 4.  mingw.org's MinGW doesn't have these functions.

src/hb-atomic.hh: MemoryBarrier does exist in mingw.org's MinGW,
but it is not a macro, it is an inline function.  __MINGW32_VERSION
is a macro that exists only in mingw.org's MinGW, so conditioning
on it should not affect MinGW64, where MemoryBarrier is a macro.

src/hb-uniscribe.cc: Define E_NOT_SUFFICIENT_BUFFER if it is not
defined (mingw.org's MinGW doesn't).

src/hb.hh: Don't include intrin.h for mingw.org's MinGW, since that
header is not available; instead, include windows.h.  Conditioned
on __MINGW32_VERSION to avoid affecting MinGW64.
2019-06-05 14:37:51 -07:00
Behdad Esfahbod 179570d4ca [atomic] Fix warning, second time
Fixes https://bugzilla.mozilla.org/show_bug.cgi?id=1554306
2019-05-27 13:08:07 -04:00
Behdad Esfahbod 85b68a42af [atomic] Fix warnings
https://bugzilla.mozilla.org/show_bug.cgi?id=1554306
2019-05-25 12:59:01 -04:00
Behdad Esfahbod 227d85e138 Minor 2019-05-10 23:16:14 -07:00
Behdad Esfahbod 54ece299bc Use type aliasing for meta-functions, ie. those returning a type 2019-04-16 16:45:53 -04:00
Behdad Esfahbod a030ce4ff8 Merge branch 'master' into iter 2019-03-28 21:26:50 -07:00
Stephan Bergmann d936ad4582 Fix hb_atomic_* variants based on C++11 atomics
I stumbled over this when trying to upgrade the version of HarfBuzz used by
LibreOffice to 3.2.1 (see <https://gerrit.libreoffice.org/plugins/gitiles/core/
+/b7ddc514bff9bdf682abae537f990aa01dc2c0fb%5E!/> "Upgrade to latest
HarfBuzz 2.3.1"), where building with MSVC 2017 failed like

> c:\cygwin\home\tdf\lode\jenkins\workspace\gerrit_windows\workdir\unpackedtarball\harfbuzz\src\hb-atomic.hh(272): error C2440: 'reinterpret_cast': cannot convert from 'const int *' to 'std::atomic<int> *'
> c:\cygwin\home\tdf\lode\jenkins\workspace\gerrit_windows\workdir\unpackedtarball\harfbuzz\src\hb-atomic.hh(272): note: Conversion loses qualifiers
> c:\cygwin\home\tdf\lode\jenkins\workspace\gerrit_windows\workdir\unpackedtarball\harfbuzz\src\hb-atomic.hh(272): error C2227: left of '->load' must point to class/struct/union/generic type

(see <https://ci.libreoffice.org/job/gerrit_windows/29916/>).

I added all the necessary "const" to make building of HarfBuzz 2.3.1 with
MSVC 2017 succeed for me.  There may be more missing at least conceptually.
2019-03-05 12:11:32 -08:00
Behdad Esfahbod c1e5ba81fe Merge remote-tracking branch 'origin/master' into iter 2019-02-15 16:06:03 -08:00
Martin 5c2bb1de8d Support xlclang++ on AIX. (#1584) 2019-02-15 21:53:46 +03:30
Behdad Esfahbod d552b6818c [meta] Move typename around
We'll see if bots like.
2019-01-20 20:12:12 -05:00
Behdad Esfahbod f64ea8fc65 [meta] Move code around 2019-01-20 20:12:12 -05:00
prrace 37c14bc745 Fix Solaris use after free (#1495) 2018-12-17 17:59:37 -05:00
Ebrahim Byagowi e412008599 Remove redundant void from C++ sources (#1486) 2018-12-17 13:01:01 -05:00
Ebrahim Byagowi b2ebaa9afa Remove redundant 'inline' from methods (#1483) 2018-12-16 14:08:10 -05:00
Behdad Esfahbod f99abcc379 Add template-function convenience macros 2018-11-24 00:24:01 -05:00
Behdad Esfahbod 2092f595c7
Merge pull request #1380 from kbrow1i/cygwin
Don't use Win32 API on Cygwin
2018-11-13 19:49:06 -05:00
Behdad Esfahbod 475be9d5c6 Fix Windows build 2018-11-13 13:01:13 -05:00
Behdad Esfahbod 9579ed9755 Make atomic types' internal values non-mutable
This resulted from confusion previously...
2018-11-13 11:46:20 -05:00
Ken Brown eee5b5ed04 Don't use Win32 API on Cygwin
Cygwin is a Posix platform to the extent possible.  It should use the
Posix API except in special circumstances.
2018-11-12 21:07:34 -05:00
Behdad Esfahbod f6fc5574d3 Add pointer magic operators to hb_atomic_ptr_t 2018-11-05 13:23:54 -05:00
Behdad Esfahbod 07386ea410 Remove const and references when binding Null()
Fixes https://github.com/harfbuzz/harfbuzz/issues/1299

Removes anomaly I was seeing in cpal table trying to use implicit Null(NameID).
2018-10-22 21:21:17 -07:00
Behdad Esfahbod b435df3a5b More atomic tuneup 2018-09-28 09:13:14 -04:00
Behdad Esfahbod d2542cd28c More atomic fixup 2018-09-27 17:23:24 -04:00
Behdad Esfahbod 3ee96984f4 Fixup atomics from recent change 2018-09-27 17:20:26 -04:00
Behdad Esfahbod ec743fce2a Add more atomic intrinsics 2018-09-26 16:40:59 -04:00
Behdad Esfahbod 606bf57430 Revert forcing use of single-parameter static_assert()
Some clang versions define static_assert as a macro apparently, so we cannot
redefine it...

This reverts commit 94bfea0ce6.
This reverts commit 4e62627831.
2018-09-16 19:34:39 +02:00
Behdad Esfahbod 4e62627831 Enforce single-param static_assert() only
So we don't accidentally break it again.
2018-09-16 18:09:36 +02:00
Behdad Esfahbod d42f0e5809 [atomic] Fix pointer type passed to InterlockedExchangeAdd()
John Emmas reported on mailing list that build with MSVC is failing.
Not sure why bots don't catch it, but this should fix.
2018-09-10 11:05:33 +02:00
Behdad Esfahbod c77ae40852 Rename hb-*private.hh to hb-*.hh
Sorry for the noise, downstream custom builders.  Please adjust.
2018-08-25 22:36:36 -07:00