Skip to content

Commit

Permalink
Fix build with enable-dtrace
Browse files Browse the repository at this point in the history
refer to issue #108
  • Loading branch information
Maxim Orlov committed May 27, 2022
1 parent 1c6d616 commit 7197b83
Show file tree
Hide file tree
Showing 8 changed files with 38 additions and 0 deletions.
24 changes: 24 additions & 0 deletions src/disable_core_macro.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
/*-------------------------------------------------------------------------
*
* disable_core_macro.h
* Support including tuplesort.c from postgresql core code.
*
* Copyright (c) 2022, Postgres Professional
*
*-------------------------------------------------------------------------
*/

#ifndef __DISABLE_CORE_MACRO_H__
#define __DISABLE_CORE_MACRO_H__

#undef TRACE_SORT
#undef DEBUG_BOUNDED_SORT
#undef TRACE_POSTGRESQL_SORT_START
#undef TRACE_POSTGRESQL_SORT_DONE

#define TRACE_POSTGRESQL_SORT_START(arg1, arg2, arg3, arg4, arg5, arg6) \
do {} while(0)
#define TRACE_POSTGRESQL_SORT_DONE(arg1, arg2) \
do {} while(0)

#endif /* __DISABLE_CORE_MACRO_H__ */
2 changes: 2 additions & 0 deletions src/tuplesort10.c
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,8 @@
#include "utils/sortsupport.h"
#include "utils/tuplesort.h"

/* Should be the last include */
#include "disable_core_macro.h"

/* sort-type codes for sort__start probes */
#define HEAP_SORT 0
Expand Down
2 changes: 2 additions & 0 deletions src/tuplesort11.c
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,8 @@
#include "utils/sortsupport.h"
#include "utils/tuplesort.h"

/* Should be the last include */
#include "disable_core_macro.h"

/* sort-type codes for sort__start probes */
#define HEAP_SORT 0
Expand Down
2 changes: 2 additions & 0 deletions src/tuplesort12.c
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,8 @@
#include "utils/sortsupport.h"
#include "utils/tuplesort.h"

/* Should be the last include */
#include "disable_core_macro.h"

/* sort-type codes for sort__start probes */
#define HEAP_SORT 0
Expand Down
2 changes: 2 additions & 0 deletions src/tuplesort13.c
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,8 @@
#include "utils/sortsupport.h"
#include "utils/tuplesort.h"

/* Should be the last include */
#include "disable_core_macro.h"

/* sort-type codes for sort__start probes */
#define HEAP_SORT 0
Expand Down
2 changes: 2 additions & 0 deletions src/tuplesort14.c
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,8 @@
#include "utils/sortsupport.h"
#include "utils/tuplesort.h"

/* Should be the last include */
#include "disable_core_macro.h"

/* sort-type codes for sort__start probes */
#define HEAP_SORT 0
Expand Down
2 changes: 2 additions & 0 deletions src/tuplesort15.c
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,8 @@
#include "utils/sortsupport.h"
#include "utils/tuplesort.h"

/* Should be the last include */
#include "disable_core_macro.h"

/* sort-type codes for sort__start probes */
#define HEAP_SORT 0
Expand Down
2 changes: 2 additions & 0 deletions src/tuplesort96.c
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,8 @@
#include "utils/sortsupport.h"
#include "utils/tuplesort.h"

/* Should be the last include */
#include "disable_core_macro.h"

/* sort-type codes for sort__start probes */
#define HEAP_SORT 0
Expand Down

0 comments on commit 7197b83

Please sign in to comment.