Module Name: src
Committed By: rillig
Date: Mon Jan 4 01:12:20 UTC 2021
Modified Files:
src/usr.bin/xlint/common: externs.h inittyp.c lint.h lp64.h
Log Message:
lint: revert previous commit, except for the typo
To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/usr.bin/xlint/common/externs.h
cvs rdiff -u -r1.14 -r1.15 src/usr.bin/xlint/common/inittyp.c
cvs rdiff -u -r1.22 -r1.23 src/usr.bin/xlint/common/lint.h
cvs rdiff -u -r1.8 -r1.9 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.11 src/usr.bin/xlint/common/externs.h:1.12
--- src/usr.bin/xlint/common/externs.h:1.11 Mon Jan 4 01:11:01 2021
+++ src/usr.bin/xlint/common/externs.h Mon Jan 4 01:12:20 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: externs.h,v 1.11 2021/01/04 01:11:01 rillig Exp $ */
+/* $NetBSD: externs.h,v 1.12 2021/01/04 01:12:20 rillig Exp $ */
/*
* Copyright (c) 1994, 1995 Jochen Pohl
@@ -74,8 +74,3 @@ 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/inittyp.c
diff -u src/usr.bin/xlint/common/inittyp.c:1.14 src/usr.bin/xlint/common/inittyp.c:1.15
--- src/usr.bin/xlint/common/inittyp.c:1.14 Mon Jan 4 01:11:01 2021
+++ src/usr.bin/xlint/common/inittyp.c Mon Jan 4 01:12:20 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: inittyp.c,v 1.14 2021/01/04 01:11:01 rillig Exp $ */
+/* $NetBSD: inittyp.c,v 1.15 2021/01/04 01:12:20 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.14 2021/01/04 01:11:01 rillig Exp $");
+__RCSID("$NetBSD: inittyp.c,v 1.15 2021/01/04 01:12:20 rillig Exp $");
#endif
#include <limits.h>
@@ -113,10 +113,10 @@ inittyp(void)
1, 1, 0, 1, 1, 0, "__uint128_t" } },
#endif
- { FLOAT, { 32, 4 * CHAR_BIT,
+ { FLOAT, { FLOAT_SIZE, 4 * CHAR_BIT,
FLOAT, FLOAT,
0, 0, 1, 1, 1, 0, "float" } },
- { DOUBLE, { 64, 8 * CHAR_BIT,
+ { DOUBLE, { DOUBLE_SIZE, 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.22 src/usr.bin/xlint/common/lint.h:1.23
--- src/usr.bin/xlint/common/lint.h:1.22 Mon Jan 4 01:11:01 2021
+++ src/usr.bin/xlint/common/lint.h Mon Jan 4 01:12:20 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: lint.h,v 1.22 2021/01/04 01:11:01 rillig Exp $ */
+/* $NetBSD: lint.h,v 1.23 2021/01/04 01:12:20 rillig Exp $ */
/*
* Copyright (c) 1994, 1995 Jochen Pohl
@@ -136,12 +136,4 @@ 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.8 src/usr.bin/xlint/common/lp64.h:1.9
--- src/usr.bin/xlint/common/lp64.h:1.8 Mon Jan 4 01:11:01 2021
+++ src/usr.bin/xlint/common/lp64.h Mon Jan 4 01:12:20 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: lp64.h,v 1.8 2021/01/04 01:11:01 rillig Exp $ */
+/* $NetBSD: lp64.h,v 1.9 2021/01/04 01:12:20 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 32767
-#define TARG_SHRT_MIN (-32768)
-#define TARG_USHRT_MAX 65535
+#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_INT_MAX (2147483647)
+#define TARG_INT_MAX ((int32_t) (((uint32_t) -1) >> 1))
#define TARG_INT_MIN ((-TARG_INT_MAX) - 1)
#define TARG_UINT_MAX ((uint32_t) -1)