summaryrefslogtreecommitdiff
path: root/usr/src/lib
diff options
context:
space:
mode:
Diffstat (limited to 'usr/src/lib')
-rw-r--r--usr/src/lib/libc/inc/lint.h3
-rw-r--r--usr/src/lib/libc/inc/mse.h1
-rw-r--r--usr/src/lib/libc/port/locale/_ctype.h2
-rw-r--r--usr/src/lib/libc/port/locale/iswctype.c12
-rw-r--r--usr/src/lib/libc/port/locale/ldpart.c1
-rw-r--r--usr/src/lib/libc/port/locale/mbftowc.c6
-rw-r--r--usr/src/lib/libc/port/locale/regcomp.c2
-rw-r--r--usr/src/lib/libc/port/locale/regex2.h4
-rw-r--r--usr/src/lib/libc/port/locale/runetype.c2
-rw-r--r--usr/src/lib/libc/port/locale/runetype.h2
-rw-r--r--usr/src/lib/libc/port/locale/strfmon.c4
11 files changed, 22 insertions, 17 deletions
diff --git a/usr/src/lib/libc/inc/lint.h b/usr/src/lib/libc/inc/lint.h
index 99a1d1ab83..ce71e1b68b 100644
--- a/usr/src/lib/libc/inc/lint.h
+++ b/usr/src/lib/libc/inc/lint.h
@@ -31,6 +31,9 @@
extern "C" {
#endif
+/* we need the following to pick up _LP64 */
+#include <sys/feature_tests.h>
+
/*
* We must include "lint.h" as the first #include in all libc source files
* for the purpose of running lint over libc, else lint errors occur due to
diff --git a/usr/src/lib/libc/inc/mse.h b/usr/src/lib/libc/inc/mse.h
index 836407dce1..28ce28b10a 100644
--- a/usr/src/lib/libc/inc/mse.h
+++ b/usr/src/lib/libc/inc/mse.h
@@ -32,6 +32,7 @@
#define _MSE_H
#include "lint.h"
+#include "file64.h"
#include <stdio.h>
#include <wchar.h>
#include <string.h>
diff --git a/usr/src/lib/libc/port/locale/_ctype.h b/usr/src/lib/libc/port/locale/_ctype.h
index 0b286ee6e1..ebf966c608 100644
--- a/usr/src/lib/libc/port/locale/_ctype.h
+++ b/usr/src/lib/libc/port/locale/_ctype.h
@@ -83,6 +83,6 @@
#define _CTYPE_SWM 0xe0000000U /* Mask for screen width data */
#define _CTYPE_SWS 30 /* Bits to shift to get width */
-unsigned long ___runetype(int);
+unsigned int ___runetype(int);
#endif /* !__CTYPE_H_ */
diff --git a/usr/src/lib/libc/port/locale/iswctype.c b/usr/src/lib/libc/port/locale/iswctype.c
index e1be429f46..c50f356f9a 100644
--- a/usr/src/lib/libc/port/locale/iswctype.c
+++ b/usr/src/lib/libc/port/locale/iswctype.c
@@ -57,9 +57,9 @@
*/
static int
-__istype(wint_t c, unsigned long f)
+__istype(wint_t c, unsigned int f)
{
- unsigned long rt;
+ unsigned int rt;
/* Fast path for single byte locales */
if (c < 0 || c >= _CACHED_RUNES)
@@ -70,9 +70,9 @@ __istype(wint_t c, unsigned long f)
}
static int
-__isctype(wint_t c, unsigned long f)
+__isctype(wint_t c, unsigned int f)
{
- unsigned long rt;
+ unsigned int rt;
/* Fast path for single byte locales */
if (c < 0 || c >= _CACHED_RUNES)
@@ -86,14 +86,14 @@ __isctype(wint_t c, unsigned long f)
int
iswctype(wint_t wc, wctype_t class)
{
- return (__istype(wc, (unsigned long)class));
+ return (__istype(wc, class));
}
#undef _iswctype
unsigned
_iswctype(wchar_t wc, int class)
{
- return (__istype((wint_t)wc, (unsigned long)class));
+ return (__istype((wint_t)wc, (unsigned int)class));
}
#undef iswalnum
diff --git a/usr/src/lib/libc/port/locale/ldpart.c b/usr/src/lib/libc/port/locale/ldpart.c
index 01bbd3cf4f..71eadbaa9a 100644
--- a/usr/src/lib/libc/port/locale/ldpart.c
+++ b/usr/src/lib/libc/port/locale/ldpart.c
@@ -30,6 +30,7 @@
*/
#include "lint.h"
+#include "file64.h"
#include <sys/types.h>
#include <sys/stat.h>
#include <errno.h>
diff --git a/usr/src/lib/libc/port/locale/mbftowc.c b/usr/src/lib/libc/port/locale/mbftowc.c
index 4f5a41a994..ed6514c406 100644
--- a/usr/src/lib/libc/port/locale/mbftowc.c
+++ b/usr/src/lib/libc/port/locale/mbftowc.c
@@ -51,7 +51,7 @@ _mbftowc(char *s, wchar_t *wc, int (*peek)(void), int *errorc)
int c;
mbstate_t mbs;
char *start = s;
- int cons = 0;
+ size_t cons = 0;
for (;;) {
c = peek();
@@ -65,11 +65,11 @@ _mbftowc(char *s, wchar_t *wc, int (*peek)(void), int *errorc)
(void) memset(&mbs, 0, sizeof (mbs));
cons = mbrtowc(wc, start, s - start, &mbs);
- if (cons >= 0) {
+ if ((int)cons >= 0) {
/* fully translated character */
return (cons);
}
- if (cons == -2) {
+ if (cons == (size_t)-2) {
/* incomplete, recycle */
continue;
}
diff --git a/usr/src/lib/libc/port/locale/regcomp.c b/usr/src/lib/libc/port/locale/regcomp.c
index 324609b19c..0424234d39 100644
--- a/usr/src/lib/libc/port/locale/regcomp.c
+++ b/usr/src/lib/libc/port/locale/regcomp.c
@@ -1282,7 +1282,7 @@ doinsert(struct parse *p, sop op, size_t opnd, sopno pos)
}
}
- memmove((char *)&p->strip[pos+1], (char *)&p->strip[pos],
+ (void) memmove((char *)&p->strip[pos+1], (char *)&p->strip[pos],
(HERE()-pos-1)*sizeof (sop));
p->strip[pos] = s;
}
diff --git a/usr/src/lib/libc/port/locale/regex2.h b/usr/src/lib/libc/port/locale/regex2.h
index 1393386c0d..f44e1caeef 100644
--- a/usr/src/lib/libc/port/locale/regex2.h
+++ b/usr/src/lib/libc/port/locale/regex2.h
@@ -72,8 +72,8 @@
* In state representations, an operator's bit is on to signify a state
* immediately *preceding* "execution" of that operator.
*/
-typedef unsigned long sop; /* strip operator */
-typedef long sopno;
+typedef unsigned int sop; /* strip operator */
+typedef int sopno;
#define OPRMASK 0xf8000000U
#define OPDMASK 0x07ffffffU
#define OPSHIFT ((unsigned)27)
diff --git a/usr/src/lib/libc/port/locale/runetype.c b/usr/src/lib/libc/port/locale/runetype.c
index d8018e6a22..f79c73f4a7 100644
--- a/usr/src/lib/libc/port/locale/runetype.c
+++ b/usr/src/lib/libc/port/locale/runetype.c
@@ -40,7 +40,7 @@
#include <stdio.h>
#include "runetype.h"
-unsigned long
+unsigned int
___runetype(__ct_rune_t c)
{
size_t lim;
diff --git a/usr/src/lib/libc/port/locale/runetype.h b/usr/src/lib/libc/port/locale/runetype.h
index e55860c4c8..d638a06fcb 100644
--- a/usr/src/lib/libc/port/locale/runetype.h
+++ b/usr/src/lib/libc/port/locale/runetype.h
@@ -104,7 +104,7 @@ typedef struct {
__rune_t __min; /* First rune of the range */
__rune_t __max; /* Last rune (inclusive) of the range */
__rune_t __map; /* What first maps to in maps */
- unsigned long *__types; /* Array of types in range */
+ unsigned *__types; /* Array of types in range */
} _RuneEntry;
typedef struct {
diff --git a/usr/src/lib/libc/port/locale/strfmon.c b/usr/src/lib/libc/port/locale/strfmon.c
index 456c595a41..d49d2ba3a1 100644
--- a/usr/src/lib/libc/port/locale/strfmon.c
+++ b/usr/src/lib/libc/port/locale/strfmon.c
@@ -377,7 +377,7 @@ strfmon(char *_RESTRICT_KYWD s, size_t maxsize,
PRINT(' ');
} else {
pad_size = dst-tmpptr;
- memmove(tmpptr + width-pad_size, tmpptr,
+ (void) memmove(tmpptr + width-pad_size, tmpptr,
pad_size);
(void) memset(tmpptr, ' ', width-pad_size);
dst += width-pad_size;
@@ -620,7 +620,7 @@ __format_grouped_double(double value, int *flags,
}
bufsize = bufsize - (bufend - rslt) + 1;
- memmove(rslt, bufend, bufsize);
+ (void) memmove(rslt, bufend, bufsize);
free(avalue);
return (rslt);
}