<pre style='margin:0'>
Chris Jones (cjones051073) pushed a commit to branch ffsll
in repository macports-legacy-support.
</pre>
<p><a href="https://github.com/macports/macports-legacy-support/commit/7a0fd744414a61f0abacc85f96e2851cbb83535c">https://github.com/macports/macports-legacy-support/commit/7a0fd744414a61f0abacc85f96e2851cbb83535c</a></p>
<pre style="white-space: pre; background: #F8F8F8"><span style='display:block; white-space:pre;color:#808000;'>commit 7a0fd744414a61f0abacc85f96e2851cbb83535c
</span>Author: Chris Jones <jonesc@hep.phy.cam.ac.uk>
AuthorDate: Mon May 25 20:31:04 2020 +0100
<span style='display:block; white-space:pre;color:#404040;'> TEMP
</span>---
include/MacportsLegacySupport.h | 3 +++
include/strings.h | 34 ++++++++++++++++++++++++++++++++++
src/ffsll.c | 35 +++++++++++++++++++++++++++++++++++
3 files changed, 72 insertions(+)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/include/MacportsLegacySupport.h b/include/MacportsLegacySupport.h
</span><span style='display:block; white-space:pre;color:#808080;'>index 19fa3a9..03ccf40 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/include/MacportsLegacySupport.h
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/include/MacportsLegacySupport.h
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -46,6 +46,9 @@
</span> /* fdopendir */
#define __MP_LEGACY_SUPPORT_FDOPENDIR__ (__APPLE__ && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 101000)
<span style='display:block; white-space:pre;background:#e0ffe0;'>+/* ffsll */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#define __MP_LEGACY_SUPPORT_FFSLL__ (__APPLE__ && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 101000)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span> /* strnlen */
#define __MP_LEGACY_SUPPORT_STRNLEN__ (__APPLE__ && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1070)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/include/strings.h b/include/strings.h
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 0000000..acd2dcf
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--- /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/include/strings.h
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,34 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+/*
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ * Copyright (c) 2018 Chris Jones <jonesc@macports.org>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ *
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ * Permission to use, copy, modify, and distribute this software for any
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ * purpose with or without fee is hereby granted, provided that the above
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ * copyright notice and this permission notice appear in all copies.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ *
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#ifndef _MACPORTS_STRINGS_H_
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#define _MACPORTS_STRINGS_H_
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+/* MP support header */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#include "MacportsLegacySupport.h"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+/* Include the primary system string.h */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#include_next <strings.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+/* ffsll */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#if __MP_LEGACY_SUPPORT_FFSLL__
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+__MP__BEGIN_DECLS
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+extern int ffsll(long long int);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+__MP__END_DECLS
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#endif /* _MACPORTS_STRINGS_H_ */
</span><span style='display:block; white-space:pre;color:#808080;'>diff --git a/src/ffsll.c b/src/ffsll.c
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 0000000..09a3b21
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--- /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/src/ffsll.c
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,35 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+/* Copyright (C) 1991-2018 Free Software Foundation, Inc.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ This file is part of the GNU C Library.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ Contributed by Torbjorn Granlund (tege@sics.se).
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ The GNU C Library is free software; you can redistribute it and/or
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ modify it under the terms of the GNU Lesser General Public
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ License as published by the Free Software Foundation; either
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ version 2.1 of the License, or (at your option) any later version.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ The GNU C Library is distributed in the hope that it will be useful,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ but WITHOUT ANY WARRANTY; without even the implied warranty of
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ Lesser General Public License for more details.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ You should have received a copy of the GNU Lesser General Public
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ License along with the GNU C Library; if not, see
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ <http://www.gnu.org/licenses/>. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+// MP support header
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#include "MacportsLegacySupport.h"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#include <string.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#if __MP_LEGACY_SUPPORT_FFSLL__
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+/* Find the first bit set in I. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+int ffsll (long long int i)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+{
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ unsigned long long int x = i & -i;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if (x <= 0xffffffff) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return ffs (i);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ } else {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return 32 + ffs (i >> 32);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#endif
</span></pre><pre style='margin:0'>
</pre>