소스 검색

header file fixes: multiple include guard consistency and correctness

one file was reusing another file's macro name, and many had
inconsistent underscores and application of SYS prefix, etc.

patch by Szabolcs Nagy (nsz)
Rich Felker 12 년 전
부모
커밋
57d5fff5f7
10개의 변경된 파일18개의 추가작업 그리고 18개의 파일을 삭제
  1. 2 2
      include/arpa/nameser.h
  2. 1 1
      include/elf.h
  3. 2 2
      include/net/ethernet.h
  4. 2 2
      include/paths.h
  5. 2 2
      include/resolv.h
  6. 2 2
      include/sys/fsuid.h
  7. 2 2
      include/sys/sendfile.h
  8. 2 2
      include/sys/sysmacros.h
  9. 1 1
      include/syscall.h
  10. 2 2
      include/syslog.h

+ 2 - 2
include/arpa/nameser.h

@@ -1,5 +1,5 @@
-#ifndef _ARPA_NAMESER_H_
-#define _ARPA_NAMESER_H_
+#ifndef _ARPA_NAMESER_H
+#define _ARPA_NAMESER_H
 
 #define __NAMESER	19991006
 #define NS_PACKETSZ	512

+ 1 - 1
include/elf.h

@@ -1,5 +1,5 @@
 #ifndef _ELF_H
-#define	_ELF_H 1
+#define _ELF_H
 
 #ifdef __cplusplus
 extern "C" {

+ 2 - 2
include/net/ethernet.h

@@ -1,5 +1,5 @@
-#ifndef __NET_ETHERNET_H
-#define __NET_ETHERNET_H 1
+#ifndef _NET_ETHERNET_H
+#define _NET_ETHERNET_H
 
 #ifdef __cplusplus
 extern "C" {

+ 2 - 2
include/paths.h

@@ -1,5 +1,5 @@
-#ifndef _PATHS_H_
-#define	_PATHS_H_
+#ifndef _PATHS_H
+#define _PATHS_H
 
 #define	_PATH_DEFPATH "/usr/local/bin:/bin:/usr/bin"
 #define	_PATH_STDPATH "/bin:/usr/bin:/sbin:/usr/sbin"

+ 2 - 2
include/resolv.h

@@ -1,5 +1,5 @@
-#ifndef _RESOLV_H_
-#define _RESOLV_H_
+#ifndef _RESOLV_H
+#define _RESOLV_H
 
 #include <stdint.h>
 #include <arpa/nameser.h>

+ 2 - 2
include/sys/fsuid.h

@@ -1,5 +1,5 @@
-#ifndef	_FSUID_H
-#define	_FSUID_H
+#ifndef _SYS_FSUID_H
+#define _SYS_FSUID_H
 
 #ifdef __cplusplus
 extern "C" {

+ 2 - 2
include/sys/sendfile.h

@@ -1,5 +1,5 @@
-#ifndef _SYS_INOTIFY_H
-#define _SYS_INOTIFY_H
+#ifndef _SYS_SENDFILE_H
+#define _SYS_SENDFILE_H
 
 #ifdef __cplusplus
 extern "C" {

+ 2 - 2
include/sys/sysmacros.h

@@ -1,5 +1,5 @@
-#ifndef _SYSMACROS_H
-#define _SYSMACROS_H
+#ifndef _SYS_SYSMACROS_H
+#define _SYS_SYSMACROS_H
 
 #define major(x) (((x) >> 8) & 0xff)
 #define minor(x) ((x) & 0xff)

+ 1 - 1
include/syscall.h

@@ -1 +1 @@
-#include <sys/syscall.h>
+#include <sys/syscall.h>

+ 2 - 2
include/syslog.h

@@ -1,5 +1,5 @@
-#ifndef _SYS_SYSLOG_H
-#define _SYS_SYSLOG_H
+#ifndef _SYSLOG_H
+#define _SYSLOG_H
 
 #ifdef __cplusplus
 extern "C" {