Module Name: src
Committed By: rillig
Date: Mon Jan 4 01:11:01 UTC 2021
Modified Files:
src/usr.bin/xlint/common: externs.h ilp32.h inittyp.c lint.h lp64.h
Log Message:
lint: fix typo in comment
To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/usr.bin/xlint/common/externs.h
cvs rdiff -u -r1.3 -r1.4 src/usr.bin/xlint/common/ilp32.h
cvs rdiff -u -r1.13 -r1.14 src/usr.bin/xlint/common/inittyp.c
cvs rdiff -u -r1.21 -r1.22 src/usr.bin/xlint/common/lint.h
cvs rdiff -u -r1.7 -r1.8 src/usr.bin/xlint/common/lp64.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/usr.bin/xlint/common/externs.h
diff -u src/usr.bin/xlint/common/externs.h:1.10 src/usr.bin/xlint/common/externs.h:1.11
--- src/usr.bin/xlint/common/externs.h:1.10 Sat Jan 2 03:49:25 2021
+++ src/usr.bin/xlint/common/externs.h Mon Jan 4 01:11:01 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: externs.h,v 1.10 2021/01/02 03:49:25 rillig Exp $ */
+/* $NetBSD: externs.h,v 1.11 2021/01/04 01:11:01 rillig Exp $ */
/*
* Copyright (c) 1994, 1995 Jochen Pohl
@@ -74,3 +74,8 @@ extern void outint(int);
#define outname(a) outname1(__FILE__, __LINE__, a);
extern void outname1(const char *, size_t, const char *);
extern void outsrc(const char *);
+
+/*
+ * platforms.c
+ */
+extern const target_platform *platform(void);
Index: src/usr.bin/xlint/common/ilp32.h
diff -u src/usr.bin/xlint/common/ilp32.h:1.3 src/usr.bin/xlint/common/ilp32.h:1.4
--- src/usr.bin/xlint/common/ilp32.h:1.3 Tue Mar 27 19:24:03 2012
+++ src/usr.bin/xlint/common/ilp32.h Mon Jan 4 01:11:01 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: ilp32.h,v 1.3 2012/03/27 19:24:03 christos Exp $ */
+/* $NetBSD: ilp32.h,v 1.4 2021/01/04 01:11:01 rillig Exp $ */
/*
* Copyright (c) 2001 Wasabi Systems, Inc.
@@ -36,7 +36,7 @@
*/
/*
- * Type sizes for IPL32 platforms (int, long, pointer: 32-bit)
+ * Type sizes for ILP32 platforms (int, long, pointer: 32-bit)
*/
#define CHAR_SIZE (CHAR_BIT)
Index: src/usr.bin/xlint/common/inittyp.c
diff -u src/usr.bin/xlint/common/inittyp.c:1.13 src/usr.bin/xlint/common/inittyp.c:1.14
--- src/usr.bin/xlint/common/inittyp.c:1.13 Wed Dec 30 11:39:55 2020
+++ src/usr.bin/xlint/common/inittyp.c Mon Jan 4 01:11:01 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: inittyp.c,v 1.13 2020/12/30 11:39:55 rillig Exp $ */
+/* $NetBSD: inittyp.c,v 1.14 2021/01/04 01:11:01 rillig Exp $ */
/*
* Copyright (c) 1994, 1995 Jochen Pohl
@@ -37,7 +37,7 @@
#include <sys/cdefs.h>
#if defined(__RCSID) && !defined(lint)
-__RCSID("$NetBSD: inittyp.c,v 1.13 2020/12/30 11:39:55 rillig Exp $");
+__RCSID("$NetBSD: inittyp.c,v 1.14 2021/01/04 01:11:01 rillig Exp $");
#endif
#include <limits.h>
@@ -113,10 +113,10 @@ inittyp(void)
1, 1, 0, 1, 1, 0, "__uint128_t" } },
#endif
- { FLOAT, { FLOAT_SIZE, 4 * CHAR_BIT,
+ { FLOAT, { 32, 4 * CHAR_BIT,
FLOAT, FLOAT,
0, 0, 1, 1, 1, 0, "float" } },
- { DOUBLE, { DOUBLE_SIZE, 8 * CHAR_BIT,
+ { DOUBLE, { 64, 8 * CHAR_BIT,
DOUBLE, DOUBLE,
0, 0, 1, 1, 1, 0, "double" } },
{ LDOUBLE, { LDOUBLE_SIZE, 10 * CHAR_BIT,
Index: src/usr.bin/xlint/common/lint.h
diff -u src/usr.bin/xlint/common/lint.h:1.21 src/usr.bin/xlint/common/lint.h:1.22
--- src/usr.bin/xlint/common/lint.h:1.21 Sat Jan 2 01:06:15 2021
+++ src/usr.bin/xlint/common/lint.h Mon Jan 4 01:11:01 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: lint.h,v 1.21 2021/01/02 01:06:15 rillig Exp $ */
+/* $NetBSD: lint.h,v 1.22 2021/01/04 01:11:01 rillig Exp $ */
/*
* Copyright (c) 1994, 1995 Jochen Pohl
@@ -136,4 +136,12 @@ typedef struct ob {
typedef struct type type_t;
+typedef struct target_platform {
+ const char *pl_name;
+ tspec_t pl_char_type;
+ size_t pl_long_pointer_size;
+ tspec_t pl_intptr_type; /* either INT or LONG */
+ size_t pl_sizeof_long_double; /* either 8, 12 or 16 */
+} target_platform;
+
#include "externs.h"
Index: src/usr.bin/xlint/common/lp64.h
diff -u src/usr.bin/xlint/common/lp64.h:1.7 src/usr.bin/xlint/common/lp64.h:1.8
--- src/usr.bin/xlint/common/lp64.h:1.7 Fri Nov 16 20:49:08 2018
+++ src/usr.bin/xlint/common/lp64.h Mon Jan 4 01:11:01 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: lp64.h,v 1.7 2018/11/16 20:49:08 scole Exp $ */
+/* $NetBSD: lp64.h,v 1.8 2021/01/04 01:11:01 rillig Exp $ */
/*
* Copyright (c) 2001 Wasabi Systems, Inc.
@@ -53,11 +53,11 @@
#define TARG_SCHAR_MIN ((-TARG_CHAR_MAX) - 1)
#define TARG_UCHAR_MAX ((unsigned char) -1)
-#define TARG_SHRT_MAX ((int16_t) (((uint16_t) -1) >> 1))
-#define TARG_SHRT_MIN ((-TARG_SHRT_MAX) - 1)
-#define TARG_USHRT_MAX ((uint16_t) -1)
+#define TARG_SHRT_MAX 32767
+#define TARG_SHRT_MIN (-32768)
+#define TARG_USHRT_MAX 65535
-#define TARG_INT_MAX ((int32_t) (((uint32_t) -1) >> 1))
+#define TARG_INT_MAX (2147483647)
#define TARG_INT_MIN ((-TARG_INT_MAX) - 1)
#define TARG_UINT_MAX ((uint32_t) -1)