Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/xlint/lint1 lint: move GCC builtins into gcc_builtins
details: https://anonhg.NetBSD.org/src/rev/1bc026bde381
branches: trunk
changeset: 1022984:1bc026bde381
user: rillig <rillig%NetBSD.org@localhost>
date: Tue Aug 17 21:05:34 2021 +0000
description:
lint: move GCC builtins into gcc_builtins
No functional change.
diffstat:
usr.bin/xlint/lint1/main1.c | 21 ++++++++++-----------
1 files changed, 10 insertions(+), 11 deletions(-)
diffs (58 lines):
diff -r bdb0bdcb0c63 -r 1bc026bde381 usr.bin/xlint/lint1/main1.c
--- a/usr.bin/xlint/lint1/main1.c Tue Aug 17 17:31:58 2021 +0000
+++ b/usr.bin/xlint/lint1/main1.c Tue Aug 17 21:05:34 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: main1.c,v 1.53 2021/08/01 19:11:54 rillig Exp $ */
+/* $NetBSD: main1.c,v 1.54 2021/08/17 21:05:34 rillig Exp $ */
/*
* Copyright (c) 1994, 1995 Jochen Pohl
@@ -37,7 +37,7 @@
#include <sys/cdefs.h>
#if defined(__RCSID) && !defined(lint)
-__RCSID("$NetBSD: main1.c,v 1.53 2021/08/01 19:11:54 rillig Exp $");
+__RCSID("$NetBSD: main1.c,v 1.54 2021/08/17 21:05:34 rillig Exp $");
#endif
#include <sys/types.h>
@@ -130,16 +130,15 @@
static void usage(void);
-static const char builtins[] =
- "int __builtin_isinf(long double);\n"
- "int __builtin_isnan(long double);\n"
- "int __builtin_copysign(long double, long double);\n"
-;
-static const size_t builtinlen = sizeof(builtins) - 1;
-
static FILE *
gcc_builtins(void)
{
+ static const char builtins[] =
+ "int __builtin_isinf(long double);\n"
+ "int __builtin_isnan(long double);\n"
+ "int __builtin_copysign(long double, long double);\n";
+ size_t builtins_len = sizeof(builtins) - 1;
+
#if HAVE_NBTOOL_CONFIG_H
char template[] = "/tmp/lint.XXXXXX";
int fd;
@@ -151,14 +150,14 @@
close(fd);
return NULL;
}
- if (fwrite(builtins, 1, builtinlen, fp) != builtinlen) {
+ if (fwrite(builtins, 1, builtins_len, fp) != builtins_len) {
fclose(fp);
return NULL;
}
rewind(fp);
return fp;
#else
- return fmemopen(__UNCONST(builtins), builtinlen, "r");
+ return fmemopen(__UNCONST(builtins), builtins_len, "r");
#endif
}
Home |
Main Index |
Thread Index |
Old Index