Skip to content

Commit

Permalink
Remove needless indef checks
Browse files Browse the repository at this point in the history
They are done in included headers.
  • Loading branch information
kou committed Oct 30, 2014
1 parent c03b63f commit 16b3e76
Show file tree
Hide file tree
Showing 17 changed files with 1 addition and 113 deletions.
4 changes: 1 addition & 3 deletions lib/grn.h
Expand Up @@ -751,8 +751,6 @@ grn_str_greater(const uint8_t *ap, uint32_t as, const uint8_t *bp, uint32_t bs)
GRN_API void grn_sleep(uint32_t seconds);
GRN_API void grn_nanosleep(uint64_t nanoseconds);

#ifndef GROONGA_H
# include <groonga.h>
#endif /* GROONGA_H */
#include <groonga.h>

#endif /* GRN_H */
8 changes: 0 additions & 8 deletions lib/grn_com.h
Expand Up @@ -18,17 +18,9 @@
#ifndef GRN_COM_H
#define GRN_COM_H

#ifndef GRN_H
#include "grn.h"
#endif /* GRN_H */

#ifndef GRN_STR_H
#include "grn_str.h"
#endif /* GRN_STR_H */

#ifndef GRN_HASH_H
#include "grn_hash.h"
#endif /* GRN_HASH_H */

#ifdef HAVE_NETDB_H
#include <netdb.h>
Expand Down
7 changes: 0 additions & 7 deletions lib/grn_ctx.h
Expand Up @@ -18,13 +18,8 @@
#ifndef GRN_CTX_H
#define GRN_CTX_H

#ifndef GRN_H
#include "grn.h"
#endif /* GRN_H */

#ifdef HAVE_ERRNO_H
#include <errno.h>
#endif /* HAVE_ERRNO_H */

#ifdef HAVE_SIGNAL_H
#include <signal.h>
Expand All @@ -35,9 +30,7 @@
#include <execinfo.h>
#endif /* HAVE_EXECINFO_H */

#ifndef GRN_IO_H
#include "grn_io.h"
#endif /* GRN_IO_H */

