Skip to content

Commit

Permalink
FT-241 Use #pragma once as a header guard
Browse files Browse the repository at this point in the history
  • Loading branch information
esmet committed Jun 15, 2014
1 parent 28a6280 commit 53d281e
Show file tree
Hide file tree
Showing 128 changed files with 244 additions and 590 deletions.
6 changes: 2 additions & 4 deletions ft/background_job_manager.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
/* -*- mode: C++; c-basic-offset: 4; indent-tabs-mode: nil -*- */
// vim: ft=cpp:expandtab:ts=8:sw=4:softtabstop=4:
#ifndef BACKGROUND_JOB_MANAGER_H
#define BACKGROUND_JOB_MANAGER_H
#ident "$Id$"
/*
COPYING CONDITIONS NOTICE:
Expand Down Expand Up @@ -88,6 +86,8 @@ PATENT RIGHTS GRANT:
under this License.
*/

#pragma once

#ident "Copyright (c) 2007-2013 Tokutek Inc. All rights reserved."
#ident "The technology is licensed by the Massachusetts Institute of Technology, Rutgers State University of New Jersey, and the Research Foundation of State University of New York at Stony Brook under United States of America Serial No. 11/760379 and to the patents and/or patent applications resulting from it."

Expand Down Expand Up @@ -130,5 +130,3 @@ void bjm_remove_background_job(BACKGROUND_JOB_MANAGER bjm);
// has completed, bjm_add_background_job returns an error.
//
void bjm_wait_for_jobs_to_finish(BACKGROUND_JOB_MANAGER bjm);

#endif
7 changes: 2 additions & 5 deletions ft/block_allocator.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
/* -*- mode: C++; c-basic-offset: 4; indent-tabs-mode: nil -*- */
// vim: ft=cpp:expandtab:ts=8:sw=4:softtabstop=4:
#ifndef BLOCK_ALLOCATOR_H
#define BLOCK_ALLOCATOR_H

#ident "$Id$"
/*
Expand Down Expand Up @@ -89,6 +87,8 @@ PATENT RIGHTS GRANT:
under this License.
*/

#pragma once

#ident "Copyright (c) 2007-2013 Tokutek Inc. All rights reserved."
#ident "The technology is licensed by the Massachusetts Institute of Technology, Rutgers State University of New Jersey, and the Research Foundation of State University of New York at Stony Brook under United States of America Serial No. 11/760379 and to the patents and/or patent applications resulting from it."

Expand Down Expand Up @@ -222,6 +222,3 @@ void block_allocator_merge_blockpairs_into (uint64_t d, struct block_alloc
// dst must be large enough.
// No blocks may overlap.
// Rationale: This is exposed so it can be tested by a glass box tester. Otherwise it would be static (file-scope) function inside block_allocator.c


#endif
7 changes: 2 additions & 5 deletions ft/block_table.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
/* -*- mode: C++; c-basic-offset: 4; indent-tabs-mode: nil -*- */
// vim: ft=cpp:expandtab:ts=8:sw=4:softtabstop=4:
#ifndef BLOCKTABLE_H
#define BLOCKTABLE_H
#ident "$Id$"
/*
COPYING CONDITIONS NOTICE:
Expand Down Expand Up @@ -88,6 +86,8 @@ PATENT RIGHTS GRANT:
under this License.
*/

#pragma once

#ident "Copyright (c) 2007-2013 Tokutek Inc. All rights reserved."
#ident "The technology is licensed by the Massachusetts Institute of Technology, Rutgers State University of New Jersey, and the Research Foundation of State University of New York at Stony Brook under United States of America Serial No. 11/760379 and to the patents and/or patent applications resulting from it."

Expand Down Expand Up @@ -171,6 +171,3 @@ enum {RESERVED_BLOCKNUM_NULL =0,
RESERVED_BLOCKNUM_DESCRIPTOR =2,
RESERVED_BLOCKNUMS};


#endif

2 changes: 0 additions & 2 deletions ft/bndata.h
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@ PATENT RIGHTS GRANT:
#ident "Copyright (c) 2007-2013 Tokutek Inc. All rights reserved."
#ident "The technology is licensed by the Massachusetts Institute of Technology, Rutgers State University of New Jersey, and the Research Foundation of State University of New York at Stony Brook under United States of America Serial No. 11/760379 and to the patents and/or patent applications resulting from it."


#pragma once

#include <util/mempool.h>
Expand Down Expand Up @@ -384,4 +383,3 @@ class bn_data {
uint32_t key_data_size, uint32_t val_data_size, bool all_keys_same_length,
uint32_t fixed_klpair_length);
};

7 changes: 2 additions & 5 deletions ft/cachetable-internal.h
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
/* -*- mode: C++; c-basic-offset: 4; indent-tabs-mode: nil -*- */
// vim: ft=cpp:expandtab:ts=8:sw=4:softtabstop=4:

#ifndef TokuDB_cachetable_internal_h
#define TokuDB_cachetable_internal_h

#ident "$Id$"
/*
COPYING CONDITIONS NOTICE:
Expand Down Expand Up @@ -90,6 +87,8 @@ PATENT RIGHTS GRANT:
under this License.
*/

#pragma once

#ident "Copyright (c) 2007-2013 Tokutek Inc. All rights reserved."
#ident "The technology is licensed by the Massachusetts Institute of Technology, Rutgers State University of New Jersey, and the Research Foundation of State University of New York at Stony Brook under United States of America Serial No. 11/760379 and to the patents and/or patent applications resulting from it."

Expand Down Expand Up @@ -654,5 +653,3 @@ struct cachetable {

char *env_dir;
};

#endif // End of header guardian.
6 changes: 2 additions & 4 deletions ft/cachetable.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
/* -*- mode: C++; c-basic-offset: 4; indent-tabs-mode: nil -*- */
// vim: ft=cpp:expandtab:ts=8:sw=4:softtabstop=4:
#ifndef CACHETABLE_H
#define CACHETABLE_H

#ident "$Id$"
/*
Expand Down Expand Up @@ -89,6 +87,8 @@ PATENT RIGHTS GRANT:
under this License.
*/

#pragma once

#ident "Copyright (c) 2007-2013 Tokutek Inc. All rights reserved."
#ident "The technology is licensed by the Massachusetts Institute of Technology, Rutgers State University of New Jersey, and the Research Foundation of State University of New York at Stony Brook under United States of America Serial No. 11/760379 and to the patents and/or patent applications resulting from it."

Expand Down Expand Up @@ -639,5 +639,3 @@ void toku_pair_list_set_lock_size(uint32_t num_locks);
// layer.
__attribute__((const,nonnull))
bool toku_ctpair_is_write_locked(PAIR pair);

#endif /* CACHETABLE_H */
7 changes: 2 additions & 5 deletions ft/checkpoint.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
/* -*- mode: C++; c-basic-offset: 4; indent-tabs-mode: nil -*- */
// vim: ft=cpp:expandtab:ts=8:sw=4:softtabstop=4:
#ifndef TOKU_CHECKPOINT_H
#define TOKU_CHECKPOINT_H

/*
COPYING CONDITIONS NOTICE:
Expand Down Expand Up @@ -88,6 +86,8 @@ PATENT RIGHTS GRANT:
under this License.
*/

#pragma once

#ident "Copyright (c) 2009-2013 Tokutek Inc. All rights reserved."
#ident "The technology is licensed by the Massachusetts Institute of Technology, Rutgers State University of New Jersey, and the Research Foundation of State University of New York at Stony Brook under United States of America Serial No. 11/760379 and to the patents and/or patent applications resulting from it."
#ident "$Id$"
Expand Down Expand Up @@ -200,6 +200,3 @@ typedef struct {
} CHECKPOINT_STATUS_S, *CHECKPOINT_STATUS;

void toku_checkpoint_get_status(CACHETABLE ct, CHECKPOINT_STATUS stat);


#endif
5 changes: 2 additions & 3 deletions ft/comparator.h
Original file line number Diff line number Diff line change
Expand Up @@ -85,12 +85,11 @@ PATENT RIGHTS GRANT:
under this License.
*/

#pragma once

#ident "Copyright (c) 2007-2013 Tokutek Inc. All rights reserved."
#ident "The technology is licensed by the Massachusetts Institute of Technology, Rutgers State University of New Jersey, and the Research Foundation of State University of New York at Stony Brook under United States of America Serial No. 11/760379 and to the patents and/or patent applications resulting from it."


#pragma once

#include <db.h>
#include <string.h>

Expand Down
8 changes: 2 additions & 6 deletions ft/compress.h
Original file line number Diff line number Diff line change
Expand Up @@ -86,13 +86,11 @@ PATENT RIGHTS GRANT:
under this License.
*/

#pragma once

#ident "Copyright (c) 2007-2013 Tokutek Inc. All rights reserved."
#ident "The technology is licensed by the Massachusetts Institute of Technology, Rutgers State University of New Jersey, and the Research Foundation of State University of New York at Stony Brook under United States of America Serial No. 11/760379 and to the patents and/or patent applications resulting from it."

#ifndef TOKU_COMPRESS_H
#define TOKU_COMPRESS_H


#include <zlib.h>
#include <db.h>

Expand Down Expand Up @@ -131,5 +129,3 @@ void toku_decompress (Bytef *dest, uLongf destLen,
// This function can decompress data compressed with either zlib or quicklz compression methods (calling toku_compress(), which puts an appropriate header on so we know which it is.)
// Requires: destLen is equal to the actual decompressed size of the data.
// Requires: The source must have been properly compressed.

#endif
6 changes: 2 additions & 4 deletions ft/ft-cachetable-wrappers.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
/* -*- mode: C++; c-basic-offset: 4; indent-tabs-mode: nil -*- */
// vim: ft=cpp:expandtab:ts=8:sw=4:softtabstop=4:
#ifndef FT_CACHETABLE_WRAPPERS_H
#define FT_CACHETABLE_WRAPPERS_H

#ident "$Id$"
/*
Expand Down Expand Up @@ -89,6 +87,8 @@ PATENT RIGHTS GRANT:
under this License.
*/

#pragma once

#ident "Copyright (c) 2007-2013 Tokutek Inc. All rights reserved."
#ident "The technology is licensed by the Massachusetts Institute of Technology, Rutgers State University of New Jersey, and the Research Foundation of State University of New York at Stony Brook under United States of America Serial No. 11/760379 and to the patents and/or patent applications resulting from it."

Expand Down Expand Up @@ -192,5 +192,3 @@ void toku_unpin_ftnode_read_only(FT ft, FTNODE node);

// Effect: Swaps pair values of two pinned nodes
void toku_ftnode_swap_pair_values(FTNODE nodea, FTNODE nodeb);

#endif
6 changes: 2 additions & 4 deletions ft/ft-flusher-internal.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
/* -*- mode: C++; c-basic-offset: 4; indent-tabs-mode: nil -*- */
// vim: ft=cpp:expandtab:ts=8:sw=4:softtabstop=4:
#ifndef FT_FLUSHER_INTERNAL_H
#define FT_FLUSHER_INTERNAL_H
#ident "$Id$"
/*
COPYING CONDITIONS NOTICE:
Expand Down Expand Up @@ -88,6 +86,8 @@ PATENT RIGHTS GRANT:
under this License.
*/

#pragma once

#ident "Copyright (c) 2007-2013 Tokutek Inc. All rights reserved."
#ident "The technology is licensed by the Massachusetts Institute of Technology, Rutgers State University of New Jersey, and the Research Foundation of State University of New York at Stony Brook under United States of America Serial No. 11/760379 and to the patents and/or patent applications resulting from it."

Expand Down Expand Up @@ -236,5 +236,3 @@ default_pick_child_after_split(FT h,
int childnumb,
void *extra);


#endif // End of header guardian.
6 changes: 2 additions & 4 deletions ft/ft-flusher.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
/* -*- mode: C++; c-basic-offset: 4; indent-tabs-mode: nil -*- */
// vim: ft=cpp:expandtab:ts=8:sw=4:softtabstop=4:
#ifndef FT_FLUSHER_H
#define FT_FLUSHER_H
#ident "$Id$"
/*
COPYING CONDITIONS NOTICE:
Expand Down Expand Up @@ -88,6 +86,8 @@ PATENT RIGHTS GRANT:
under this License.
*/

#pragma once

#ident "Copyright (c) 2007-2013 Tokutek Inc. All rights reserved."
#ident "The technology is licensed by the Massachusetts Institute of Technology, Rutgers State University of New Jersey, and the Research Foundation of State University of New York at Stony Brook under United States of America Serial No. 11/760379 and to the patents and/or patent applications resulting from it."

Expand Down Expand Up @@ -251,5 +251,3 @@ int
toku_ft_hot_optimize(FT_HANDLE ft_h, DBT* left, DBT* right,
int (*progress_callback)(void *extra, float progress),
void *progress_extra, uint64_t* loops_run);

#endif // End of header guardian.
6 changes: 2 additions & 4 deletions ft/ft-internal.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
/* -*- mode: C++; c-basic-offset: 4; indent-tabs-mode: nil -*- */
// vim: ft=cpp:expandtab:ts=8:sw=4:softtabstop=4:
#ifndef FT_INTERNAL_H
#define FT_INTERNAL_H

#ident "$Id$"
/*
Expand Down Expand Up @@ -89,6 +87,8 @@ PATENT RIGHTS GRANT:
under this License.
*/

#pragma once

#ident "Copyright (c) 2007-2013 Tokutek Inc. All rights reserved."
#ident "The technology is licensed by the Massachusetts Institute of Technology, Rutgers State University of New Jersey, and the Research Foundation of State University of New York at Stony Brook under United States of America Serial No. 11/760379 and to the patents and/or patent applications resulting from it."

Expand Down Expand Up @@ -1229,5 +1229,3 @@ void toku_flusher_thread_set_callback(void (*callback_f)(int, void*), void* extr

int toku_upgrade_subtree_estimates_to_stat64info(int fd, FT h) __attribute__((nonnull));
int toku_upgrade_msn_from_root_to_header(int fd, FT h) __attribute__((nonnull));

#endif
6 changes: 2 additions & 4 deletions ft/ft-ops.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
/* -*- mode: C++; c-basic-offset: 4; indent-tabs-mode: nil -*- */
// vim: ft=cpp:expandtab:ts=8:sw=4:softtabstop=4:
#ifndef FT_OPS_H
#define FT_OPS_H
#ident "$Id$"
/*
COPYING CONDITIONS NOTICE:
Expand Down Expand Up @@ -88,6 +86,8 @@ PATENT RIGHTS GRANT:
under this License.
*/

#pragma once

#ident "Copyright (c) 2007-2013 Tokutek Inc. All rights reserved."
#ident "The technology is licensed by the Massachusetts Institute of Technology, Rutgers State University of New Jersey, and the Research Foundation of State University of New York at Stony Brook under United States of America Serial No. 11/760379 and to the patents and/or patent applications resulting from it."

Expand Down Expand Up @@ -362,5 +362,3 @@ void toku_ft_set_direct_io(bool direct_io_on);
void toku_ft_set_compress_buffers_before_eviction(bool compress_buffers);

void toku_note_deserialized_basement_node(bool fixed_key_size);

#endif
7 changes: 2 additions & 5 deletions ft/ft-search.h
Original file line number Diff line number Diff line change
Expand Up @@ -86,12 +86,11 @@ PATENT RIGHTS GRANT:
under this License.
*/

#pragma once

#ident "Copyright (c) 2007-2013 Tokutek Inc. All rights reserved."
#ident "The technology is licensed by the Massachusetts Institute of Technology, Rutgers State University of New Jersey, and the Research Foundation of State University of New York at Stony Brook under United States of America Serial No. 11/760379 and to the patents and/or patent applications resulting from it."

#ifndef FT_SEARCH_H
#define FT_SEARCH_H

#include "ft/ybt.h"

enum ft_search_direction_e {
Expand Down Expand Up @@ -155,5 +154,3 @@ static inline ft_search_t *ft_search_init(ft_search_t *so, ft_search_compare_fun
static inline void ft_search_finish(ft_search_t *so) {
toku_destroy_dbt(&so->pivot_bound);
}

#endif
6 changes: 2 additions & 4 deletions ft/ft.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
/* -*- mode: C++; c-basic-offset: 4; indent-tabs-mode: nil -*- */
// vim: ft=cpp:expandtab:ts=8:sw=4:softtabstop=4:
#ifndef FT_H
#define FT_H
#ident "$Id$"
/*
COPYING CONDITIONS NOTICE:
Expand Down Expand Up @@ -88,6 +86,8 @@ PATENT RIGHTS GRANT:
under this License.
*/

#pragma once

#ident "Copyright (c) 2007-2013 Tokutek Inc. All rights reserved."
#ident "The technology is licensed by the Massachusetts Institute of Technology, Rutgers State University of New Jersey, and the Research Foundation of State University of New York at Stony Brook under United States of America Serial No. 11/760379 and to the patents and/or patent applications resulting from it."

Expand Down Expand Up @@ -223,5 +223,3 @@ extern int tokudb_num_envs;

int toku_keycompare (bytevec key1, ITEMLEN key1len, bytevec key2, ITEMLEN key2len);
int toku_builtin_compare_fun (DB *, const DBT *, const DBT*) __attribute__((__visibility__("default")));

#endif
6 changes: 2 additions & 4 deletions ft/ft_layout_version.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
/* -*- mode: C++; c-basic-offset: 4; indent-tabs-mode: nil -*- */
// vim: ft=cpp:expandtab:ts=8:sw=4:softtabstop=4:
#ifndef FT_LAYOUT_VERSION_H
#define FT_LAYOUT_VERSION_H

#ident "$Id$"
/*
Expand Down Expand Up @@ -89,6 +87,8 @@ PATENT RIGHTS GRANT:
under this License.
*/

#pragma once

#ident "Copyright (c) 2007-2013 Tokutek Inc. All rights reserved."
#ident "The technology is licensed by the Massachusetts Institute of Technology, Rutgers State University of New Jersey, and the Research Foundation of State University of New York at Stony Brook under United States of America Serial No. 11/760379 and to the patents and/or patent applications resulting from it."

Expand Down Expand Up @@ -130,5 +130,3 @@ enum ft_layout_version_e {
FT_FIRST_LAYOUT_VERSION_WITH_END_TO_END_CHECKSUM = FT_LAYOUT_VERSION_14,
FT_FIRST_LAYOUT_VERSION_WITH_BASEMENT_NODES = FT_LAYOUT_VERSION_15,
};

#endif
7 changes: 2 additions & 5 deletions ft/ft_msg.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@
* a message buffer.
*/

#ifndef FT_MSG_H
#define FT_MSG_H

#ident "$Id$"
/*
COPYING CONDITIONS NOTICE:
Expand Down Expand Up @@ -95,6 +92,8 @@ PATENT RIGHTS GRANT:
under this License.
*/

#pragma once

#ident "Copyright (c) 2007-2013 Tokutek Inc. All rights reserved."
#ident "The technology is licensed by the Massachusetts Institute of Technology, Rutgers State University of New Jersey, and the Research Foundation of State University of New York at Stony Brook under United States of America Serial No. 11/760379 and to the patents and/or patent applications resulting from it."

Expand Down Expand Up @@ -211,5 +210,3 @@ void *ft_msg_get_key(FT_MSG ft_msg);
void *ft_msg_get_val(FT_MSG ft_msg);

enum ft_msg_type ft_msg_get_type(FT_MSG ft_msg);

#endif
Loading

0 comments on commit 53d281e

Please sign in to comment.