Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/xlint/common lint: revert previous commit, except fo...
details: https://anonhg.NetBSD.org/src/rev/5929321d0112
branches: trunk
changeset: 979637:5929321d0112
user: rillig <rillig%NetBSD.org@localhost>
date: Mon Jan 04 01:12:20 2021 +0000
description:
lint: revert previous commit, except for the typo
diffstat:
usr.bin/xlint/common/externs.h | 7 +------
usr.bin/xlint/common/inittyp.c | 8 ++++----
usr.bin/xlint/common/lint.h | 10 +---------
usr.bin/xlint/common/lp64.h | 10 +++++-----
4 files changed, 11 insertions(+), 24 deletions(-)
diffs (96 lines):
diff -r f562a9183205 -r 5929321d0112 usr.bin/xlint/common/externs.h
--- a/usr.bin/xlint/common/externs.h Mon Jan 04 01:11:01 2021 +0000
+++ b/usr.bin/xlint/common/externs.h Mon Jan 04 01:12:20 2021 +0000
@@ -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 @@
#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);
diff -r f562a9183205 -r 5929321d0112 usr.bin/xlint/common/inittyp.c
--- a/usr.bin/xlint/common/inittyp.c Mon Jan 04 01:11:01 2021 +0000
+++ b/usr.bin/xlint/common/inittyp.c Mon Jan 04 01:12:20 2021 +0000
@@ -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 @@
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,
diff -r f562a9183205 -r 5929321d0112 usr.bin/xlint/common/lint.h
--- a/usr.bin/xlint/common/lint.h Mon Jan 04 01:11:01 2021 +0000
+++ b/usr.bin/xlint/common/lint.h Mon Jan 04 01:12:20 2021 +0000
@@ -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 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"
diff -r f562a9183205 -r 5929321d0112 usr.bin/xlint/common/lp64.h
--- a/usr.bin/xlint/common/lp64.h Mon Jan 04 01:11:01 2021 +0000
+++ b/usr.bin/xlint/common/lp64.h Mon Jan 04 01:12:20 2021 +0000
@@ -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)
Home |
Main Index |
Thread Index |
Old Index