Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F138645920
D30317.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
22 KB
Referenced Files
None
Subscribers
None
D30317.diff
View Options
Index: include/_ctype.h
===================================================================
--- include/_ctype.h
+++ include/_ctype.h
@@ -84,7 +84,18 @@
#define _USE_CTYPE_INLINE_
#define static
#define __inline
-#endif
+
+int __maskrune(__ct_rune_t _c, unsigned long _f);
+int __sbmaskrune(__ct_rune_t _c, unsigned long _f);
+int __istype(__ct_rune_t _c, unsigned long _f);
+int __sbistype(__ct_rune_t _c, unsigned long _f);
+int __isctype(__ct_rune_t _c, unsigned long _f);
+__ct_rune_t __toupper(__ct_rune_t _c);
+__ct_rune_t __sbtoupper(__ct_rune_t _c);
+__ct_rune_t __tolower(__ct_rune_t _c);
+__ct_rune_t __sbtolower(__ct_rune_t _c);
+int __wcwidth(__ct_rune_t _c);
+#endif /* _EXTERNALIZE_CTYPE_INLINES_ */
extern int __mb_sb_limit;
Index: lib/libc/Makefile
===================================================================
--- lib/libc/Makefile
+++ lib/libc/Makefile
@@ -38,7 +38,7 @@
SHLIB_LDSCRIPT=libc_nossp.ldscript
.endif
SHLIB_LDSCRIPT_LINKS=libxnet.so
-WARNS?= 2
+WARNS?= 3
CFLAGS+=-I${LIBC_SRCTOP}/include -I${SRCTOP}/include
CFLAGS+=-I${LIBC_SRCTOP}/${LIBC_ARCH}
.if ${MK_NLS} != "no"
Index: lib/libc/amd64/gen/makecontext.c
===================================================================
--- lib/libc/amd64/gen/makecontext.c
+++ lib/libc/amd64/gen/makecontext.c
@@ -39,6 +39,7 @@
/* Prototypes */
static void makectx_wrapper(ucontext_t *ucp, func_t func, uint64_t *args);
+void __makecontext(ucontext_t *ucp, void (*start)(void), int argc, ...);
__weak_reference(__makecontext, makecontext);
@@ -66,7 +67,7 @@
}
/* Align the stack to 16 bytes. */
- sp = (uint64_t *)(ucp->uc_stack.ss_sp + ucp->uc_stack.ss_size);
+ sp = (uint64_t *)((char *)ucp->uc_stack.ss_sp + ucp->uc_stack.ss_size);
sp = (uint64_t *)((uint64_t)sp & ~15UL);
/* Allocate space for a maximum of 6 arguments on the stack. */
Index: lib/libc/amd64/gen/signalcontext.c
===================================================================
--- lib/libc/amd64/gen/signalcontext.c
+++ lib/libc/amd64/gen/signalcontext.c
@@ -39,6 +39,7 @@
/* Prototypes */
static void sigctx_wrapper(ucontext_t *ucp, handler_t func, uint64_t *args);
+int __signalcontext(ucontext_t *ucp, int sig, __sighandler_t *func);
__weak_reference(__signalcontext, signalcontext);
Index: lib/libc/gen/Makefile.inc
===================================================================
--- lib/libc/gen/Makefile.inc
+++ lib/libc/gen/Makefile.inc
@@ -486,7 +486,8 @@
rand48.3 seed48.3 \
rand48.3 srand48.3
MLINKS+=recv.2 recvmmsg.2
-MLINKS+=scandir.3 alphasort.3
+MLINKS+=scandir.3 alphasort.3 \
+ scandir.3 scandir_b.3
MLINKS+=sem_open.3 sem_close.3 \
sem_open.3 sem_unlink.3
MLINKS+=sem_wait.3 sem_trywait.3
Index: lib/libc/gen/getgrent.c
===================================================================
--- lib/libc/gen/getgrent.c
+++ lib/libc/gen/getgrent.c
@@ -1142,7 +1142,7 @@
goto erange;
break;
case nss_lt_id:
- if (snprintf(buffer, bufsize, "%lu",
+ if ((size_t)snprintf(buffer, bufsize, "%lu",
(unsigned long)gid) >= bufsize)
goto erange;
break;
@@ -1192,7 +1192,7 @@
* terminator, alignment padding, and one (char *)
* pointer for the member list terminator.
*/
- if (resultlen >= bufsize - _ALIGNBYTES - sizeof(char *)) {
+ if ((size_t)resultlen >= bufsize - _ALIGNBYTES - sizeof(char *)) {
free(result);
goto erange;
}
Index: lib/libc/gen/getloadavg.c
===================================================================
--- lib/libc/gen/getloadavg.c
+++ lib/libc/gen/getloadavg.c
@@ -60,7 +60,7 @@
if (sysctl(mib, 2, &loadinfo, &size, NULL, 0) < 0)
return (-1);
- nelem = MIN(nelem, sizeof(loadinfo.ldavg) / sizeof(fixpt_t));
+ nelem = MIN((size_t)nelem, sizeof(loadinfo.ldavg) / sizeof(fixpt_t));
for (i = 0; i < nelem; i++)
loadavg[i] = (double) loadinfo.ldavg[i] / loadinfo.fscale;
return (nelem);
Index: lib/libc/gen/getlogin.c
===================================================================
--- lib/libc/gen/getlogin.c
+++ lib/libc/gen/getlogin.c
@@ -61,7 +61,7 @@
getlogin_r(char *logname, size_t namelen)
{
char tmpname[MAXLOGNAME];
- int len;
+ size_t len;
if (namelen < 1)
return (ERANGE);
@@ -77,7 +77,7 @@
}
/* FreeBSD 12 and earlier compat. */
-int
+static int
__getlogin_r_fbsd12(char *logname, int namelen)
{
if (namelen < 1)
Index: lib/libc/gen/getmntinfo-compat11.c
===================================================================
--- lib/libc/gen/getmntinfo-compat11.c
+++ lib/libc/gen/getmntinfo-compat11.c
@@ -55,7 +55,7 @@
if (bufsize > 0 &&
(mntsize = freebsd11_getfsstat(mntbuf, bufsize, flags)) < 0)
return (0);
- while (bufsize <= mntsize * sizeof(struct freebsd11_statfs)) {
+ while ((unsigned long)bufsize <= mntsize * sizeof(struct freebsd11_statfs)) {
if (mntbuf)
free(mntbuf);
bufsize = (mntsize + 1) * sizeof(struct freebsd11_statfs);
Index: lib/libc/gen/getmntinfo.c
===================================================================
--- lib/libc/gen/getmntinfo.c
+++ lib/libc/gen/getmntinfo.c
@@ -56,7 +56,8 @@
return (0);
if (bufsize > 0 && (mntsize = getfsstat(mntbuf, bufsize, mode)) < 0)
return (0);
- while (tries++ < MAX_TRIES && bufsize <= mntsize * sizeof(*mntbuf)) {
+ while (tries++ < MAX_TRIES &&
+ (size_t)bufsize <= mntsize * sizeof(*mntbuf)) {
bufsize = (mntsize * SCALING_FACTOR) * sizeof(*mntbuf);
if ((mntbuf = reallocf(mntbuf, bufsize)) == NULL)
return (0);
@@ -64,7 +65,7 @@
return (0);
}
*mntbufp = mntbuf;
- if (mntsize > (bufsize / sizeof(*mntbuf)))
+ if ((unsigned long)mntsize > (bufsize / sizeof(*mntbuf)))
return (bufsize / sizeof(*mntbuf));
return (mntsize);
}
Index: lib/libc/gen/getpwent.c
===================================================================
--- lib/libc/gen/getpwent.c
+++ lib/libc/gen/getpwent.c
@@ -738,7 +738,7 @@
else
*version = 3;
if (*version < 3 ||
- *version >= nitems(pwdb_versions)) {
+ (size_t)*version >= nitems(pwdb_versions)) {
syslog(LOG_CRIT, "Unsupported password database version %d",
*version);
res->close(res);
@@ -1221,7 +1221,7 @@
*master = 0;
if (geteuid() == 0) {
- if (snprintf(buffer, bufsize, "master.passwd.by%s",
+ if ((size_t)snprintf(buffer, bufsize, "master.passwd.by%s",
(how == nss_lt_id) ? "uid" : "name") >= bufsize)
return (NS_UNAVAIL);
rv = yp_order(domain, buffer, &order);
@@ -1231,7 +1231,7 @@
}
}
- if (snprintf(buffer, bufsize, "passwd.by%s",
+ if ((size_t)snprintf(buffer, bufsize, "passwd.by%s",
(how == nss_lt_id) ? "uid" : "name") >= bufsize)
return (NS_UNAVAIL);
@@ -1256,7 +1256,7 @@
p = memchr(result, ':', eor - result);
if (p != NULL && ++p < eor &&
(q = memchr(p, ':', eor - p)) != NULL) {
- if (q - p >= bufsize)
+ if ((size_t)(q - p) >= bufsize)
rv = -1;
else {
memcpy(buffer, p, q - p);
@@ -1337,7 +1337,7 @@
goto erange;
break;
case nss_lt_id:
- if (snprintf(buffer, bufsize, "%lu",
+ if ((size_t)snprintf(buffer, bufsize, "%lu",
(unsigned long)uid) >= bufsize)
goto erange;
break;
@@ -1382,7 +1382,7 @@
continue;
}
}
- if (resultlen >= bufsize) {
+ if ((size_t)resultlen >= bufsize) {
free(result);
goto erange;
}
@@ -1514,7 +1514,7 @@
pwd->field = NULL; \
else { \
pwd->field = p; \
- if ((n = strlcpy(p, q, eob-p)) >= eob-p) { \
+ if ((long)(n = strlcpy(p, q, eob-p)) >= eob-p) { \
free(copy); \
return (ERANGE); \
} \
@@ -1973,7 +1973,7 @@
return (NS_SUCCESS);
if (how == nss_lt_name) {
len = strlen(name);
- if (len == (p - entry) && memcmp(name, entry, len) == 0)
+ if (len == (size_t)(p - entry) && memcmp(name, entry, len) == 0)
return (NS_SUCCESS);
else
return (NS_NOTFOUND);
Index: lib/libc/gen/glob-compat11.c
===================================================================
--- lib/libc/gen/glob-compat11.c
+++ lib/libc/gen/glob-compat11.c
@@ -1013,7 +1013,7 @@
{
do {
- if (*str == ch)
+ if ((const wchar_t)*str == ch)
return (str);
} while (*str++);
return (NULL);
Index: lib/libc/gen/glob.c
===================================================================
--- lib/libc/gen/glob.c
+++ lib/libc/gen/glob.c
@@ -1044,7 +1044,7 @@
{
do {
- if (*str == ch)
+ if ((const wchar_t)*str == ch)
return (str);
} while (*str++);
return (NULL);
Index: lib/libc/gen/memalign.c
===================================================================
--- lib/libc/gen/memalign.c
+++ lib/libc/gen/memalign.c
@@ -33,6 +33,8 @@
#include <sys/param.h>
#include <stdlib.h>
+void *memalign(size_t align, size_t size);
+
void *
memalign(size_t align, size_t size)
{
Index: lib/libc/gen/nftw-compat11.c
===================================================================
--- lib/libc/gen/nftw-compat11.c
+++ lib/libc/gen/nftw-compat11.c
@@ -32,7 +32,7 @@
#include "fts-compat11.h"
-int
+static int
freebsd11_nftw(const char *path,
int (*fn)(const char *, const struct freebsd11_stat *, int, struct FTW *),
int nfds, int ftwflags)
Index: lib/libc/gen/scandir-compat11.c
===================================================================
--- lib/libc/gen/scandir-compat11.c
+++ lib/libc/gen/scandir-compat11.c
@@ -61,7 +61,7 @@
static int freebsd11_alphasort_thunk(void *thunk, const void *p1,
const void *p2);
-int
+static int
freebsd11_scandir(const char *dirname, struct freebsd11_dirent ***namelist,
int (*select)(const struct freebsd11_dirent *),
int (*dcomp)(const struct freebsd11_dirent **,
@@ -132,7 +132,7 @@
* Alphabetic order comparison routine for those who want it.
* POSIX 2008 requires that alphasort() uses strcoll().
*/
-int
+static int
freebsd11_alphasort(const struct freebsd11_dirent **d1,
const struct freebsd11_dirent **d2)
{
Index: lib/libc/gen/scandir.c
===================================================================
--- lib/libc/gen/scandir.c
+++ lib/libc/gen/scandir.c
@@ -63,6 +63,10 @@
#else
static int alphasort_thunk(void *thunk, const void *p1, const void *p2);
#endif
+
+#ifdef I_AM_SCANDIR_B
+int scandir_b(const char *dirname, struct dirent ***namelist, select_block select, dcomp_block dcomp);
+#endif
int
#ifdef I_AM_SCANDIR_B
Index: lib/libc/gen/sem.c
===================================================================
--- lib/libc/gen/sem.c
+++ lib/libc/gen/sem.c
@@ -111,6 +111,18 @@
static LIST_HEAD(, sem) named_sems = LIST_HEAD_INITIALIZER(named_sems);
static pthread_mutex_t named_sems_mtx = PTHREAD_MUTEX_INITIALIZER;
+int _libc_sem_init_compat(sem_t *sem, int pshared, unsigned int value);
+int _libc_sem_destroy_compat(sem_t *sem);
+sem_t * _libc_sem_open_compat(const char *name, int oflag, ...);
+int _libc_sem_close_compat(sem_t *sem);
+int _libc_sem_unlink_compat(const char *name);
+int _libc_sem_timedwait_compat(sem_t * __restrict sem,
+ const struct timespec * __restrict abstime);
+int _libc_sem_wait_compat(sem_t *sem);
+int _libc_sem_trywait_compat(sem_t *sem);
+int _libc_sem_post_compat(sem_t *sem);
+int _libc_sem_getvalue_compat(sem_t * __restrict sem, int * __restrict sval);
+
FB10_COMPAT(_libc_sem_init_compat, sem_init);
FB10_COMPAT(_libc_sem_destroy_compat, sem_destroy);
FB10_COMPAT(_libc_sem_open_compat, sem_open);
Index: lib/libc/gen/sem_new.c
===================================================================
--- lib/libc/gen/sem_new.c
+++ lib/libc/gen/sem_new.c
@@ -214,7 +214,7 @@
if (fd == -1 || _fstat(fd, &sb) == -1)
goto error;
}
- if (sb.st_size < sizeof(sem_t)) {
+ if ((size_t)sb.st_size < sizeof(sem_t)) {
tmp._magic = SEM_MAGIC;
tmp._kern._count = value;
tmp._kern._flags = USYNC_PROCESS_SHARED | SEM_NAMED;
Index: lib/libc/gen/statvfs.c
===================================================================
--- lib/libc/gen/statvfs.c
+++ lib/libc/gen/statvfs.c
@@ -110,7 +110,7 @@
#define COPY(field) \
do { \
to->field = from->field; \
- if (from->field != to->field) { \
+ if ((__typeof(from->field))from->field != (__typeof(from->field))to->field) { \
errno = EOVERFLOW; \
return (-1); \
} \
Index: lib/libc/gen/strtofflags.c
===================================================================
--- lib/libc/gen/strtofflags.c
+++ lib/libc/gen/strtofflags.c
@@ -130,7 +130,7 @@
strtofflags(char **stringp, u_long *setp, u_long *clrp)
{
char *string, *p;
- int i;
+ size_t i;
if (setp)
*setp = 0;
Index: lib/libc/gen/timezone.c
===================================================================
--- lib/libc/gen/timezone.c
+++ lib/libc/gen/timezone.c
@@ -93,7 +93,7 @@
{-10*60,"EST", "EST"}, /* Aust: Eastern */
{-10*60+30,"CST", "CST"}, /* Aust: Central */
{-8*60, "WST", 0}, /* Aust: Western */
- {-1}
+ {-1, NULL, NULL}
};
/*
Index: lib/libc/gen/wordexp.c
===================================================================
--- lib/libc/gen/wordexp.c
+++ lib/libc/gen/wordexp.c
@@ -129,7 +129,7 @@
char wfdstr[sizeof(int) * 3 + 1];
char buf[35]; /* Buffer for byte and word count */
long nwords, nbytes; /* Number of words, bytes from child */
- long i; /* Handy integer */
+ size_t i; /* Handy integer */
size_t sofs; /* Offset into we->we_strings */
size_t vofs; /* Offset into we->we_wordv */
pid_t pid; /* Process ID of child */
@@ -252,7 +252,7 @@
we->we_wordv[i] += nstrings - we->we_strings;
we->we_strings = nstrings;
- if (we_read_fully(pdes[0], we->we_strings + sofs, nbytes) != nbytes) {
+ if (we_read_fully(pdes[0], we->we_strings + sofs, nbytes) != (size_t)nbytes) {
error = WRDE_NOSPACE; /* abort for unknown reason */
serrno = errno;
goto cleanup;
Index: lib/libc/gmon/gmon.c
===================================================================
--- lib/libc/gmon/gmon.c
+++ lib/libc/gmon/gmon.c
@@ -53,7 +53,7 @@
#include "libc_private.h"
-struct gmonparam _gmonparam = { GMON_PROF_OFF };
+struct gmonparam _gmonparam = { .state = GMON_PROF_OFF };
static int s_scale;
/* See profil(2) where this is described (incorrectly). */
@@ -85,7 +85,7 @@
p->tolimit = p->textsize * ARCDENSITY / 100;
if (p->tolimit < MINARCS)
p->tolimit = MINARCS;
- else if (p->tolimit > MAXARCS)
+ else if ((size_t)p->tolimit > MAXARCS)
p->tolimit = MAXARCS;
p->tossize = p->tolimit * sizeof(struct tostruct);
@@ -107,7 +107,7 @@
p->tos[0].link = 0;
o = p->highpc - p->lowpc;
- s_scale = (p->kcountsize < o) ?
+ s_scale = (p->kcountsize < (unsigned int)o) ?
((uintmax_t)p->kcountsize << SCALE_SHIFT) / o : (1 << SCALE_SHIFT);
moncontrol(1);
}
Index: lib/libc/iconv/iconv_compat.c
===================================================================
--- lib/libc/iconv/iconv_compat.c
+++ lib/libc/iconv/iconv_compat.c
@@ -38,26 +38,26 @@
#include <iconv.h>
#include "iconv-internal.h"
-size_t
+static size_t
__iconv_compat(iconv_t a, char ** b, size_t * c, char ** d,
size_t * e, __uint32_t f, size_t *g)
{
return __bsd___iconv(a, b, c, d, e, f, g);
}
-void
+static void
__iconv_free_list_compat(char ** a, size_t b)
{
__bsd___iconv_free_list(a, b);
}
-int
+static int
__iconv_get_list_compat(char ***a, size_t *b, __iconv_bool c)
{
return __bsd___iconv_get_list(a, b, c);
}
-size_t
+static size_t
iconv_compat(iconv_t a, char ** __restrict b,
size_t * __restrict c, char ** __restrict d,
size_t * __restrict e)
@@ -65,43 +65,43 @@
return __bsd_iconv(a, b, c, d, e);
}
-const char *
+static const char *
iconv_canonicalize_compat(const char *a)
{
return __bsd_iconv_canonicalize(a);
}
-int
+static int
iconv_close_compat(iconv_t a)
{
return __bsd_iconv_close(a);
}
-iconv_t
+static iconv_t
iconv_open_compat(const char *a, const char *b)
{
return __bsd_iconv_open(a, b);
}
-int
+static int
iconv_open_into_compat(const char *a, const char *b, iconv_allocation_t *c)
{
return __bsd_iconv_open_into(a, b, c);
}
-void
+static void
iconv_set_relocation_prefix_compat(const char *a, const char *b)
{
return __bsd_iconv_set_relocation_prefix(a, b);
}
-int
+static int
iconvctl_compat(iconv_t a, int b, void *c)
{
return __bsd_iconvctl(a, b, c);
}
-void
+static void
iconvlist_compat(int (*a) (unsigned int, const char * const *, void *), void *b)
{
return __bsd_iconvlist(a, b);
Index: lib/libc/inet/inet_network.c
===================================================================
--- lib/libc/inet/inet_network.c
+++ lib/libc/inet/inet_network.c
@@ -95,7 +95,7 @@
n = pp - parts;
if (n > 4U)
return (INADDR_NONE);
- for (val = 0, i = 0; i < n; i++) {
+ for (val = 0, i = 0; (in_addr_t)i < n; i++) {
val <<= 8;
val |= parts[i] & 0xff;
}
Index: lib/libc/locale/collate.c
===================================================================
--- lib/libc/locale/collate.c
+++ lib/libc/locale/collate.c
@@ -61,11 +61,11 @@
#include "libc_private.h"
struct xlocale_collate __xlocale_global_collate = {
- {{0}, "C"}, 1, 0, 0, 0
+ { .locale = "C"}, .__collate_load_error = 1 /* XXX: right field? */
};
struct xlocale_collate __xlocale_C_collate = {
- {{0}, "C"}, 1, 0, 0, 0
+ { .locale = "C"}, .__collate_load_error = 1
};
static int
@@ -140,7 +140,7 @@
(void) _close(fd);
return (_LDP_ERROR);
}
- if (sbuf.st_size < (COLLATE_FMT_VERSION_LEN +
+ if ((unsigned long)sbuf.st_size < (COLLATE_FMT_VERSION_LEN +
XLOCALE_DEF_VERSION_LEN +
sizeof (info))) {
(void) _close(fd);
Index: lib/libc/locale/euc.c
===================================================================
--- lib/libc/locale/euc.c
+++ lib/libc/locale/euc.c
@@ -318,13 +318,14 @@
uint8_t cs2, uint8_t cs2width, uint8_t cs3, uint8_t cs3width)
{
_EucState *es;
- int i, want;
+ int i;
+ size_t want;
wchar_t wc = 0;
unsigned char ch, chs;
es = (_EucState *)ps;
- if (es->want < 0 || es->want > MB_CUR_MAX) {
+ if (es->want < 0 || (size_t)es->want > MB_CUR_MAX) {
errno = EINVAL;
return ((size_t)-1);
}
@@ -367,13 +368,13 @@
wc = es->ch;
}
- for (i = 0; i < MIN(want, n); i++) {
+ for (i = 0; (size_t)i < MIN(want, n); i++) {
wc <<= 8;
chs = *s;
wc |= chs;
s++;
}
- if (i < want) {
+ if ((size_t)i < want) {
/* Incomplete multibyte sequence */
es->want = want - i;
es->ch = wc;
@@ -392,7 +393,8 @@
uint8_t cs2, uint8_t cs2width, uint8_t cs3, uint8_t cs3width)
{
_EucState *es;
- int i, len;
+ int i;
+ size_t len;
wchar_t nm;
es = (_EucState *)ps;
Index: lib/libc/locale/fix_grouping.c
===================================================================
--- lib/libc/locale/fix_grouping.c
+++ lib/libc/locale/fix_grouping.c
@@ -35,6 +35,8 @@
static const char nogrouping[] = { '\0' };
+const char * __fix_locale_grouping_str(const char *str);
+
/*
* Internal helper used to convert grouping sequences from string
* representation into POSIX specified form, i.e.
Index: lib/libc/locale/gb18030.c
===================================================================
--- lib/libc/locale/gb18030.c
+++ lib/libc/locale/gb18030.c
@@ -101,7 +101,7 @@
gs = (_GB18030State *)ps;
- if (gs->count < 0 || gs->count > sizeof(gs->bytes)) {
+ if (gs->count < 0 || (size_t)gs->count > sizeof(gs->bytes)) {
errno = EINVAL;
return ((size_t)-1);
}
Index: lib/libc/locale/gb2312.c
===================================================================
--- lib/libc/locale/gb2312.c
+++ lib/libc/locale/gb2312.c
@@ -118,7 +118,7 @@
gs = (_GB2312State *)ps;
- if (gs->count < 0 || gs->count > sizeof(gs->bytes)) {
+ if (gs->count < 0 || (size_t)gs->count > sizeof(gs->bytes)) {
errno = EINVAL;
return ((size_t)-1);
}
Index: lib/libc/locale/none.c
===================================================================
--- lib/libc/locale/none.c
+++ lib/libc/locale/none.c
@@ -193,25 +193,25 @@
/* setup defaults */
struct xlocale_ctype __xlocale_global_ctype = {
- {{0}, "C"},
- (_RuneLocale*)&_DefaultRuneLocale,
- _none_mbrtowc,
- _none_mbsinit,
- _none_mbsnrtowcs,
- _none_wcrtomb,
- _none_wcsnrtombs,
- 1, /* __mb_cur_max, */
- 256 /* __mb_sb_limit */
+ {.locale = "C"},
+ .runes = (_RuneLocale*)&_DefaultRuneLocale,
+ .__mbrtowc = _none_mbrtowc,
+ .__mbsinit = _none_mbsinit,
+ .__mbsnrtowcs = _none_mbsnrtowcs,
+ .__wcrtomb = _none_wcrtomb,
+ .__wcsnrtombs = _none_wcsnrtombs,
+ .__mb_cur_max = 1,
+ .__mb_sb_limit = 256
};
struct xlocale_ctype __xlocale_C_ctype = {
- {{0}, "C"},
- (_RuneLocale*)&_DefaultRuneLocale,
- _none_mbrtowc,
- _none_mbsinit,
- _none_mbsnrtowcs,
- _none_wcrtomb,
- _none_wcsnrtombs,
- 1, /* __mb_cur_max, */
- 256 /* __mb_sb_limit */
+ {.locale = "C"},
+ .runes = (_RuneLocale*)&_DefaultRuneLocale,
+ .__mbrtowc = _none_mbrtowc,
+ .__mbsinit = _none_mbsinit,
+ .__mbsnrtowcs = _none_mbsnrtowcs,
+ .__wcrtomb = _none_wcrtomb,
+ .__wcsnrtombs = _none_wcsnrtombs,
+ .__mb_cur_max = 1,
+ .__mb_sb_limit = 256
};
Index: lib/libc/locale/rune.c
===================================================================
--- lib/libc/locale/rune.c
+++ lib/libc/locale/rune.c
@@ -56,6 +56,8 @@
#include "runefile.h"
+_RuneLocale * _Read_RuneMagi(const char *fname);
+
_RuneLocale *
_Read_RuneMagi(const char *fname)
{
Index: lib/libc/posix1e/acl_support.h
===================================================================
--- lib/libc/posix1e/acl_support.h
+++ lib/libc/posix1e/acl_support.h
@@ -66,5 +66,6 @@
char *string_skip_whitespace(char *string);
void string_trim_trailing_whitespace(char *string);
int _acl_name_to_id(acl_tag_t tag, char *name, uid_t *id);
+void acl_nfs4_trivial_from_mode_libc(struct acl *aclp, int mode, int canonical_six);
#endif
Index: sys/kern/subr_acl_nfs4.c
===================================================================
--- sys/kern/subr_acl_nfs4.c
+++ sys/kern/subr_acl_nfs4.c
@@ -535,7 +535,8 @@
* more bits, in order to have the owner permission bits
* placed in the three low order bits of amode.
*/
- if (entry->ae_tag == ACL_USER && entry->ae_id == file_owner_id)
+ if (entry->ae_tag == ACL_USER &&
+ entry->ae_id == (uid_t)file_owner_id)
amode = amode >> 3;
if (entry->ae_perm & ACL_READ_DATA) {
@@ -1299,7 +1300,6 @@
return (trivial);
}
-#endif /* _KERNEL */
int
acl_nfs4_check(const struct acl *aclp, int is_directory)
@@ -1369,7 +1369,6 @@
return (0);
}
-#ifdef _KERNEL
static int
acl_nfs4_modload(module_t module, int what, void *arg)
{
Index: sys/sys/acl.h
===================================================================
--- sys/sys/acl.h
+++ sys/sys/acl.h
@@ -280,7 +280,7 @@
#define ACL_OVERRIDE_MASK (S_IRWXU | S_IRWXG | S_IRWXO)
#define ACL_PRESERVE_MASK (~ACL_OVERRIDE_MASK)
-#ifdef _KERNEL
+#if defined(_KERNEL) || defined(_ACL_PRIVATE)
/*
* Filesystem-independent code to move back and forth between POSIX mode and
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Dec 4, 6:37 PM (10 h, 50 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
26619178
Default Alt Text
D30317.diff (22 KB)
Attached To
Mode
D30317: libc: unfinished WARNS=3 work
Attached
Detach File
Event Timeline
Log In to Comment