From fef5f381c331bde98f9edeca320a12998d902d4b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcin=20=C5=9Alusarz?= <marcin.slusarz@intel.com> Date: Thu, 7 Feb 2019 16:40:16 +0100 Subject: [PATCH] common: include headers outside of extern "C" block --- src/include/libpmem.h | 6 +++--- src/include/libpmemblk.h | 6 +++--- src/include/libpmemlog.h | 6 +++--- src/include/libpmempool.h | 11 +++++------ src/include/librpmem.h | 8 ++++---- src/include/libvmem.h | 8 ++++---- src/include/libvmmalloc.h | 6 +++--- 7 files changed, 25 insertions(+), 26 deletions(-) diff --git a/src/include/libpmem.h b/src/include/libpmem.h index 0175ad569..609027435 100644 --- a/src/include/libpmem.h +++ b/src/include/libpmem.h @@ -1,5 +1,5 @@ /* - * Copyright 2014-2018, Intel Corporation + * Copyright 2014-2019, Intel Corporation * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -43,6 +43,8 @@ #ifndef LIBPMEM_H #define LIBPMEM_H 1 +#include <sys/types.h> + #ifdef _WIN32 #include <pmemcompat.h> @@ -62,8 +64,6 @@ extern "C" { #endif -#include <sys/types.h> - /* * This limit is set arbitrary to incorporate a pool header and required * alignment plus supply. diff --git a/src/include/libpmemblk.h b/src/include/libpmemblk.h index 6b7dd736b..232f821cc 100644 --- a/src/include/libpmemblk.h +++ b/src/include/libpmemblk.h @@ -1,5 +1,5 @@ /* - * Copyright 2014-2018, Intel Corporation + * Copyright 2014-2019, Intel Corporation * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -43,6 +43,8 @@ #ifndef LIBPMEMBLK_H #define LIBPMEMBLK_H 1 +#include <sys/types.h> + #ifdef _WIN32 #include <pmemcompat.h> @@ -72,8 +74,6 @@ extern "C" { #endif -#include <sys/types.h> - /* * opaque type, internal to libpmemblk */ diff --git a/src/include/libpmemlog.h b/src/include/libpmemlog.h index e3de673fe..f608582a5 100644 --- a/src/include/libpmemlog.h +++ b/src/include/libpmemlog.h @@ -1,5 +1,5 @@ /* - * Copyright 2014-2018, Intel Corporation + * Copyright 2014-2019, Intel Corporation * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -43,6 +43,8 @@ #ifndef LIBPMEMLOG_H #define LIBPMEMLOG_H 1 +#include <sys/types.h> + #ifdef _WIN32 #include <pmemcompat.h> @@ -74,8 +76,6 @@ extern "C" { #endif -#include <sys/types.h> - /* * opaque type, internal to libpmemlog */ diff --git a/src/include/libpmempool.h b/src/include/libpmempool.h index 9f14bd025..144601fee 100644 --- a/src/include/libpmempool.h +++ b/src/include/libpmempool.h @@ -1,5 +1,5 @@ /* - * Copyright 2016-2018, Intel Corporation + * Copyright 2016-2019, Intel Corporation * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -39,6 +39,10 @@ #ifndef LIBPMEMPOOL_H #define LIBPMEMPOOL_H 1 +#include <stdint.h> +#include <stddef.h> +#include <limits.h> + #ifdef _WIN32 #include <pmemcompat.h> @@ -78,11 +82,6 @@ extern "C" { #endif -#include <stdint.h> -#include <stddef.h> -#include <limits.h> - - /* PMEMPOOL CHECK */ /* diff --git a/src/include/librpmem.h b/src/include/librpmem.h index 8c102bc92..b9fb26143 100644 --- a/src/include/librpmem.h +++ b/src/include/librpmem.h @@ -1,5 +1,5 @@ /* - * Copyright 2016-2018, Intel Corporation + * Copyright 2016-2019, Intel Corporation * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -42,13 +42,13 @@ #ifndef LIBRPMEM_H #define LIBRPMEM_H 1 +#include <sys/types.h> +#include <stdint.h> + #ifdef __cplusplus extern "C" { #endif -#include <sys/types.h> -#include <stdint.h> - typedef struct rpmem_pool RPMEMpool; #define RPMEM_POOL_HDR_SIG_LEN 8 diff --git a/src/include/libvmem.h b/src/include/libvmem.h index e39cdbbb2..d9d841397 100644 --- a/src/include/libvmem.h +++ b/src/include/libvmem.h @@ -1,5 +1,5 @@ /* - * Copyright 2014-2017, Intel Corporation + * Copyright 2014-2019, Intel Corporation * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -41,6 +41,9 @@ #ifndef LIBVMEM_H #define LIBVMEM_H 1 +#include <sys/types.h> +#include <stddef.h> + #ifdef _WIN32 #ifndef PMDK_UTF8_API #define vmem_create vmem_createW @@ -57,9 +60,6 @@ extern "C" { #endif -#include <sys/types.h> -#include <stddef.h> - typedef struct vmem VMEM; /* opaque type internal to libvmem */ /* diff --git a/src/include/libvmmalloc.h b/src/include/libvmmalloc.h index 36d776c04..4afcb6a18 100644 --- a/src/include/libvmmalloc.h +++ b/src/include/libvmmalloc.h @@ -1,5 +1,5 @@ /* - * Copyright 2014-2017, Intel Corporation + * Copyright 2014-2019, Intel Corporation * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -41,6 +41,8 @@ #ifndef LIBVMMALLOC_H #define LIBVMMALLOC_H 1 +#include <sys/types.h> + #ifdef __cplusplus extern "C" { #endif @@ -48,8 +50,6 @@ extern "C" { #define VMMALLOC_MAJOR_VERSION 1 #define VMMALLOC_MINOR_VERSION 1 -#include <sys/types.h> - #define VMMALLOC_MIN_POOL ((size_t)(1024 * 1024 * 14)) /* min pool size: 14MB */ /* -- GitLab