Commit b4c21604 authored by Pavel Emelyanov's avatar Pavel Emelyanov

hdrs: Fixup reinclusion preprocessor constants

Make them look like __CR_<smth>_H__ with

sed -e '1,2s/#\(ifndef\|define\) _\?_\?\(CR_\)\?/#\1 __CR_/' -e '1,2s/_H_\?_\?.*$/_H__/'

on every header file.
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent 6a256782
#ifndef ATOMIC_H__ #ifndef __CR_ATOMIC_H__
#define ATOMIC_H__ #define __CR_ATOMIC_H__
#include "types.h" #include "types.h"
......
#ifndef CR_BITOPS_H_ #ifndef __CR_BITOPS_H__
#define CR_BITOPS_H_ #define __CR_BITOPS_H__
#ifdef CONFIG_X86_64 #ifdef CONFIG_X86_64
......
#ifndef CR_COMPILER_H_ #ifndef __CR_COMPILER_H__
#define CR_COMPILER_H_ #define __CR_COMPILER_H__
/* /*
* Various definitions for success build, * Various definitions for success build,
......
#ifndef CPU_H__ #ifndef __CR_CPU_H__
#define CPU_H__ #define __CR_CPU_H__
#include "types.h" #include "types.h"
......
#ifndef CRTOOLS_H_ #ifndef __CR_CRTOOLS_H__
#define CRTOOLS_H_ #define __CR_CRTOOLS_H__
#include <sys/types.h> #include <sys/types.h>
......
#ifndef EVENTFD_H__ #ifndef __CR_EVENTFD_H__
#define EVENTFD_H__ #define __CR_EVENTFD_H__
#include <sys/types.h> #include <sys/types.h>
#include <unistd.h> #include <unistd.h>
......
#ifndef EVENTPOLL_H__ #ifndef __CR_EVENTPOLL_H__
#define EVENTPOLL_H__ #define __CR_EVENTPOLL_H__
#include <sys/types.h> #include <sys/types.h>
#include <unistd.h> #include <unistd.h>
......
#ifndef FIFO_H__ #ifndef __CR_FIFO_H__
#define FIFO_H__ #define __CR_FIFO_H__
struct fd_parms; struct fd_parms;
struct cr_fdset; struct cr_fdset;
......
#ifndef FILE_IDS_H__ #ifndef __CR_FILE_IDS_H__
#define FILE_IDS_H__ #define __CR_FILE_IDS_H__
#include "compiler.h" #include "compiler.h"
#include "types.h" #include "types.h"
......
#ifndef FILES_REG_H__ #ifndef __CR_FILES_REG_H__
#define FILES_REG_H__ #define __CR_FILES_REG_H__
#include "types.h" #include "types.h"
#include "files.h" #include "files.h"
......
#ifndef FILES_H_ #ifndef __CR_FILES_H__
#define FILES_H_ #define __CR_FILES_H__
#include "compiler.h" #include "compiler.h"
#include "types.h" #include "types.h"
......
#ifndef FPU_H__ #ifndef __CR_FPU_H__
#define FPU_H__ #define __CR_FPU_H__
#include <sys/types.h> #include <sys/types.h>
......
#ifndef CR_IMAGE_H #ifndef __CR_IMAGE_H__
#define CR_IMAGE_H #define __CR_IMAGE_H__
#include "types.h" #include "types.h"
#include "compiler.h" #include "compiler.h"
......
#ifndef _INET_DIAG_H_ #ifndef __CR_INET_DIAG_H__
#define _INET_DIAG_H_ 1 #define __CR_INET_DIAG_H__
#include <linux/types.h> #include <linux/types.h>
......
#ifndef INOTIFY_H__ #ifndef __CR_INOTIFY_H__
#define INOTIFY_H__ #define __CR_INOTIFY_H__
#include <sys/types.h> #include <sys/types.h>
#include <unistd.h> #include <unistd.h>
......
#ifndef CR_IPC_NS_H_ #ifndef __CR_IPC_NS_H__
#define CR_IPC_NS_H_ #define __CR_IPC_NS_H__
#include "crtools.h" #include "crtools.h"
......
#ifndef __KCMP_IDS_H__ #ifndef __CR_KCMP_IDS_H__
#define __KCMP_IDS_H__ #define __CR_KCMP_IDS_H__
struct kid_tree { struct kid_tree {
struct rb_root root; struct rb_root root;
......
#ifndef LIBNETLINK_H__ #ifndef __CR_LIBNETLINK_H__
#define LIBNETLINK_H__ #define __CR_LIBNETLINK_H__
#define CR_NLMSG_SEQ 24680 /* arbitrary chosen */ #define CR_NLMSG_SEQ 24680 /* arbitrary chosen */
......
#ifndef LINKAGE_H_ #ifndef __CR_LINKAGE_H__
#define LINKAGE_H_ #define __CR_LINKAGE_H__
#ifdef __ASSEMBLY__ #ifdef __ASSEMBLY__
......
#ifndef CR_LIST_H_ #ifndef __CR_LIST_H__
#define CR_LIST_H_ #define __CR_LIST_H__
/* /*
* Double linked lists. * Double linked lists.
......
#ifndef CR_LOCK_H_ #ifndef __CR_LOCK_H__
#define CR_LOCK_H_ #define __CR_LOCK_H__
#include <linux/futex.h> #include <linux/futex.h>
#include <sys/time.h> #include <sys/time.h>
......
#ifndef LOG_LEVELS_H__ #ifndef __CR_LOG_LEVELS_H__
#define LOG_LEVELS_H__ #define __CR_LOG_LEVELS_H__
#define LOG_MSG (0) /* Print message regardless of log level */ #define LOG_MSG (0) /* Print message regardless of log level */
#define LOG_ERROR (1) /* Errors only, when we're in trouble */ #define LOG_ERROR (1) /* Errors only, when we're in trouble */
......
#ifndef LOG_H__ #ifndef __CR_LOG_H__
#define LOG_H__ #define __CR_LOG_H__
#include "log-levels.h" #include "log-levels.h"
......
#ifndef __MEMCPY_64_H__ #ifndef __CR_MEMCPY_64_H__
#define __MEMCPY_64_H__ #define __CR_MEMCPY_64_H__
#include "compiler.h" #include "compiler.h"
#include "types.h" #include "types.h"
......
#ifndef MOUNT_H__ #ifndef __CR_MOUNT_H__
#define MOUNT_H__ #define __CR_MOUNT_H__
extern int mntns_root; extern int mntns_root;
int mntns_collect_root(pid_t pid); int mntns_collect_root(pid_t pid);
......
#ifndef __PACKET_DIAG_H__ #ifndef __CR_PACKET_DIAG_H__
#define __PACKET_DIAG_H__ #define __CR_PACKET_DIAG_H__
#include <linux/types.h> #include <linux/types.h>
......
#ifndef PARASITE_SYSCALL_H_ #ifndef __CR_PARASITE_SYSCALL_H__
#define PARASITE_SYSCALL_H_ #define __CR_PARASITE_SYSCALL_H__
#define BUILTIN_SYSCALL_SIZE 8 #define BUILTIN_SYSCALL_SIZE 8
......
#ifndef CR_PARASITE_H_ #ifndef __CR_PARASITE_H__
#define CR_PARASITE_H_ #define __CR_PARASITE_H__
#define PARASITE_STACK_SIZE (16 << 10) #define PARASITE_STACK_SIZE (16 << 10)
#define PARASITE_ARG_SIZE 8196 #define PARASITE_ARG_SIZE 8196
......
#ifndef PROC_PARSE_H__ #ifndef __CR_PROC_PARSE_H__
#define PROC_PARSE_H__ #define __CR_PROC_PARSE_H__
#include <sys/types.h> #include <sys/types.h>
#include "types.h" #include "types.h"
......
#ifndef CR_PROCESSOR_FLAGS_H__ #ifndef __CR_PROCESSOR_FLAGS_H__
#define CR_PROCESSOR_FLAGS_H__ #define __CR_PROCESSOR_FLAGS_H__
/* Taken from linux kernel headers */ /* Taken from linux kernel headers */
......
#ifndef PROTOBUF_H__ #ifndef __CR_PROTOBUF_H__
#define PROTOBUF_H__ #define __CR_PROTOBUF_H__
#include "types.h" #include "types.h"
#include "compiler.h" #include "compiler.h"
......
#ifndef PSTREE_H__ #ifndef __CR_PSTREE_H__
#define PSTREE_H__ #define __CR_PSTREE_H__
#include "list.h" #include "list.h"
#include "crtools.h" #include "crtools.h"
......
#ifndef SEIZE_H_ #ifndef __CR_SEIZE_H__
#define SEIZE_H_ #define __CR_SEIZE_H__
#include <sys/ptrace.h> #include <sys/ptrace.h>
......
#ifndef CR_RESTORER_H__ #ifndef __CR_RESTORER_H__
#define CR_RESTORER_H__ #define __CR_RESTORER_H__
#include <signal.h> #include <signal.h>
#include <limits.h> #include <limits.h>
......
#ifndef SK_QUEUE_H__ #ifndef __CR_SK_QUEUE_H__
#define SK_QUEUE_H__ #define __CR_SK_QUEUE_H__
#include "types.h" #include "types.h"
#include "list.h" #include "list.h"
......
#ifndef CR_SOCKETS_H__ #ifndef __CR_SOCKETS_H__
#define CR_SOCKETS_H__ #define __CR_SOCKETS_H__
#include <sys/types.h> #include <sys/types.h>
#include <sys/socket.h> #include <sys/socket.h>
......
#ifndef CR_SYSCTL_H_ #ifndef __CR_SYSCTL_H__
#define CR_SYSCTL_H_ #define __CR_SYSCTL_H__
struct sysctl_req { struct sysctl_req {
char *name; char *name;
......
#ifndef CR_TTY_H__ #ifndef __CR_TTY_H__
#define CR_TTY_H__ #define __CR_TTY_H__
#include "files.h" #include "files.h"
#include "crtools.h" #include "crtools.h"
......
#ifndef CR_TYPES_H_ #ifndef __CR_TYPES_H__
#define CR_TYPES_H_ #define __CR_TYPES_H__
#include <stdint.h> #include <stdint.h>
#include <stdbool.h> #include <stdbool.h>
......
#ifndef UNIX_DIAG_H__ #ifndef __CR_UNIX_DIAG_H__
#define UNIX_DIAG_H__ #define __CR_UNIX_DIAG_H__
#include "types.h" #include "types.h"
......
#ifndef UTIL_NET_H_ #ifndef __CR_UTIL_NET_H__
#define UTIL_NET_H_ #define __CR_UTIL_NET_H__
#include <sys/socket.h> #include <sys/socket.h>
#include <sys/un.h> #include <sys/un.h>
......
#ifndef UTIL_H_ #ifndef __CR_UTIL_H__
#define UTIL_H_ #define __CR_UTIL_H__
/* /*
* Some bits are stolen from perf and kvm tools * Some bits are stolen from perf and kvm tools
......
#ifndef CR_UTS_NS_H_ #ifndef __CR_UTS_NS_H__
#define CR_UTS_NS_H_ #define __CR_UTS_NS_H__
#include "crtools.h" #include "crtools.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