#ifdef __cplusplus
extern "C" {
Expand Down
8 changes: 0 additions & 8 deletions lib/grn_db.h
Expand Up @@ -17,17 +17,9 @@
#ifndef GRN_DB_H
#define GRN_DB_H

#ifndef GRN_H
#include "grn.h"
#endif /* GRN_H */

#ifndef GRN_CTX_H
#include "grn_ctx.h"
#endif /* GRN_CTX_H */

#ifndef GRN_STORE_H
#include "grn_store.h"
#endif /* GRN_STORE_H */

#include <groonga/token_filter.h>

Expand Down
5 changes: 0 additions & 5 deletions lib/grn_hash.h
Expand Up @@ -17,13 +17,8 @@
#ifndef GRN_HASH_H
#define GRN_HASH_H

#ifndef GRN_H
#include "grn.h"
#endif /* GRN_H */

#ifndef GRN_CTX_H
#include "grn_ctx.h"
#endif /* GRN_CTX_H */

#ifdef __cplusplus
extern "C" {
Expand Down
11 changes: 0 additions & 11 deletions lib/grn_ii.h
Expand Up @@ -19,21 +19,10 @@

/* "ii" is for inverted index */

#ifndef GRN_H
#include "grn.h"
#endif /* GRN_H */

#ifndef GRN_HASH_H
#include "grn_hash.h"
#endif /* GRN_HASH_H */

#ifndef GRN_IO_H
#include "grn_io.h"
#endif /* GRN_IO_H */

#ifndef GRN_STORE_H
#include "grn_store.h"
#endif /* GRN_STORE_H */

#ifdef __cplusplus
extern "C" {
Expand Down
5 changes: 0 additions & 5 deletions lib/grn_io.h
Expand Up @@ -17,13 +17,8 @@
#ifndef GRN_IO_H
#define GRN_IO_H

#ifndef GRN_H
#include "grn.h"
#endif /* GRN_H */

#ifndef GRN_ERROR_H
#include "grn_error.h"
#endif /* GRN_ERROR_H */

#ifdef __cplusplus
extern "C" {
Expand Down
8 changes: 0 additions & 8 deletions lib/grn_normalizer.h
Expand Up @@ -18,17 +18,9 @@
#ifndef GRN_NORMALIZER_H
#define GRN_NORMALIZER_H

#ifndef GRN_H
#include "grn.h"
#endif /* GRN_H */

#ifndef GRN_CTX_H
#include "grn_ctx.h"
#endif /* GRN_CTX_H */

#ifndef GRN_DB_H
#include "grn_db.h"
#endif /* GRN_DB_H */

#ifdef __cplusplus
extern "C" {
Expand Down
11 changes: 0 additions & 11 deletions lib/grn_output.h
Expand Up @@ -17,21 +17,10 @@
#ifndef GRN_OUTPUT_H
#define GRN_OUTPUT_H

#ifndef GRN_H
#include "grn.h"
#endif /* GRN_H */

#ifndef GRN_CTX_H
#include "grn_ctx.h"
#endif /* GRN_CTX_H */

#ifndef GRN_STORE_H
#include "grn_store.h"
#endif /* GRN_STORE_H */

#ifndef GRN_CTX_IMPL_H
#include "grn_ctx_impl.h"
#endif /* GRN_CTX_IMPL_H */

#ifdef __cplusplus
extern "C" {
Expand Down
3 changes: 0 additions & 3 deletions lib/grn_pat.h
Expand Up @@ -17,10 +17,7 @@
#ifndef GRN_PAT_H
#define GRN_PAT_H

#ifndef GRN_H
#include "grn.h"
#endif /* GRN_H */

#include "grn_db.h"
#include "grn_hash.h"

Expand Down
8 changes: 0 additions & 8 deletions lib/grn_plugin.h
Expand Up @@ -17,17 +17,9 @@
#ifndef GRN_PLUGIN_H
#define GRN_PLUGIN_H

#ifndef GRN_H
#include "grn.h"
#endif /* GRN_H */

#ifndef GRN_CTX_H
#include "grn_ctx.h"
#endif /* GRN_CTX_H */

#ifndef GRN_STORE_H
#include "grn_store.h"
#endif /* GRN_STORE_H */

#ifdef __cplusplus
extern "C" {
Expand Down
2 changes: 0 additions & 2 deletions lib/grn_proc.h
Expand Up @@ -17,9 +17,7 @@
#ifndef GRN_PROC_H
#define GRN_PROC_H

#ifndef GRN_H
#include "grn.h"
#endif /* GRN_H */

#ifdef __cplusplus
extern "C" {
Expand Down
11 changes: 0 additions & 11 deletions lib/grn_store.h
Expand Up @@ -17,21 +17,10 @@
#ifndef GRN_STORE_H
#define GRN_STORE_H

#ifndef GRN_H
#include "grn.h"
#endif /* GRN_H */

#ifndef GRN_CTX_H
#include "grn_ctx.h"
#endif /* GRN_CTX_H */

#ifndef GRN_HASH_H
#include "grn_hash.h"
#endif /* GRN_HASH_H */

#ifndef GRN_IO_H
#include "grn_io.h"
#endif /* GRN_IO_H */

#ifdef __cplusplus
extern "C" {
Expand Down
5 changes: 0 additions & 5 deletions lib/grn_str.h
Expand Up @@ -17,13 +17,8 @@
#ifndef GRN_STR_H
#define GRN_STR_H

#ifndef GRN_H
#include "grn.h"
#endif /* GRN_H */

#ifndef GRN_NFKC_H
#include <groonga/nfkc.h>
#endif /* GRN_NFKC_H */

#ifdef __cplusplus
extern "C" {
Expand Down
11 changes: 0 additions & 11 deletions lib/grn_token.h
Expand Up @@ -17,21 +17,10 @@
#ifndef GRN_TOKEN_H
#define GRN_TOKEN_H

#ifndef GRN_H
#include "grn.h"
#endif /* GRN_H */

#ifndef GRN_CTX_H
#include "grn_ctx.h"
#endif /* GRN_CTX_H */

#ifndef GRN_DB_H
#include "grn_db.h"
#endif /* GRN_DB_H */

#ifndef GRN_STR_H
#include "grn_str.h"
#endif /* GRN_STR_H */

#include <groonga/tokenizer.h>

Expand Down
5 changes: 0 additions & 5 deletions lib/grn_util.h
Expand Up @@ -17,13 +17,8 @@
#ifndef GRN_UTIL_H
#define GRN_UTIL_H

#ifndef GRN_H
#include "grn.h"
#endif /* GRN_H */

#ifndef GRN_CTX_H
#include "grn_ctx.h"
#endif /* GRN_CTX_H */

#ifdef __cplusplus
extern "C" {
Expand Down
2 changes: 0 additions & 2 deletions lib/output.c
Expand Up @@ -15,9 +15,7 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/

#ifndef GRN_H
#include "grn.h"
#endif /* GRN_H */

#include <string.h>
#include "grn_str.h"
Expand Down

0 comments on commit 16b3e76

Please sign in to comment.