Moved default file search paths to gwdirs.h which is configured by CMake from gwdirs.h.in.

This commit is contained in:
Markus Makela
2015-04-27 04:48:50 +03:00
parent 17a7b2addb
commit c500d23d04
20 changed files with 198 additions and 221 deletions

View File

@ -1,5 +1,25 @@
#ifndef _GW_HG
#define _GW_HG
/*
* This file is distributed as part of the MariaDB Corporation MaxScale. It is free
* software: you can redistribute it and/or modify it under the terms of the
* GNU General Public License as published by the Free Software Foundation,
* version 2.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
* details.
*
* You should have received a copy of the GNU General Public License along with
* this program; if not, write to the Free Software Foundation, Inc., 51
* Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Copyright MariaDB Corporation Ab 2013-2014
*/
#include <stdio.h>
#include <ctype.h>
#include <errno.h>
@ -19,17 +39,7 @@
#include <netinet/in.h>
#include <arpa/inet.h>
#include <stdbool.h>
/** Default file locations */
static const char* default_cnf_fname = "MaxScale.cnf";
static const char* default_configdir = "/etc/";
static const char* default_logdir = "/var/log/maxscale/";
static const char* default_datadir = "/var/cache/maxscale/";
static const char* default_libdir = "/lib64/maxscale/";
static const char* default_cachedir = "/var/cache/maxscale/";
static const char* default_langdir = "/usr/share/mysql/english/"; /*< This is where the MariaDB
* server installs errmsg.sys */
static const char* default_piddir = "/var/run/maxscale/";
#include <gwdirs.h>
#define EXIT_FAILURE 1

View File

@ -0,0 +1,33 @@
#ifndef _GW_DIRS_HG
#define _GW_DIRS_HG
/*
* This file is distributed as part of the MariaDB Corporation MaxScale. It is free
* software: you can redistribute it and/or modify it under the terms of the
* GNU General Public License as published by the Free Software Foundation,
* version 2.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
* details.
*
* You should have received a copy of the GNU General Public License along with
* this program; if not, write to the Free Software Foundation, Inc., 51
* Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Copyright MariaDB Corporation Ab 2015
*/
/** Default file locations, configured by CMake */
static const char* default_cnf_fname = "MaxScale.cnf";
static const char* default_configdir = "/etc/";
static const char* default_piddir = "/var/run/maxscale/";
static const char* default_logdir = "/var/log/maxscale/";
static const char* default_datadir = "/var/cache/maxscale/";
static const char* default_libdir = "@CMAKE_INSTALL_PREFIX@/@MAXSCALE_LIBDIR@";
static const char* default_cachedir = "/var/cache/maxscale/";
static const char* default_langdir = "/usr/share/mysql/english/"; /*< This is where the MariaDB
* server installs errmsg.sys */
#endif