forked from agroal/pgagroal
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
58 changed files
with
3,508 additions
and
897 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,11 @@ | ||
pgagroal was created by the following authors: | ||
|
||
Jesper Pedersen <jesper.pedersen@redhat.com> | ||
Jesper Pedersen <jesper.pedersen@comcast.net> | ||
David Fetter <david@fetter.org> | ||
Will Leinweber <will@bitfission.com> | ||
Junduo Dong <andj4cn@gmail.com> | ||
Luca Ferrari <fluca1978@gmail.com> | ||
Nikita Bugrovsky <nbugrovs@redhat.com> | ||
Lawrence Wu <lawrence910426@gmail.com> | ||
Yongting You <2010youy01@gmail.com> | ||
Ashutosh Sharma <ash2003sharma@gmail.com> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
# FindcJSON.cmake | ||
# Tries to find cJSON libraries on the system | ||
# (e.g., on Rocky Linux: cjson and cjson-devel) | ||
# | ||
# Inspired by <https://sources.debian.org/src/monado/21.0.0~dfsg1-1/cmake/FindcJSON.cmake/> | ||
# | ||
# If cJSON is found, sets the following variables: | ||
# - CJSON_INCLUDE_DIRS | ||
# - CJSON_LIBRARIES | ||
# - CJSON_VERSION | ||
# | ||
# In the header file cJSON.h the library version is specified as: | ||
# #define CJSON_VERSION_MAJOR 1 | ||
# #define CJSON_VERSION_MINOR 7 | ||
# #define CJSON_VERSION_PATCH 14 | ||
|
||
|
||
find_path( | ||
CJSON_INCLUDE_DIR | ||
NAMES cjson/cJSON.h | ||
PATH_SUFFIXES include) | ||
find_library( | ||
CJSON_LIBRARY | ||
NAMES cjson | ||
PATH_SUFFIXES lib) | ||
|
||
include(FindPackageHandleStandardArgs) | ||
find_package_handle_standard_args(cJSON REQUIRED_VARS CJSON_INCLUDE_DIR | ||
CJSON_LIBRARY) | ||
if(CJSON_FOUND) | ||
# these variables are needed for the build | ||
set( CJSON_INCLUDE_DIRS "${CJSON_INCLUDE_DIR}" ) | ||
set( CJSON_LIBRARIES "${CJSON_LIBRARY}" ) | ||
|
||
# try to get out the library version from the headers | ||
file(STRINGS "${CJSON_INCLUDE_DIR}/cjson/cJSON.h" | ||
CJSON_VERSION_MAJOR REGEX "^#define[ \t]+CJSON_VERSION_MAJOR[ \t]+[0-9]+") | ||
file(STRINGS "${CJSON_INCLUDE_DIR}/cjson/cJSON.h" | ||
CJSON_VERSION_MINOR REGEX "^#define[ \t]+CJSON_VERSION_MINOR[ \t]+[0-9]+") | ||
file(STRINGS "${CJSON_INCLUDE_DIR}/cjson/cJSON.h" | ||
CJSON_VERSION_PATCH REGEX "^#define[ \t]+CJSON_VERSION_PATCH[ \t]+[0-9]+") | ||
string(REGEX REPLACE "[^0-9]+" "" CJSON_VERSION_MAJOR "${CJSON_VERSION_MAJOR}") | ||
string(REGEX REPLACE "[^0-9]+" "" CJSON_VERSION_MINOR "${CJSON_VERSION_MINOR}") | ||
string(REGEX REPLACE "[^0-9]+" "" CJSON_VERSION_PATCH "${CJSON_VERSION_PATCH}") | ||
set(CJSON_VERSION "${CJSON_VERSION_MAJOR}.${CJSON_VERSION_MINOR}.${CJSON_VERSION_PATCH}") | ||
unset(CJSON_VERSION_MINOR) | ||
unset(CJSON_VERSION_MAJOR) | ||
unset(CJSON_VERSION_PATCH) | ||
endif() | ||
|
||
mark_as_advanced( CJSON_INCLUDE_DIR CJSON_LIBRARY ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# Valgrind | ||
|
||
The [Valgrind](https://valgrind.org/) tool suite provides a number of debugging and profiling tools that help you make your programs faster and more correct. The most popular and the default of these tools is called **Memcheck**. It can detect many memory-related errors that can lead to crashes and unpredictable behaviour. | ||
|
||
# Run memory management detection | ||
|
||
``` bash | ||
valgrind --leak-check=full --show-leak-kinds=all --log-file=%p.log --trace-children=yes --track-origins=yes --read-var-info=yes ./pgagroal -c pgagroal.conf -a pgagroal_hba.conf | ||
``` | ||
|
||
# Generate valgrind report with suppressed rules | ||
|
||
``` bash | ||
valgrind --suppressions=../../contrib/valgrind/pgagroal.supp --leak-check=full --show-leak-kinds=all --log-file=%p.log --trace-children=yes --track-origins=yes --read-var-info=yes ./pgagroal -c pgagroal.conf -a pgagroal_hba.conf | ||
``` | ||
|
Oops, something went wrong.