Commit c0891ac1 authored by Alexey Dobriyan's avatar Alexey Dobriyan Committed by Masahiro Yamada

isystem: ship and use stdarg.h

Ship minimal stdarg.h (1 type, 4 macros) as <linux/stdarg.h>.
stdarg.h is the only userspace header commonly used in the kernel.

GPL 2 version of <stdarg.h> can be extracted from
http://archive.debian.org/debian/pool/main/g/gcc-4.2/gcc-4.2_4.2.4.orig.tar.gzSigned-off-by: default avatarAlexey Dobriyan <adobriyan@gmail.com>
Acked-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
Acked-by: default avatarArd Biesheuvel <ardb@kernel.org>
Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
parent 39f75da7
......@@ -51,7 +51,7 @@
* prumpf 991016
*/
#include <stdarg.h>
#include <linux/stdarg.h>
#include <linux/delay.h>
#include <linux/init.h>
......
......@@ -14,7 +14,7 @@
/* we cannot use FORTIFY as it brings in new symbols */
#define __NO_FORTIFY
#include <stdarg.h>
#include <linux/stdarg.h>
#include <linux/kernel.h>
#include <linux/string.h>
#include <linux/init.h>
......
......@@ -7,7 +7,7 @@
* Copyright (C) 2001 IBM.
*/
#include <stdarg.h>
#include <linux/stdarg.h>
#include <linux/kernel.h>
#include <linux/types.h>
#include <linux/spinlock.h>
......
......@@ -5,7 +5,7 @@
* c 2001 PPC 64 Team, IBM Corp
*/
#include <stdarg.h>
#include <linux/stdarg.h>
#include <linux/types.h>
#include <linux/sched.h>
#include <linux/console.h>
......
// SPDX-License-Identifier: GPL-2.0
#include <linux/kernel.h>
#include <linux/stdarg.h>
#include <linux/string.h>
#include <linux/ctype.h>
#include <asm/stacktrace.h>
......@@ -8,7 +9,6 @@
#include <asm/setup.h>
#include <asm/sclp.h>
#include <asm/uv.h>
#include <stdarg.h>
#include "boot.h"
const char hex_asc[] = "0123456789abcdef";
......
......@@ -18,7 +18,7 @@
#ifndef __ASSEMBLY__
#include <stdarg.h>
#include <linux/stdarg.h>
#include <linux/types.h>
#include <linux/edd.h>
#include <asm/setup.h>
......
......@@ -7,7 +7,7 @@
* Copyright 2011 Intel Corporation; author Matt Fleming
*/
#include <stdarg.h>
#include <linux/stdarg.h>
#include <linux/ctype.h>
#include <linux/efi.h>
......
......@@ -10,7 +10,7 @@
* Oh, it's a waste of space, but oh-so-yummy for debugging.
*/
#include <stdarg.h>
#include <linux/stdarg.h>
#include <linux/compiler.h>
#include <linux/ctype.h>
......
......@@ -28,9 +28,9 @@
*/
#include <linux/delay.h>
#include <linux/stdarg.h>
#include "dm_services.h"
#include <stdarg.h>
#include "dc.h"
#include "dc_dmub_srv.h"
......
......@@ -25,7 +25,7 @@
#define DEBUG /* for pr_debug() */
#include <stdarg.h>
#include <linux/stdarg.h>
#include <linux/io.h>
#include <linux/moduleparam.h>
......
......@@ -379,7 +379,7 @@ static char *pnames[] =
/*2f */ "Useruserdata"
};
#include <stdarg.h>
#include <linux/stdarg.h>
/*-------------------------------------------------------*/
static _cdebbuf *bufprint(_cdebbuf *cdb, char *fmt, ...)
......
......@@ -9,7 +9,7 @@
*
* Copyright (C) 1996 Paul Mackerras.
*/
#include <stdarg.h>
#include <linux/stdarg.h>
#include <linux/types.h>
#include <linux/errno.h>
#include <linux/kernel.h>
......
......@@ -18,7 +18,7 @@
* a sleep or a freq. switch
*
*/
#include <stdarg.h>
#include <linux/stdarg.h>
#include <linux/mutex.h>
#include <linux/types.h>
#include <linux/errno.h>
......
......@@ -16,7 +16,7 @@
#ifndef __PRINT_SUPPORT_H_INCLUDED__
#define __PRINT_SUPPORT_H_INCLUDED__
#include <stdarg.h>
#include <linux/stdarg.h>
extern int (*sh_css_printf)(const char *fmt, va_list args);
/* depends on host supplied print function in ia_css_init() */
......
......@@ -17,7 +17,7 @@
#define __IA_CSS_ENV_H
#include <type_support.h>
#include <stdarg.h> /* va_list */
#include <linux/stdarg.h> /* va_list */
#include "ia_css_types.h"
#include "ia_css_acc_types.h"
......
......@@ -19,7 +19,7 @@
/*! \file */
#include <type_support.h>
#include <stdarg.h>
#include <linux/stdarg.h>
#include "ia_css_types.h"
#include "ia_css_binary.h"
#include "ia_css_frame_public.h"
......
......@@ -20,7 +20,7 @@
#include <math_support.h>
#include <type_support.h>
#include <platform_support.h>
#include <stdarg.h>
#include <linux/stdarg.h>
#if !defined(ISP2401)
#include "input_formatter.h"
......
......@@ -14,7 +14,7 @@
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
#ifdef __KERNEL__
#include <stdarg.h>
#include <linux/stdarg.h>
#include <linux/string.h>
#include <linux/spinlock.h>
#include <linux/kernel.h>
......
......@@ -8,7 +8,7 @@
#include <linux/string.h>
#include <linux/buffer_head.h>
#include <stdarg.h>
#include <linux/stdarg.h>
static char error_buf[1024];
static char fmt_buf[1024];
......
......@@ -70,7 +70,7 @@
#include <linux/module.h>
#include <linux/bitops.h>
#include <stdarg.h>
#include <linux/stdarg.h>
#include <linux/uaccess.h>
......
......@@ -22,7 +22,7 @@ typedef __builtin_va_list va_list;
#define va_arg(v, l) __builtin_va_arg(v, l)
#define va_copy(d, s) __builtin_va_copy(d, s)
#else
#include <stdarg.h>
#include <linux/stdarg.h>
#endif
#endif
......
......@@ -2,7 +2,7 @@
#ifndef _LINUX_KERNEL_H
#define _LINUX_KERNEL_H
#include <stdarg.h>
#include <linux/stdarg.h>
#include <linux/align.h>
#include <linux/limits.h>
#include <linux/linkage.h>
......
......@@ -2,7 +2,7 @@
#ifndef __KERNEL_PRINTK__
#define __KERNEL_PRINTK__
#include <stdarg.h>
#include <linux/stdarg.h>
#include <linux/init.h>
#include <linux/kern_levels.h>
#include <linux/linkage.h>
......
// SPDX-License-Identifier: GPL-2.0-or-later
#ifndef _LINUX_STDARG_H
#define _LINUX_STDARG_H
typedef __builtin_va_list va_list;
#define va_start(v, l) __builtin_va_start(v, l)
#define va_end(v) __builtin_va_end(v)
#define va_arg(v, T) __builtin_va_arg(v, T)
#define va_copy(d, s) __builtin_va_copy(d, s)
#endif
......@@ -6,7 +6,7 @@
#include <linux/types.h> /* for size_t */
#include <linux/stddef.h> /* for NULL */
#include <linux/errno.h> /* for E2BIG */
#include <stdarg.h>
#include <linux/stdarg.h>
#include <uapi/linux/string.h>
extern char *strndup_user(const char __user *, long);
......
......@@ -5,8 +5,6 @@
* CONFIG_DEBUG_INFO_REDUCED. Please do not add actual code. However,
* adding appropriate #includes is fine.
*/
#include <stdarg.h>
#include <linux/cred.h>
#include <linux/crypto.h>
#include <linux/dcache.h>
......@@ -22,6 +20,7 @@
#include <linux/net.h>
#include <linux/sched.h>
#include <linux/slab.h>
#include <linux/stdarg.h>
#include <linux/types.h>
#include <net/addrconf.h>
#include <net/sock.h>
......
......@@ -5,7 +5,7 @@
* Copyright (C) 1991, 1992 Linus Torvalds
*/
#include <stdarg.h>
#include <linux/stdarg.h>
#include <linux/export.h>
#include <linux/slab.h>
#include <linux/types.h>
......
......@@ -11,7 +11,7 @@
#include <linux/spinlock.h>
#include <linux/types.h>
#include <stdarg.h>
#include <linux/stdarg.h>
struct string_stream_fragment {
struct kunit *test;
......
......@@ -17,7 +17,7 @@
* - scnprintf and vscnprintf
*/
#include <stdarg.h>
#include <linux/stdarg.h>
#include <linux/build_bug.h>
#include <linux/clk.h>
#include <linux/clk-provider.h>
......
......@@ -5,7 +5,7 @@
* Copyright (C) 2020, Google LLC.
*/
#include <stdarg.h>
#include <linux/stdarg.h>
#include <linux/kernel.h>
#include <linux/lockdep.h>
......
......@@ -7,7 +7,7 @@
#include "log.h"
#include "main.h"
#include <stdarg.h>
#include <linux/stdarg.h>
#include "trace.h"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment