Skip to content

Commit

Permalink
Add JL_ namespace to all header include guards (JuliaLang#22904)
Browse files Browse the repository at this point in the history
Add JL_ namespace to all header include guards
  • Loading branch information
tkonolige authored and JeffBezanson committed Jul 22, 2017
1 parent d9903b1 commit a627e51
Show file tree
Hide file tree
Showing 26 changed files with 56 additions and 51 deletions.
4 changes: 2 additions & 2 deletions src/APInt-C.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// This file is a part of Julia. License is MIT: https://julialang.org/license

#ifndef APINT_C_H
#define APINT_C_H
#ifndef JL_APINT_C_H
#define JL_APINT_C_H

#ifdef __cplusplus
extern "C" {
Expand Down
4 changes: 2 additions & 2 deletions src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -214,8 +214,8 @@ $(BUILDDIR)/flisp/libflisp-debug.a: $(addprefix $(SRCDIR)/,flisp/*.h flisp/*.c)

$(BUILDDIR)/julia_version.h: $(JULIAHOME)/VERSION
@echo "// This is an autogenerated header file" > $@.$(JULIA_BUILD_MODE).tmp
@echo "#ifndef JULIA_VERSION_H" >> $@.$(JULIA_BUILD_MODE).tmp
@echo "#define JULIA_VERSION_H" >> $@.$(JULIA_BUILD_MODE).tmp
@echo "#ifndef JL_VERSION_H" >> $@.$(JULIA_BUILD_MODE).tmp
@echo "#define JL_VERSION_H" >> $@.$(JULIA_BUILD_MODE).tmp
@echo "#define JULIA_VERSION_STRING" \"$(JULIA_VERSION)\" >> $@.$(JULIA_BUILD_MODE).tmp
@echo $(JULIA_VERSION) | awk 'BEGIN {FS="[.,-]"} \
{print "#define JULIA_VERSION_MAJOR " $$1 "\n" \
Expand Down
4 changes: 2 additions & 2 deletions src/builtin_proto.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// This file is a part of Julia. License is MIT: https://julialang.org/license

#ifndef BUILTIN_PROTO_H
#define BUILTIN_PROTO_H
#ifndef JL_BUILTIN_PROTO_H
#define JL_BUILTIN_PROTO_H

#ifdef __cplusplus
extern "C" {
Expand Down
4 changes: 2 additions & 2 deletions src/flisp/equalhash.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef EQUALHASH_H
#define EQUALHASH_H
#ifndef JL_EQUALHASH_H
#define JL_EQUALHASH_H

#include "htable.h"

Expand Down
4 changes: 2 additions & 2 deletions src/flisp/opcodes.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef OPCODES_H
#define OPCODES_H
#ifndef JL_OPCODES_H
#define JL_OPCODES_H

enum {
OP_NOP=0, OP_DUP, OP_POP, OP_CALL, OP_TCALL, OP_JMP, OP_BRF, OP_BRT,
Expand Down
4 changes: 2 additions & 2 deletions src/gc.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
. pool-allocates small objects, keeps big objects on a simple list
*/

#ifndef JULIA_GC_H
#define JULIA_GC_H
#ifndef JL_GC_H
#define JL_GC_H

#include <stdlib.h>
#include <string.h>
Expand Down
4 changes: 2 additions & 2 deletions src/julia.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@

typedef struct _jl_taggedvalue_t jl_taggedvalue_t;

#include <julia_threads.h>
#include "julia_threads.h"

#ifdef __cplusplus
extern "C" {
Expand Down Expand Up @@ -1798,7 +1798,7 @@ JL_DLLEXPORT int jl_generating_output(void);
#define JL_OPTIONS_USE_COMPILECACHE_NO 0

// Version information
#include <julia_version.h>
#include "julia_version.h"

JL_DLLEXPORT extern int jl_ver_major(void);
JL_DLLEXPORT extern int jl_ver_minor(void);
Expand Down
6 changes: 3 additions & 3 deletions src/julia_internal.h
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// This file is a part of Julia. License is MIT: https://julialang.org/license

#ifndef JULIA_INTERNAL_H
#define JULIA_INTERNAL_H
#ifndef JL_INTERNAL_H
#define JL_INTERNAL_H

#include <options.h>
#include "options.h"
#include <uv.h>
#if !defined(_MSC_VER) && !defined(__MINGW32__)
#include <unistd.h>
Expand Down
4 changes: 2 additions & 2 deletions src/julia_threads.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// This file is a part of Julia. License is MIT: https://julialang.org/license

// Meant to be included in <julia.h>
#ifndef JULIA_THREADS_H
#define JULIA_THREADS_H
#ifndef JL_THREADS_H
#define JL_THREADS_H

// threading ------------------------------------------------------------------

Expand Down
4 changes: 2 additions & 2 deletions src/support/MurmurHash3.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
// MurmurHash3 was written by Austin Appleby, and is placed in the public
// domain. The author hereby disclaims copyright to this source code.

#ifndef MURMURHASH3_H
#define MURMURHASH3_H
#ifndef JL_MURMURHASH3_H
#define JL_MURMURHASH3_H

//-----------------------------------------------------------------------------
// Platform-specific functions and macros
Expand Down
4 changes: 2 additions & 2 deletions src/support/arraylist.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// This file is a part of Julia. License is MIT: https://julialang.org/license

#ifndef ARRAYLIST_H
#define ARRAYLIST_H
#ifndef JL_ARRAYLIST_H
#define JL_ARRAYLIST_H

#define AL_N_INLINE 29

Expand Down
4 changes: 2 additions & 2 deletions src/support/bitvector.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// This file is a part of Julia. License is MIT: https://julialang.org/license

#ifndef BITVECTOR_H
#define BITVECTOR_H
#ifndef JL_BITVECTOR_H
#define JL_BITVECTOR_H

#ifdef __cplusplus
extern "C" {
Expand Down
4 changes: 2 additions & 2 deletions src/support/dirpath.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// This file is a part of Julia. License is MIT: https://julialang.org/license

#ifndef DIRPATH_H
#define DIRPATH_H
#ifndef JL_DIRPATH_H
#define JL_DIRPATH_H

#ifdef _OS_WINDOWS_
#define PATHSEPSTRING "\\"
Expand Down
4 changes: 2 additions & 2 deletions src/support/dtypes.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// This file is a part of Julia. License is MIT: https://julialang.org/license

#ifndef DTYPES_H
#define DTYPES_H
#ifndef JL_DTYPES_H
#define JL_DTYPES_H

#include <stddef.h>
#include <stddef.h> // double include of stddef.h fixes #3421
Expand Down
4 changes: 2 additions & 2 deletions src/support/hashing.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// This file is a part of Julia. License is MIT: https://julialang.org/license

#ifndef HASHING_H
#define HASHING_H
#ifndef JL_HASHING_H
#define JL_HASHING_H

#include "utils.h"
#include "dtypes.h"
Expand Down
4 changes: 2 additions & 2 deletions src/support/htable.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// This file is a part of Julia. License is MIT: https://julialang.org/license

#ifndef HTABLE_H
#define HTABLE_H
#ifndef JL_HTABLE_H
#define JL_HTABLE_H

#define HT_N_INLINE 32

Expand Down
4 changes: 2 additions & 2 deletions src/support/ios.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// This file is a part of Julia. License is MIT: https://julialang.org/license

#ifndef IOS_H
#define IOS_H
#ifndef JL_IOS_H
#define JL_IOS_H

#include <stdarg.h>
#include "uv.h"
Expand Down
4 changes: 2 additions & 2 deletions src/support/libsupport.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// This file is a part of Julia. License is MIT: https://julialang.org/license

#ifndef LIBSUPPORT_H
#define LIBSUPPORT_H
#ifndef JL_LIBSUPPORT_H
#define JL_LIBSUPPORT_H

#include "platform.h"

Expand Down
4 changes: 2 additions & 2 deletions src/support/platform.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// This file is a part of Julia. License is MIT: https://julialang.org/license

#ifndef PLATFORM_H
#define PLATFORM_H
#ifndef JL_PLATFORM_H
#define JL_PLATFORM_H

/*
* This file provides convenient macros to be used to identify the platform
Expand Down
4 changes: 2 additions & 2 deletions src/support/ptrhash.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// This file is a part of Julia. License is MIT: https://julialang.org/license

#ifndef PTRHASH_H
#define PTRHASH_H
#ifndef JL_PTRHASH_H
#define JL_PTRHASH_H

#include "htable.h"

Expand Down
4 changes: 2 additions & 2 deletions src/support/strtod.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// This file is a part of Julia. License is MIT: https://julialang.org/license

#ifndef STRTOD_H
#define STRTOD_H
#ifndef JL_STRTOD_H
#define JL_STRTOD_H

#ifdef __cplusplus
extern "C" {
Expand Down
4 changes: 2 additions & 2 deletions src/support/timefuncs.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// This file is a part of Julia. License is MIT: https://julialang.org/license

#ifndef TIMEFUNCS_H
#define TIMEFUNCS_H
#ifndef JL_TIMEFUNCS_H
#define JL_TIMEFUNCS_H

#ifdef __cplusplus
extern "C" {
Expand Down
4 changes: 2 additions & 2 deletions src/support/utf8.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// This file is a part of Julia. License is MIT: https://julialang.org/license

#ifndef UTF8_H
#define UTF8_H
#ifndef JL_UTF8_H
#define JL_UTF8_H

#ifdef __cplusplus
extern "C" {
Expand Down
4 changes: 2 additions & 2 deletions src/support/utils.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// This file is a part of Julia. License is MIT: https://julialang.org/license

#ifndef UTILS_H
#define UTILS_H
#ifndef JL_UTILS_H
#define JL_UTILS_H

#ifdef __cplusplus
extern "C" {
Expand Down
4 changes: 2 additions & 2 deletions src/threadgroup.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// This file is a part of Julia. License is MIT: https://julialang.org/license

#ifndef THREADGROUP_H
#define THREADGROUP_H
#ifndef JL_THREADGROUP_H
#define JL_THREADGROUP_H

#include <stdint.h>
#include "uv.h"
Expand Down
5 changes: 5 additions & 0 deletions src/timing.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
// This file is a part of Julia. License is MIT: https://julialang.org/license

#ifndef JL_TIMING_H
#define JL_TIMING_H

#ifndef ENABLE_TIMINGS
#define JL_TIMING(owner)
#else
Expand Down Expand Up @@ -151,3 +154,5 @@ struct jl_timing_block_cpp_t {

#endif
#endif

#endif

0 comments on commit a627e51

Please sign in to comment.