diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2016-07-12 16:04:35 +0100 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2016-07-12 16:04:36 +0100 |
commit | ca3d87d4c84032f19478010b5604cac88b045c25 (patch) | |
tree | 697ae6ccd736bad9d602e3872b372a4939d6af80 /include/qemu | |
parent | 7d820b766a2049f33ca7e078aa51018f2335f8c5 (diff) | |
parent | 82751a32be872e71c22167234ac88ba52bf96a37 (diff) | |
download | qemu-ca3d87d4c84032f19478010b5604cac88b045c25.zip qemu-ca3d87d4c84032f19478010b5604cac88b045c25.tar.gz qemu-ca3d87d4c84032f19478010b5604cac88b045c25.tar.bz2 |
Merge remote-tracking branch 'remotes/armbru/tags/pull-include-2016-07-12' into staging
Clean up #include "..." vs <...> and header guards
# gpg: Signature made Tue 12 Jul 2016 15:23:43 BST
# gpg: using RSA key 0x3870B400EB918653
# gpg: Good signature from "Markus Armbruster <armbru@redhat.com>"
# gpg: aka "Markus Armbruster <armbru@pond.sub.org>"
# Primary key fingerprint: 354B C8B3 D7EB 2A6B 6867 4E5F 3870 B400 EB91 8653
* remotes/armbru/tags/pull-include-2016-07-12:
cris: Fix broken header guard in hw/cris/boot.h
Clean up decorations and whitespace around header guards
Clean up ill-advised or unusual header guards
libdecnumber: Don't error out on decNumberLocal.h re-inclusion
libdecnumber: Don't fool around with guards to avoid #include
Clean up header guards that don't match their file name
Drop Emacs local variables lists redundant with .dir-locals.el
spapr_pci: Include spapr.h instead of playing games with #error
tcg: Clean up tcg-target.h header guards
linux-user: Fix broken header guard in syscall_defs.h
linux-user: Clean up hostdep.h header guards
linux-user: Clean up target_structs.h header guards
linux-user: Clean up target_signal.h header guards
linux-user: Clean up target_cpu.h header guards
linux-user: Clean up target_syscall.h header guards
target-*: Clean up cpu.h header guards
scripts: New clean-header-guards.pl
Use #include "..." for our own headers, <...> for others
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'include/qemu')
29 files changed, 62 insertions, 68 deletions
diff --git a/include/qemu/acl.h b/include/qemu/acl.h index 116487e..7c44119 100644 --- a/include/qemu/acl.h +++ b/include/qemu/acl.h @@ -22,8 +22,8 @@ * THE SOFTWARE. */ -#ifndef __QEMU_ACL_H__ -#define __QEMU_ACL_H__ +#ifndef QEMU_ACL_H +#define QEMU_ACL_H #include "qemu/queue.h" @@ -63,12 +63,4 @@ int qemu_acl_insert(qemu_acl *acl, int qemu_acl_remove(qemu_acl *acl, const char *match); -#endif /* __QEMU_ACL_H__ */ - -/* - * Local variables: - * c-indent-level: 4 - * c-basic-offset: 4 - * tab-width: 8 - * End: - */ +#endif /* QEMU_ACL_H */ diff --git a/include/qemu/atomic.h b/include/qemu/atomic.h index 7a59096..7e13fca 100644 --- a/include/qemu/atomic.h +++ b/include/qemu/atomic.h @@ -12,10 +12,8 @@ * atomic primitive is meant to provide. */ -#ifndef __QEMU_ATOMIC_H -#define __QEMU_ATOMIC_H 1 - - +#ifndef QEMU_ATOMIC_H +#define QEMU_ATOMIC_H /* Compiler barrier */ #define barrier() ({ asm volatile("" ::: "memory"); (void)0; }) @@ -366,4 +364,4 @@ #define atomic_or(ptr, n) ((void) __sync_fetch_and_or(ptr, n)) #endif /* __ATOMIC_RELAXED */ -#endif /* __QEMU_ATOMIC_H */ +#endif /* QEMU_ATOMIC_H */ diff --git a/include/qemu/base64.h b/include/qemu/base64.h index 793708d..815d852 100644 --- a/include/qemu/base64.h +++ b/include/qemu/base64.h @@ -18,8 +18,8 @@ * */ -#ifndef QEMU_BASE64_H__ -#define QEMU_BASE64_H__ +#ifndef QEMU_BASE64_H +#define QEMU_BASE64_H #include "qemu-common.h" @@ -55,4 +55,4 @@ uint8_t *qbase64_decode(const char *input, Error **errp); -#endif /* QEMU_BUFFER_H__ */ +#endif /* QEMU_BASE64_H */ diff --git a/include/qemu/bcd.h b/include/qemu/bcd.h index b4c9b64..dfebacf 100644 --- a/include/qemu/bcd.h +++ b/include/qemu/bcd.h @@ -1,5 +1,5 @@ #ifndef QEMU_BCD_H -#define QEMU_BCD_H 1 +#define QEMU_BCD_H /* Convert a byte between binary and BCD. */ static inline uint8_t to_bcd(uint8_t val) diff --git a/include/qemu/buffer.h b/include/qemu/buffer.h index dead9b7..b2ead1f 100644 --- a/include/qemu/buffer.h +++ b/include/qemu/buffer.h @@ -18,8 +18,8 @@ * */ -#ifndef QEMU_BUFFER_H__ -#define QEMU_BUFFER_H__ +#ifndef QEMU_BUFFER_H +#define QEMU_BUFFER_H #include "qemu-common.h" @@ -158,4 +158,4 @@ void buffer_move_empty(Buffer *to, Buffer *from); */ void buffer_move(Buffer *to, Buffer *from); -#endif /* QEMU_BUFFER_H__ */ +#endif /* QEMU_BUFFER_H */ diff --git a/include/qemu/config-file.h b/include/qemu/config-file.h index 8603e86..8d4b2b6 100644 --- a/include/qemu/config-file.h +++ b/include/qemu/config-file.h @@ -1,5 +1,5 @@ -#ifndef QEMU_CONFIG_H -#define QEMU_CONFIG_H +#ifndef QEMU_CONFIG_FILE_H +#define QEMU_CONFIG_FILE_H #include "qemu/option.h" #include "qapi/qmp/qdict.h" @@ -27,4 +27,4 @@ void qemu_config_parse_qdict(QDict *options, QemuOptsList **lists, */ int qemu_read_default_config_files(bool userconfig); -#endif /* QEMU_CONFIG_H */ +#endif /* QEMU_CONFIG_FILE_H */ diff --git a/include/qemu/cutils.h b/include/qemu/cutils.h index db7adad..3e4ea23 100644 --- a/include/qemu/cutils.h +++ b/include/qemu/cutils.h @@ -1,5 +1,5 @@ #ifndef QEMU_CUTILS_H -#define QEMU_CUTILS_H 1 +#define QEMU_CUTILS_H #include "qemu/fprintf-fn.h" diff --git a/include/qemu/error-report.h b/include/qemu/error-report.h index 7a2a363..499ec8b 100644 --- a/include/qemu/error-report.h +++ b/include/qemu/error-report.h @@ -10,9 +10,8 @@ * See the COPYING file in the top-level directory. */ -#ifndef QEMU_ERROR_H -#define QEMU_ERROR_H - +#ifndef QEMU_ERROR_REPORT_H +#define QEMU_ERROR_REPORT_H typedef struct Location { /* all members are private to qemu-error.c */ diff --git a/include/qemu/fifo8.h b/include/qemu/fifo8.h index 8820780..24b3644 100644 --- a/include/qemu/fifo8.h +++ b/include/qemu/fifo8.h @@ -1,5 +1,5 @@ -#ifndef FIFO_H -#define FIFO_H +#ifndef QEMU_FIFO8_H +#define QEMU_FIFO8_H #include "migration/vmstate.h" @@ -157,4 +157,4 @@ extern const VMStateDescription vmstate_fifo8; .offset = vmstate_offset_value(_state, _field, Fifo8), \ } -#endif /* FIFO_H */ +#endif /* QEMU_FIFO8_H */ diff --git a/include/qemu/fprintf-fn.h b/include/qemu/fprintf-fn.h index b6bad35..9068a96 100644 --- a/include/qemu/fprintf-fn.h +++ b/include/qemu/fprintf-fn.h @@ -6,8 +6,7 @@ */ #ifndef QEMU_FPRINTF_FN_H -#define QEMU_FPRINTF_FN_H 1 - +#define QEMU_FPRINTF_FN_H typedef int (*fprintf_function)(FILE *f, const char *fmt, ...) GCC_FMT_ATTR(2, 3); diff --git a/include/qemu/hbitmap.h b/include/qemu/hbitmap.h index e29188c..8ab721e 100644 --- a/include/qemu/hbitmap.h +++ b/include/qemu/hbitmap.h @@ -10,7 +10,7 @@ */ #ifndef HBITMAP_H -#define HBITMAP_H 1 +#define HBITMAP_H #include "bitops.h" #include "host-utils.h" diff --git a/include/qemu/help_option.h b/include/qemu/help_option.h index e39a66e..328d2a8 100644 --- a/include/qemu/help_option.h +++ b/include/qemu/help_option.h @@ -1,5 +1,5 @@ #ifndef QEMU_HELP_OPTION_H -#define QEMU_HELP_OPTION_H 1 +#define QEMU_HELP_OPTION_H /** * is_help_option: diff --git a/include/qemu/host-utils.h b/include/qemu/host-utils.h index 3de7d4e..46187bb 100644 --- a/include/qemu/host-utils.h +++ b/include/qemu/host-utils.h @@ -22,8 +22,9 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ + #ifndef HOST_UTILS_H -#define HOST_UTILS_H 1 +#define HOST_UTILS_H #include "qemu/bswap.h" diff --git a/include/qemu/id.h b/include/qemu/id.h index 7d90335..40c7010 100644 --- a/include/qemu/id.h +++ b/include/qemu/id.h @@ -1,5 +1,5 @@ #ifndef QEMU_ID_H -#define QEMU_ID_H 1 +#define QEMU_ID_H typedef enum IdSubSystems { ID_QDEV, diff --git a/include/qemu/main-loop.h b/include/qemu/main-loop.h index 19b5de3..3fa7cfe 100644 --- a/include/qemu/main-loop.h +++ b/include/qemu/main-loop.h @@ -23,7 +23,7 @@ */ #ifndef QEMU_MAIN_LOOP_H -#define QEMU_MAIN_LOOP_H 1 +#define QEMU_MAIN_LOOP_H #include "block/aio.h" diff --git a/include/qemu/mmap-alloc.h b/include/qemu/mmap-alloc.h index 0899b2f..933c024 100644 --- a/include/qemu/mmap-alloc.h +++ b/include/qemu/mmap-alloc.h @@ -1,5 +1,5 @@ -#ifndef QEMU_MMAP_ALLOC -#define QEMU_MMAP_ALLOC +#ifndef QEMU_MMAP_ALLOC_H +#define QEMU_MMAP_ALLOC_H #include "qemu-common.h" diff --git a/include/qemu/option.h b/include/qemu/option.h index 8542d2d..1f9e3f9 100644 --- a/include/qemu/option.h +++ b/include/qemu/option.h @@ -23,8 +23,8 @@ * THE SOFTWARE. */ -#ifndef QEMU_OPTIONS_H -#define QEMU_OPTIONS_H +#ifndef QEMU_OPTION_H +#define QEMU_OPTION_H #include "qemu/queue.h" #include "qapi/qmp/qdict.h" diff --git a/include/qemu/option_int.h b/include/qemu/option_int.h index 6432c1a..26b1d9e 100644 --- a/include/qemu/option_int.h +++ b/include/qemu/option_int.h @@ -23,8 +23,8 @@ * THE SOFTWARE. */ -#ifndef QEMU_OPTIONS_INTERNAL_H -#define QEMU_OPTIONS_INTERNAL_H +#ifndef QEMU_OPTION_INT_H +#define QEMU_OPTION_INT_H #include "qemu/option.h" #include "qemu/error-report.h" diff --git a/include/qemu/path.h b/include/qemu/path.h index ed5fee0..c6292a9 100644 --- a/include/qemu/path.h +++ b/include/qemu/path.h @@ -1,5 +1,5 @@ #ifndef QEMU_PATH_H -#define QEMU_PATH_H 1 +#define QEMU_PATH_H void init_paths(const char *prefix); const char *path(const char *pathname); diff --git a/include/qemu/queue.h b/include/qemu/queue.h index f781aa2..c2b6c81 100644 --- a/include/qemu/queue.h +++ b/include/qemu/queue.h @@ -37,8 +37,8 @@ * @(#)queue.h 8.5 (Berkeley) 8/20/94 */ -#ifndef QEMU_SYS_QUEUE_H_ -#define QEMU_SYS_QUEUE_H_ +#ifndef QEMU_SYS_QUEUE_H +#define QEMU_SYS_QUEUE_H /* * This file defines four types of data structures: singly-linked lists, @@ -436,4 +436,4 @@ struct { \ #define QTAILQ_PREV(elm, headname, field) \ (*(((struct headname *)((elm)->field.tqe_prev))->tqh_last)) -#endif /* !QEMU_SYS_QUEUE_H_ */ +#endif /* QEMU_SYS_QUEUE_H */ diff --git a/include/qemu/ratelimit.h b/include/qemu/ratelimit.h index d413a4a..1e3cb13 100644 --- a/include/qemu/ratelimit.h +++ b/include/qemu/ratelimit.h @@ -12,7 +12,7 @@ */ #ifndef QEMU_RATELIMIT_H -#define QEMU_RATELIMIT_H 1 +#define QEMU_RATELIMIT_H typedef struct { int64_t next_slice_time; diff --git a/include/qemu/rcu_queue.h b/include/qemu/rcu_queue.h index 3aca7a5..01be774 100644 --- a/include/qemu/rcu_queue.h +++ b/include/qemu/rcu_queue.h @@ -131,4 +131,4 @@ extern "C" { #ifdef __cplusplus } #endif -#endif /* QEMU_RCU_QUEUE.H */ +#endif /* QEMU_RCU_QUEUE_H */ diff --git a/include/qemu/readline.h b/include/qemu/readline.h index 49efe4e..c08cf74 100644 --- a/include/qemu/readline.h +++ b/include/qemu/readline.h @@ -60,4 +60,4 @@ ReadLineState *readline_init(ReadLinePrintfFunc *printf_func, void *opaque, ReadLineCompletionFunc *completion_finder); -#endif /* !READLINE_H */ +#endif /* READLINE_H */ diff --git a/include/qemu/seqlock.h b/include/qemu/seqlock.h index 4dfc055..2e2be4c 100644 --- a/include/qemu/seqlock.h +++ b/include/qemu/seqlock.h @@ -10,11 +10,12 @@ * See the COPYING file in the top-level directory. * */ + #ifndef QEMU_SEQLOCK_H -#define QEMU_SEQLOCK_H 1 +#define QEMU_SEQLOCK_H -#include <qemu/atomic.h> -#include <qemu/thread.h> +#include "qemu/atomic.h" +#include "qemu/thread.h" typedef struct QemuSeqLock QemuSeqLock; diff --git a/include/qemu/sockets.h b/include/qemu/sockets.h index 2f3763f..5fe01fb 100644 --- a/include/qemu/sockets.h +++ b/include/qemu/sockets.h @@ -1,6 +1,7 @@ /* headers to use the BSD sockets */ -#ifndef QEMU_SOCKET_H -#define QEMU_SOCKET_H + +#ifndef QEMU_SOCKETS_H +#define QEMU_SOCKETS_H #ifdef _WIN32 @@ -121,4 +122,5 @@ SocketAddress *socket_remote_address(int fd, Error **errp); * Returns: the socket address in string format, or NULL on error */ char *socket_address_to_string(struct SocketAddress *addr, Error **errp); -#endif /* QEMU_SOCKET_H */ + +#endif /* QEMU_SOCKETS_H */ diff --git a/include/qemu/thread-posix.h b/include/qemu/thread-posix.h index eb5c7a1..aa03567 100644 --- a/include/qemu/thread-posix.h +++ b/include/qemu/thread-posix.h @@ -1,6 +1,7 @@ -#ifndef __QEMU_THREAD_POSIX_H -#define __QEMU_THREAD_POSIX_H 1 -#include "pthread.h" +#ifndef QEMU_THREAD_POSIX_H +#define QEMU_THREAD_POSIX_H + +#include <pthread.h> #include <semaphore.h> struct QemuMutex { diff --git a/include/qemu/thread-win32.h b/include/qemu/thread-win32.h index 385ff5f..c7ce8dc 100644 --- a/include/qemu/thread-win32.h +++ b/include/qemu/thread-win32.h @@ -1,6 +1,7 @@ -#ifndef __QEMU_THREAD_WIN32_H -#define __QEMU_THREAD_WIN32_H 1 -#include "windows.h" +#ifndef QEMU_THREAD_WIN32_H +#define QEMU_THREAD_WIN32_H + +#include <windows.h> struct QemuMutex { CRITICAL_SECTION lock; diff --git a/include/qemu/thread.h b/include/qemu/thread.h index c5d71cf8..31237e9 100644 --- a/include/qemu/thread.h +++ b/include/qemu/thread.h @@ -1,5 +1,5 @@ -#ifndef __QEMU_THREAD_H -#define __QEMU_THREAD_H 1 +#ifndef QEMU_THREAD_H +#define QEMU_THREAD_H #include "qemu/processor.h" #include "qemu/atomic.h" diff --git a/include/qemu/unicode.h b/include/qemu/unicode.h index d873165..71c72db 100644 --- a/include/qemu/unicode.h +++ b/include/qemu/unicode.h @@ -1,5 +1,5 @@ #ifndef QEMU_UNICODE_H -#define QEMU_UNICODE_H 1 +#define QEMU_UNICODE_H int mod_utf8_codepoint(const char *s, size_t n, char **end); |