From owner-svn-src-head@freebsd.org Thu Nov 23 11:40:19 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 09A68DE8948; Thu, 23 Nov 2017 11:40:19 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C8A616778E; Thu, 23 Nov 2017 11:40:18 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vANBeHp0065190; Thu, 23 Nov 2017 11:40:17 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vANBeG9b065176; Thu, 23 Nov 2017 11:40:16 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201711231140.vANBeG9b065176@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 23 Nov 2017 11:40:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326123 - in head: include sys/amd64/include sys/i386/include sys/sys sys/x86/include X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: in head: include sys/amd64/include sys/i386/include sys/sys sys/x86/include X-SVN-Commit-Revision: 326123 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Nov 2017 11:40:19 -0000 Author: kib Date: Thu Nov 23 11:40:16 2017 New Revision: 326123 URL: https://svnweb.freebsd.org/changeset/base/326123 Log: Remove lint support from system headers and MD x86 headers. Reviewed by: dim, jhb Discussed with: imp Sponsored by: The FreeBSD Foundation Differential revision: https://reviews.freebsd.org/D13156 Modified: head/include/stdlib.h head/sys/amd64/include/asm.h head/sys/amd64/include/pcpu.h head/sys/amd64/include/profile.h head/sys/i386/include/asm.h head/sys/i386/include/pcpu.h head/sys/i386/include/profile.h head/sys/sys/cdefs.h head/sys/sys/linker_set.h head/sys/sys/param.h head/sys/x86/include/_types.h head/sys/x86/include/bus.h head/sys/x86/include/stdarg.h head/sys/x86/include/ucontext.h Modified: head/include/stdlib.h ============================================================================== --- head/include/stdlib.h Thu Nov 23 11:25:11 2017 (r326122) +++ head/include/stdlib.h Thu Nov 23 11:40:16 2017 (r326123) @@ -238,17 +238,13 @@ extern void (*malloc_message)(void *, const char *); /* * The alloca() function can't be implemented in C, and on some * platforms it can't be implemented at all as a callable function. - * The GNU C compiler provides a built-in alloca() which we can use; - * in all other cases, provide a prototype, mainly to pacify various - * incarnations of lint. On platforms where alloca() is not in libc, - * programs which use it will fail to link when compiled with non-GNU - * compilers. + * The GNU C compiler provides a built-in alloca() which we can use. + * On platforms where alloca() is not in libc, programs which use it + * will fail to link when compiled with non-GNU compilers. */ #if __GNUC__ >= 2 || defined(__INTEL_COMPILER) #undef alloca /* some GNU bits try to get cute and define this on their own */ #define alloca(sz) __builtin_alloca(sz) -#elif defined(lint) -void *alloca(size_t); #endif void abort2(const char *, int, void **) __dead2; Modified: head/sys/amd64/include/asm.h ============================================================================== --- head/sys/amd64/include/asm.h Thu Nov 23 11:25:11 2017 (r326122) +++ head/sys/amd64/include/asm.h Thu Nov 23 11:40:16 2017 (r326123) @@ -92,10 +92,10 @@ #define RCSID(x) .text; .asciz x #undef __FBSDID -#if !defined(lint) && !defined(STRIP_FBSDID) +#if !defined(STRIP_FBSDID) #define __FBSDID(s) .ident s #else #define __FBSDID(s) /* nothing */ -#endif /* not lint and not STRIP_FBSDID */ +#endif /* !STRIP_FBSDID */ #endif /* !_MACHINE_ASM_H_ */ Modified: head/sys/amd64/include/pcpu.h ============================================================================== --- head/sys/amd64/include/pcpu.h Thu Nov 23 11:25:11 2017 (r326122) +++ head/sys/amd64/include/pcpu.h Thu Nov 23 11:40:16 2017 (r326123) @@ -74,19 +74,8 @@ #ifdef _KERNEL -#ifdef lint +#if defined(__GNUCLIKE_ASM) && defined(__GNUCLIKE___TYPEOF) -extern struct pcpu *pcpup; - -#define get_pcpu() (pcpup) -#define PCPU_GET(member) (pcpup->pc_ ## member) -#define PCPU_ADD(member, val) (pcpup->pc_ ## member += (val)) -#define PCPU_INC(member) PCPU_ADD(member, 1) -#define PCPU_PTR(member) (&pcpup->pc_ ## member) -#define PCPU_SET(member, val) (pcpup->pc_ ## member = (val)) - -#elif defined(__GNUCLIKE_ASM) && defined(__GNUCLIKE___TYPEOF) - /* * Evaluates to the byte offset of the per-cpu variable name. */ @@ -251,11 +240,11 @@ __curpcb(void) #define IS_BSP() (PCPU_GET(cpuid) == 0) -#else /* !lint || defined(__GNUCLIKE_ASM) && defined(__GNUCLIKE___TYPEOF) */ +#else /* !__GNUCLIKE_ASM || !__GNUCLIKE___TYPEOF */ #error "this file needs to be ported to your compiler" -#endif /* lint, etc. */ +#endif /* __GNUCLIKE_ASM && __GNUCLIKE___TYPEOF */ #endif /* _KERNEL */ Modified: head/sys/amd64/include/profile.h ============================================================================== --- head/sys/amd64/include/profile.h Thu Nov 23 11:25:11 2017 (r326122) +++ head/sys/amd64/include/profile.h Thu Nov 23 11:40:16 2017 (r326123) @@ -71,10 +71,6 @@ : "ax", "dx", "cx", "di", "si", "r8", "r9", "memory") #define MEXITCOUNT_OVERHEAD_GETLABEL(labelp) \ __asm __volatile("movq $1b,%0" : "=rm" (labelp)) -#elif defined(lint) -#define MCOUNT_OVERHEAD(label) -#define MEXITCOUNT_OVERHEAD() -#define MEXITCOUNT_OVERHEAD_GETLABEL() #else #error this file needs to be ported to your compiler #endif /* !__GNUCLIKE_ASM */ Modified: head/sys/i386/include/asm.h ============================================================================== --- head/sys/i386/include/asm.h Thu Nov 23 11:25:11 2017 (r326122) +++ head/sys/i386/include/asm.h Thu Nov 23 11:40:16 2017 (r326123) @@ -113,10 +113,10 @@ #define RCSID(x) .text; .asciz x #undef __FBSDID -#if !defined(lint) && !defined(STRIP_FBSDID) +#if !defined(STRIP_FBSDID) #define __FBSDID(s) .ident s #else #define __FBSDID(s) /* nothing */ -#endif /* not lint and not STRIP_FBSDID */ +#endif /* not STRIP_FBSDID */ #endif /* !_MACHINE_ASM_H_ */ Modified: head/sys/i386/include/pcpu.h ============================================================================== --- head/sys/i386/include/pcpu.h Thu Nov 23 11:25:11 2017 (r326122) +++ head/sys/i386/include/pcpu.h Thu Nov 23 11:40:16 2017 (r326123) @@ -72,19 +72,8 @@ #ifdef _KERNEL -#ifdef lint +#if defined(__GNUCLIKE_ASM) && defined(__GNUCLIKE___TYPEOF) -extern struct pcpu *pcpup; - -#define get_pcpu() (pcpup) -#define PCPU_GET(member) (pcpup->pc_ ## member) -#define PCPU_ADD(member, val) (pcpup->pc_ ## member += (val)) -#define PCPU_INC(member) PCPU_ADD(member, 1) -#define PCPU_PTR(member) (&pcpup->pc_ ## member) -#define PCPU_SET(member, val) (pcpup->pc_ ## member = (val)) - -#elif defined(__GNUCLIKE_ASM) && defined(__GNUCLIKE___TYPEOF) - /* * Evaluates to the byte offset of the per-cpu variable name. */ @@ -242,11 +231,11 @@ __curpcb(void) } #define curpcb (__curpcb()) -#else /* !lint || defined(__GNUCLIKE_ASM) && defined(__GNUCLIKE___TYPEOF) */ +#else /* defined(__GNUCLIKE_ASM) && defined(__GNUCLIKE___TYPEOF) */ #error "this file needs to be ported to your compiler" -#endif /* lint, etc. */ +#endif /* __GNUCLIKE_ASM etc. */ #endif /* _KERNEL */ Modified: head/sys/i386/include/profile.h ============================================================================== --- head/sys/i386/include/profile.h Thu Nov 23 11:25:11 2017 (r326122) +++ head/sys/i386/include/profile.h Thu Nov 23 11:40:16 2017 (r326123) @@ -71,10 +71,6 @@ : "ax", "dx", "cx", "memory") #define MEXITCOUNT_OVERHEAD_GETLABEL(labelp) \ __asm __volatile("movl $1b,%0" : "=rm" (labelp)) -#elif defined(lint) -#define MCOUNT_OVERHEAD(label) -#define MEXITCOUNT_OVERHEAD() -#define MEXITCOUNT_OVERHEAD_GETLABEL() #else #error #endif /* !__GNUCLIKE_ASM */ Modified: head/sys/sys/cdefs.h ============================================================================== --- head/sys/sys/cdefs.h Thu Nov 23 11:25:11 2017 (r326122) +++ head/sys/sys/cdefs.h Thu Nov 23 11:40:16 2017 (r326123) @@ -207,17 +207,6 @@ * for a given compiler, let the compile fail if it is told to use * a feature that we cannot live without. */ -#ifdef lint -#define __dead2 -#define __pure2 -#define __unused -#define __packed -#define __aligned(x) -#define __alloc_align(x) -#define __alloc_size(x) -#define __section(x) -#define __weak_symbol -#else #define __weak_symbol __attribute__((__weak__)) #if !__GNUC_PREREQ__(2, 5) && !defined(__INTEL_COMPILER) #define __dead2 @@ -249,7 +238,6 @@ #else #define __alloc_align(x) #endif -#endif /* lint */ #if !__GNUC_PREREQ__(2, 95) #define __alignof(x) __offsetof(struct { char __a; x __b; }, __b) @@ -259,7 +247,7 @@ * Keywords added in C11. */ -#if !defined(__STDC_VERSION__) || __STDC_VERSION__ < 201112L || defined(lint) +#if !defined(__STDC_VERSION__) || __STDC_VERSION__ < 201112L #if !__has_extension(c_alignas) #if (defined(__cplusplus) && __cplusplus >= 201103L) || \ @@ -425,7 +413,7 @@ * software that is unaware of C99 keywords. */ #if !(__GNUC__ == 2 && __GNUC_MINOR__ == 95) -#if !defined(__STDC_VERSION__) || __STDC_VERSION__ < 199901 || defined(lint) +#if !defined(__STDC_VERSION__) || __STDC_VERSION__ < 199901 #define __restrict #else #define __restrict restrict @@ -819,7 +807,7 @@ */ #if __has_attribute(__argument_with_type_tag__) && \ - __has_attribute(__type_tag_for_datatype__) && !defined(lint) + __has_attribute(__type_tag_for_datatype__) #define __arg_type_tag(arg_kind, arg_idx, type_tag_idx) \ __attribute__((__argument_with_type_tag__(arg_kind, arg_idx, type_tag_idx))) #define __datatype_type_tag(kind, type) \ Modified: head/sys/sys/linker_set.h ============================================================================== --- head/sys/sys/linker_set.h Thu Nov 23 11:25:11 2017 (r326122) +++ head/sys/sys/linker_set.h Thu Nov 23 11:40:16 2017 (r326123) @@ -61,10 +61,7 @@ __set_##set##_sym_##sym __section("set_" #set) \ __used = &(sym) #else /* !__GNUCLIKE___SECTION */ -#ifndef lint #error this file needs to be ported to your compiler -#endif /* lint */ -#define __MAKE_SET(set, sym) extern void const * const (__set_##set##_sym_##sym) #endif /* __GNUCLIKE___SECTION */ /* Modified: head/sys/sys/param.h ============================================================================== --- head/sys/sys/param.h Thu Nov 23 11:25:11 2017 (r326122) +++ head/sys/sys/param.h Thu Nov 23 11:40:16 2017 (r326123) @@ -321,7 +321,6 @@ __END_DECLS #endif #endif -#ifndef lint #ifndef _BYTEORDER_FUNC_DEFINED #define _BYTEORDER_FUNC_DEFINED #define htonl(x) __htonl(x) @@ -329,7 +328,6 @@ __END_DECLS #define ntohl(x) __ntohl(x) #define ntohs(x) __ntohs(x) #endif /* !_BYTEORDER_FUNC_DEFINED */ -#endif /* lint */ #endif /* _KERNEL */ /* Modified: head/sys/x86/include/_types.h ============================================================================== --- head/sys/x86/include/_types.h Thu Nov 23 11:25:11 2017 (r326122) +++ head/sys/x86/include/_types.h Thu Nov 23 11:40:16 2017 (r326123) @@ -62,15 +62,9 @@ typedef unsigned int __uint32_t; typedef long __int64_t; typedef unsigned long __uint64_t; #else -#ifndef lint __extension__ -#endif -/* LONGLONG */ typedef long long __int64_t; -#ifndef lint __extension__ -#endif -/* LONGLONG */ typedef unsigned long long __uint64_t; #endif Modified: head/sys/x86/include/bus.h ============================================================================== --- head/sys/x86/include/bus.h Thu Nov 23 11:25:11 2017 (r326122) +++ head/sys/x86/include/bus.h Thu Nov 23 11:40:16 2017 (r326123) @@ -101,9 +101,7 @@ #include #ifndef __GNUCLIKE_ASM -# ifndef lint -# error "no assembler code for your compiler" -# endif +#error "no assembler code for your compiler" #endif /* Modified: head/sys/x86/include/stdarg.h ============================================================================== --- head/sys/x86/include/stdarg.h Thu Nov 23 11:25:11 2017 (r326122) +++ head/sys/x86/include/stdarg.h Thu Nov 23 11:40:16 2017 (r326123) @@ -60,18 +60,6 @@ typedef __va_list va_list; #define va_end(ap) \ __builtin_va_end(ap) -#elif defined(lint) -/* Provide a fake implementation for lint's benefit */ -#define __va_size(type) \ - (((sizeof(type) + sizeof(long) - 1) / sizeof(long)) * sizeof(long)) -#define va_start(ap, last) \ - ((ap) = (va_list)&(last) + __va_size(last)) -#define va_copy(dst, src) \ - ((dst) = (src)) -#define va_arg(ap, type) \ - (*(type *)((ap) += __va_size(type), (ap) - __va_size(type))) -#define va_end(ap) - #else #error this file needs to be ported to your compiler #endif Modified: head/sys/x86/include/ucontext.h ============================================================================== --- head/sys/x86/include/ucontext.h Thu Nov 23 11:25:11 2017 (r326122) +++ head/sys/x86/include/ucontext.h Thu Nov 23 11:40:16 2017 (r326123) @@ -162,9 +162,4 @@ typedef struct __mcontext { } mcontext_t; #endif /* __amd64__ */ -#ifdef __LINT__ -typedef struct __mcontext { -} mcontext_t; -#endif /* __LINT__ */ - #endif /* !_X86_UCONTEXT_H_ */