From cf01fddc15bc4ace7297b54d2ff9a030de897ac8 Mon Sep 17 00:00:00 2001 From: Polonkai Gergely Date: Thu, 22 Mar 2012 18:49:59 +0000 Subject: [PATCH] Moved MAX_RECV_LEN into config.h --- configure.ac | 1 + src/main.c | 2 -- src/networking.c | 6 ++++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/configure.ac b/configure.ac index a134ce9..be817b1 100644 --- a/configure.ac +++ b/configure.ac @@ -21,6 +21,7 @@ if test "$enable_memcached" = "yes"; then fi AC_DEFINE([DEFAULT_PORT], [4000], [The default port number if not specified in the config file]) +AC_DEFINE([MAX_RECV_LEN], [1024]) PKG_CHECK_MODULES([GIO], gio-2.0) PKG_CHECK_MODULES([GLIB], glib-2.0) diff --git a/src/main.c b/src/main.c index 8114e24..f64993d 100644 --- a/src/main.c +++ b/src/main.c @@ -10,8 +10,6 @@ #include "interpreter.h" #include "db.h" -#define MAX_RECV_LEN 1024 - struct { char *file; int line; diff --git a/src/networking.c b/src/networking.c index 6d1b291..c8700f2 100644 --- a/src/networking.c +++ b/src/networking.c @@ -3,14 +3,16 @@ #include #include +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif /* HAVE_CONFIG_H */ + #include "main.h" #include "networking.h" #include "interpreter.h" #include "players.h" #include "db.h" -#define MAX_RECV_LEN 1024 - struct AcceptData { GMainContext *context; GSocketListener *listener;