Cleanup gw.h, part 1.
Gw.h contained a fair amount of obsolete function declarations, duplicate declarations of functions declared in utils.h and declarations of functions that conceptually are similar to those in utils.h. The obsolete and duplicate ones were removed and all but one of the remaining moved to utils.h. Correspondingly the implementation was moved from gw_utils.c to utils.c. The one remaining function - gw_daemonize() - is not really worthy of a file of its own, so that is to be moved to gateway.c after which gw_utils.c can be removed. Gw.h still contains defines that are duplicated in maxscale/protocol/mysql.h. The ones in gw.h are to be removed. It appears that the entire gw.h will disappear.
This commit is contained in:
@ -27,8 +27,10 @@
|
||||
*/
|
||||
|
||||
#include <maxscale/cdefs.h>
|
||||
#include <ctype.h>
|
||||
#include <math.h>
|
||||
#include <stdlib.h>
|
||||
#include <netinet/in.h>
|
||||
|
||||
MXS_BEGIN_DECLS
|
||||
|
||||
@ -41,6 +43,9 @@ bool utils_init(); /*< Call this first before using any other function */
|
||||
void utils_end();
|
||||
|
||||
int setnonblocking(int fd);
|
||||
int parse_bindconfig(const char *, struct sockaddr_in *);
|
||||
int setipaddress(struct in_addr *, char *);
|
||||
|
||||
char *gw_strend(register const char *s);
|
||||
static char gw_randomchar();
|
||||
int gw_generate_random_str(char *output, int len);
|
||||
@ -67,6 +72,12 @@ char* replace_literal(char* haystack,
|
||||
const char* replacement);
|
||||
char* replace_quoted(const char** src, const size_t* srcsize, char** dest, size_t* destsize);
|
||||
|
||||
void clean_up_pathname(char *path);
|
||||
|
||||
bool mxs_mkdir_all(const char *path, int mask);
|
||||
|
||||
long get_processor_count();
|
||||
|
||||
MXS_END_DECLS
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user