mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-19 00:50:30 +00:00
Import GNU Make 4.4.1
Landlock Make hasn't been working well on AARCH64 systems. Let's do this over the right way, using our new build tools.
This commit is contained in:
parent
9315ebbfd9
commit
14bf57180f
88 changed files with 13931 additions and 16191 deletions
13
third_party/make/hash.h
vendored
13
third_party/make/hash.h
vendored
|
@ -12,11 +12,14 @@ WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
|||
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along with
|
||||
this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
this program. If not, see <https://www.gnu.org/licenses/>. */
|
||||
|
||||
#ifndef _hash_h_
|
||||
#define _hash_h_
|
||||
|
||||
#include <stdio.h>
|
||||
#include <ctype.h>
|
||||
|
||||
#if defined __cplusplus || (defined __STDC__ && __STDC__) || defined WINDOWS32
|
||||
# if !defined __GLIBC__ || !defined __P
|
||||
# undef __P
|
||||
|
@ -53,9 +56,9 @@ struct hash_table
|
|||
typedef int (*qsort_cmp_t) __P((void const *, void const *));
|
||||
|
||||
void hash_init __P((struct hash_table *ht, unsigned long size,
|
||||
hash_func_t hash_1, hash_func_t hash_2, hash_cmp_func_t hash_cmp));
|
||||
hash_func_t hash_1, hash_func_t hash_2, hash_cmp_func_t hash_cmp));
|
||||
void hash_load __P((struct hash_table *ht, void *item_table,
|
||||
unsigned long cardinality, unsigned long size));
|
||||
unsigned long cardinality, unsigned long size));
|
||||
void **hash_find_slot __P((struct hash_table *ht, void const *key));
|
||||
void *hash_find_item __P((struct hash_table *ht, void const *key));
|
||||
void *hash_insert __P((struct hash_table *ht, const void *item));
|
||||
|
@ -151,7 +154,7 @@ extern void *hash_deleted_item;
|
|||
#define ISTRING_HASH_1(KEY, RESULT) do { \
|
||||
unsigned char const *_key_ = (unsigned char const *) (KEY) - 1; \
|
||||
while (*++_key_) \
|
||||
(RESULT) += ((isupper (*_key_) ? tolower (*_key_) : *_key_) << (_key_[1] & 0xf)); \
|
||||
(RESULT) += (tolower (*_key_) << (_key_[1] & 0xf)); \
|
||||
} while (0)
|
||||
#define return_ISTRING_HASH_1(KEY) do { \
|
||||
unsigned long _result_ = 0; \
|
||||
|
@ -162,7 +165,7 @@ extern void *hash_deleted_item;
|
|||
#define ISTRING_HASH_2(KEY, RESULT) do { \
|
||||
unsigned char const *_key_ = (unsigned char const *) (KEY) - 1; \
|
||||
while (*++_key_) \
|
||||
(RESULT) += ((isupper (*_key_) ? tolower (*_key_) : *_key_) << (_key_[1] & 0x7)); \
|
||||
(RESULT) += (tolower (*_key_) << (_key_[1] & 0x7)); \
|
||||
} while (0)
|
||||
#define return_ISTRING_HASH_2(KEY) do { \
|
||||
unsigned long _result_ = 0; \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue