1
0
mirror of https://https.git.savannah.gnu.org/git/gnulib.git synced 2026-05-13 15:13:36 +00:00

di-set: port better to CHERI-64

* lib/di-set.c: Include stdint.h.
(hashint): Make it uintptr_t, not size_t, since it’s for use
when converting to pointer and back again.  This suppresses
a false positive on CHERI-64.
* modules/di-set (Depends-on): Add stdint.
This commit is contained in:
Paul Eggert
2023-11-10 23:04:35 -08:00
parent 96b7ae2483
commit c960f2b786
3 changed files with 10 additions and 1 deletions

View File

@@ -1,5 +1,12 @@
2023-11-10 Paul Eggert <eggert@cs.ucla.edu>
di-set: port better to CHERI-64
* lib/di-set.c: Include stdint.h.
(hashint): Make it uintptr_t, not size_t, since its for use
when converting to pointer and back again. This suppresses
a false positive on CHERI-64.
* modules/di-set (Depends-on): Add stdint.
stdio: fix port to older macOS
* lib/stdio.in.h: Its pre macOS 13, not pre macOS 10.13.
Problem reported by Sevan Janiyan in:

View File

@@ -24,13 +24,14 @@
#include "ino-map.h"
#include <limits.h>
#include <stdint.h>
#include <stdlib.h>
/* The hash package hashes "void *", but this package wants to hash
integers. Use integers that are as large as possible, but no
larger than void *, so that they can be cast to void * and back
without losing information. */
typedef size_t hashint;
typedef uintptr_t hashint;
#define HASHINT_MAX ((hashint) -1)
/* Integers represent inode numbers. Integers in the range

View File

@@ -8,6 +8,7 @@ lib/di-set.h
Depends-on:
ino-map
hash
stdint
configure.ac: