81 lines
2.9 KiB
C
81 lines
2.9 KiB
C
#ifndef _GW_DIRS_HG
|
|
#define _GW_DIRS_HG
|
|
/*
|
|
* Copyright (c) 2016 MariaDB Corporation Ab
|
|
*
|
|
* Use of this software is governed by the Business Source License included
|
|
* in the LICENSE.TXT file and at www.mariadb.com/bsl.
|
|
*
|
|
* Change Date: 2019-07-01
|
|
*
|
|
* On the date above, in accordance with the Business Source License, use
|
|
* of this software will be governed by version 2 or later of the General
|
|
* Public License.
|
|
*/
|
|
#ifndef _GNU_SOURCE
|
|
#define _GNU_SOURCE 1
|
|
#endif
|
|
#include <stdlib.h>
|
|
#include <string.h>
|
|
#include <skygw_utils.h>
|
|
|
|
EXTERN_C_BLOCK_BEGIN
|
|
|
|
// NOTE: If you make changes here, ensure they are compatible with the
|
|
// situation in <root>/CMakeLists.txt, where directories are installed.
|
|
#define MXS_DEFAULT_PID_SUBPATH "run/maxscale"
|
|
#define MXS_DEFAULT_LOG_SUBPATH "log/maxscale"
|
|
#define MXS_DEFAULT_DATA_SUBPATH "lib/maxscale"
|
|
#define MXS_DEFAULT_LIB_SUBPATH "@MAXSCALE_LIBDIR@"
|
|
#define MXS_DEFAULT_CACHE_SUBPATH "cache/maxscale"
|
|
#define MXS_DEFAULT_LANG_SUBPATH "lib/maxscale"
|
|
#define MXS_DEFAULT_EXEC_SUBPATH "@MAXSCALE_BINDIR@"
|
|
#define MXS_DEFAULT_CONFIG_SUBPATH "etc"
|
|
|
|
/** Default file locations, configured by CMake */
|
|
static const char* default_cnf_fname = "maxscale.cnf";
|
|
static const char* default_configdir = "/" MXS_DEFAULT_CONFIG_SUBPATH;
|
|
/*< This should be changed to just /run eventually,
|
|
* the /var/run folder is an old standard and the newer FSH 3.0
|
|
* uses /run for PID files.*/
|
|
static const char* default_piddir = "@MAXSCALE_VARDIR@/" MXS_DEFAULT_PID_SUBPATH;
|
|
static const char* default_logdir = "@MAXSCALE_VARDIR@/" MXS_DEFAULT_LOG_SUBPATH;
|
|
static const char* default_datadir = "@MAXSCALE_VARDIR@/" MXS_DEFAULT_DATA_SUBPATH;
|
|
static const char* default_libdir = "@CMAKE_INSTALL_PREFIX@/" MXS_DEFAULT_LIB_SUBPATH;
|
|
static const char* default_cachedir = "@MAXSCALE_VARDIR@/" MXS_DEFAULT_CACHE_SUBPATH;
|
|
static const char* default_langdir = "@MAXSCALE_VARDIR@/" MXS_DEFAULT_LANG_SUBPATH;
|
|
static const char* default_execdir = "@CMAKE_INSTALL_PREFIX@/" MXS_DEFAULT_EXEC_SUBPATH;
|
|
|
|
static char* configdir = NULL;
|
|
static char* logdir = NULL;
|
|
static char* libdir = NULL;
|
|
static char* cachedir = NULL;
|
|
static char* maxscaledatadir = NULL; /*< The data directory */
|
|
static char* processdatadir = NULL; /*< Process specific data directory */
|
|
static char* langdir = NULL;
|
|
static char* piddir = NULL;
|
|
static char* execdir = NULL;
|
|
|
|
void set_libdir(char* param);
|
|
void set_datadir(char* param);
|
|
void set_process_datadir(char* param);
|
|
void set_cachedir(char* param);
|
|
void set_configdir(char* param);
|
|
void set_logdir(char* param);
|
|
void set_langdir(char* param);
|
|
void set_piddir(char* param);
|
|
void set_execdir(char* param);
|
|
char* get_libdir();
|
|
char* get_datadir();
|
|
char* get_process_datadir();
|
|
char* get_cachedir();
|
|
char* get_configdir();
|
|
char* get_piddir();
|
|
char* get_logdir();
|
|
char* get_langdir();
|
|
char* get_execdir();
|
|
|
|
EXTERN_C_BLOCK_END
|
|
|
|
#endif
|