Jump to content
  • 0
Fou-lu

Compile in Linux

Question

 

checking PCRE library... checking pcre.h usability... no
checking pcre.h presence... no
checking for pcre.h... no
configure: error: PCRE header not found

 

 
When I run ./configure I get this error. In git Hercules says that this library is optional, so why is preventing me from compiling ? And what is the importance of it?

Share this post


Link to post
Share on other sites

33 answers to this question

Recommended Posts

  • 0

I came across this weird error before, what I had to do was take pcre.h and put it into the right folder src/map/ folder

Then define it in the correct source file.
 

#include "map/pcre.h"


PS: Pretty sure my error on this came up when I was trying to add a plugin. For example I took pcre.h into the map followed by including it into npc.c

Share this post


Link to post
Share on other sites
  • 0

Ok , I could solve this problem .

My next problem is that what happens after I give the make sql . I am having error with a file include sockt.c

 

 

        CC      socket.c
In file included from /usr/include/linux/tcp.h:21,
                 from socket.c:49:
/usr/include/asm/byteorder.h:24: error: expected '=', ',', ';', 'asm' or '__attr
ibute__' before '___arch__swab64'
In file included from /usr/include/linux/byteorder/little_endian.h:12,
                 from /usr/include/asm/byteorder.h:53,
                 from /usr/include/linux/tcp.h:21,
                 from socket.c:49:
/usr/include/linux/byteorder/swab.h:71: error: expected '=', ',', ';', 'asm' or
'__attribute__' before '___swab64'
/usr/include/linux/byteorder/swab.h:187: error: expected '=', ',', ';', 'asm' or
 '__attribute__' before '__fswab64'
/usr/include/linux/byteorder/swab.h:197: error: expected '=', ',', ';', 'asm' or
 '__attribute__' before '__swab64p'
/usr/include/linux/byteorder/swab.h:201: error: expected ')' before '*' token
In file included from /usr/include/asm/byteorder.h:53,
                 from /usr/include/linux/tcp.h:21,
                 from socket.c:49:
/usr/include/linux/byteorder/little_endian.h:43: error: expected '=', ',', ';',
'asm' or '__attribute__' before '__cpu_to_le64p'
/usr/include/linux/byteorder/little_endian.h:47: error: expected '=', ',', ';',
'asm' or '__attribute__' before '__le64_to_cpup'
/usr/include/linux/byteorder/little_endian.h:67: error: expected '=', ',', ';',
'asm' or '__attribute__' before '__cpu_to_be64p'
/usr/include/linux/byteorder/little_endian.h:71: error: expected '=', ',', ';',
'asm' or '__attribute__' before '__be64_to_cpup'
make[1]: *** [obj_all/socket.o] Error 1
make[1]: Leaving directory `/home/emulador_teste/neo-emulator/src/common'
make: *** [common_sql] Error 2

 

 
I have an old emulator that is compiling normal and it socket.c the file is not asking to include what is that line 49 it currently does not , he has compiled directly with the coming in of this new emulator else .

Share this post


Link to post
Share on other sites
  • 0

Someone would know what problem would that be? The solution that comes in my mind is to edit the socket.c , but I think it should be some misconfigured library. Nobody ever experienced this ?

Share this post


Link to post
Share on other sites
  • 0

I have exactly the same problem, what to do?

 

am used gcc 4.5.0 pcre 8-36

 

 

 

:/mnt/sda3_230GB/hm # make
        MAKE    mt19937ar
make[1]: Entering directory `/mnt/sda3_230GB/hm/3rdparty/mt19937ar'
        CC      mt19937ar.c
make[1]: Leaving directory `/mnt/sda3_230GB/hm/3rdparty/mt19937ar'
        MAKE    libconfig
make[1]: Entering directory `/mnt/sda3_230GB/hm/3rdparty/libconfig'
        CC      libconfig.c
        CC      grammar.c
        CC      scanctx.c
        CC      scanner.c
        CC      strbuf.c
make[1]: Leaving directory `/mnt/sda3_230GB/hm/3rdparty/libconfig'
        MAKE    common_sql
make[1]: Entering directory `/mnt/sda3_230GB/hm/src/common'
        MKDIR   obj_all
        CC      conf.c
        CC      db.c
        CC      des.c
        CC      ers.c
        CC      grfio.c
        CC      HPM.c
        CC      mapindex.c
        CC      md5calc.c
        CC      mutex.c
        CC      nullpo.c
        CC      random.c
        CC      showmsg.c
        CC      strlib.c
        CC      sysinfo.c
        CC      thread.c
        CC      timer.c
        CC      utils.c
        CC      console.c
        CC      core.c
        CC      memmgr.c
        CC      socket.c
In file included from /usr/include/asm/byteorder.h:59:0,
                 from /usr/include/linux/tcp.h:21,
                 from socket.c:49:
/usr/include/linux/byteorder/little_endian.h:43:22: ошибка: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘__cpu_to_le64p’
/usr/include/linux/byteorder/little_endian.h:47:49: ошибка: expected ‘;’, ‘,’ or ‘)’ before ‘*’ token
/usr/include/linux/byteorder/little_endian.h:67:22: ошибка: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘__cpu_to_be64p’
/usr/include/linux/byteorder/little_endian.h:71:49: ошибка: expected ‘;’, ‘,’ or ‘)’ before ‘*’ token
make[1]: *** [obj_all/socket.o] Error 1
make[1]: Leaving directory `/mnt/sda3_230GB/hm/src/common'
make: *** [common_sql] Error 2

my log ./configure

:/mnt/sda3_230GB/hm # ./configure

checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking minix/config.h usability... no
checking minix/config.h presence... no
checking for minix/config.h... no
checking whether it is safe to define __EXTENSIONS__... yes
checking whether make sets $(MAKE)... yes
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ISO C89... (cached) none needed
checking how to run the C preprocessor... gcc -E
checking for ar... /usr/bin/ar
checking whether byte ordering is bigendian... no
checking whether gcc produces 32bit code... yes
checking whether gcc supports -march=i686 (and we can run it)... yes
checking whether gcc supports __thread specifier (TLS)... yes
checking whether gcc accepts -rdynamic... yes
checking whether gcc supports -Wno-unused-parameter... yes
checking whether gcc can actually use -Wno-unused-parameter... yes
checking whether gcc supports -Wno-clobbered... yes
checking whether gcc supports -Wempty-body... yes
checking whether gcc supports -Wnewline-eof... no
checking whether gcc supports -Wint-conversion... no
checking whether gcc supports -Winit-self... yes
checking whether gcc supports -Wpointer-arith... yes
checking whether gcc supports -Wswitch-bool... no
checking whether gcc supports -Wenum-conversion... no
checking whether gcc supports -Wshorten-64-to-32... no
checking whether gcc supports -Wconstant-conversion... no
checking whether gcc supports -Wbool-conversion... no
checking whether gcc supports -Wformat-security... yes
checking whether gcc supports -Wformat... yes
checking whether gcc supports -Wformat-signedness... no
checking whether gcc supports -Wformat-y2k... yes
checking whether gcc supports -Wmissing-include-dirs... no
checking whether gcc supports -Wsuggest-attribute=noreturn... no
checking whether gcc supports -Wundef... yes
checking whether gcc supports -Wlogical-op... yes
checking whether gcc supports -Wnested-externs... yes
checking whether gcc supports -Wold-style-definition... yes
checking whether gcc supports -Woverlength-strings... yes
checking whether gcc supports -Wredundant-decls... yes
checking whether gcc supports -Wcast-qual... yes
checking whether gcc supports -Wno-format-nonliteral... yes
checking whether gcc supports -Wno-switch... yes
checking whether gcc supports -Wno-missing-field-initializers... yes
checking whether gcc supports -Wshadow... yes
checking whether gcc can efficiently use -Wshadow... no
checking whether gcc supports -fPIC... yes
checking how to make shared objects... -shared yes
checking whether gcc needs -Wl,--no-undefined to check for undefined references in shared objects... yes
checking whether gcc supports -fno-strict-aliasing... yes
checking for setrlimit... yes
checking for strnlen... yes
checking for uselocale... yes
checking for newlocale... yes
checking for freelocale... yes
checking xlocale.h usability... yes
checking xlocale.h presence... yes
checking for xlocale.h... yes
checking host OS... Linux
checking for MinGW... no
checking for library containing inflateEnd... -lz
checking zlib.h usability... yes
checking zlib.h presence... yes
checking for zlib.h... yes
checking for library containing sqrt... -lm
checking for library containing clock_gettime... -lrt
checking whether CLOCK_MONOTONIC is supported and works... yes
checking for library containing pthread_create... none required
checking for library containing pthread_sigmask... none required
checking for library containing pthread_attr_init... none required
checking for library containing pthread_attr_setstacksize... none required
checking for library containing pthread_attr_destroy... none required
checking for library containing pthread_cancel... none required
checking for library containing pthread_join... none required
checking execinfo.h usability... yes
checking execinfo.h presence... yes
checking for execinfo.h... yes
checking for library containing backtrace... none required
checking for mysql_config... /usr/bin/mysql_config
checking for mysql_init... yes
checking mysql.h usability... yes
checking mysql.h presence... yes
checking for mysql.h... yes
checking MySQL library (required)... yes (6.0.11)
checking PCRE library... checking pcre.h usability... yes
checking pcre.h presence... yes
checking for pcre.h... yes
checking for library containing pcre_study... -lpcre
checking for doxygen... no
checking for perl... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/common/Makefile
config.status: creating 3rdparty/mt19937ar/Makefile
config.status: creating 3rdparty/libconfig/Makefile
config.status: creating src/char/Makefile
config.status: creating src/login/Makefile
config.status: creating src/map/Makefile
config.status: creating src/plugins/Makefile
config.status: creating src/tool/Makefile
config.status: creating src/test/Makefile
config.status: creating tools/HPMHookGen/Makefile

 

i am download https://github.com/HerculesWS/Hercules

17.04.2016

i searching my problem google, need new kernel? my kernel 2.6

Edited by ucell_uz

Share this post


Link to post
Share on other sites
  • 0
 
I solved my problem by editing the socket.c on line 49, because there he is trying to import the /linux/tcp.h library that is giving this error. What I did was remove the if and put import the libraries that comes in else that even if and so forgetting that such a tcp.h. I believe this problem will not because I have an old emulator that works like this , only the new emulators that began asking this tcp.h to who compiles on Linux .
 
emulator/src/common/socket.c
 
before:
#	include <netdb.h>
#if defined __linux__ || defined __linux
#       include <linux/tcp.h>
#else
#	include <netinet/in.h>
#	include <netinet/tcp.h>
#endif
#	include <sys/ioctl.h>
 
after:
#	include <netdb.h>
#	include <netinet/in.h>
#	include <netinet/tcp.h>
#	include <sys/ioctl.h>

 

Edited by Pedroooo

Share this post


Link to post
Share on other sites
  • 0

This issue probably because you have very old operating system, or messed headers from different versions.

Share this post


Link to post
Share on other sites
  • 0

This issue probably because you have very old operating system, or messed headers from different versions.

okay))

well why this script working (socket.c)

 

 

/**
 * This file is part of Hercules.
 *
 * Copyright © 2012-2015  Hercules Dev Team
 * Copyright ©  Athena Dev Teams
 *
 * Hercules 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, either version 3 of the License, or
 * (at your option) any later version.
 *
 * 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, see <http://www.gnu.org/licenses/>.
 */
#define HERCULES_CORE
 
#include "config/core.h" // SHOW_SERVER_STATS
#include "socket.h"
 
#include "common/HPM.h"
#include "common/cbasetypes.h"
#include "common/db.h"
#include "common/memmgr.h"
#include "common/mmo.h"
#include "common/nullpo.h"
#include "common/showmsg.h"
#include "common/strlib.h"
#include "common/timer.h"
 
#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
 
#ifdef WIN32
#    include "common/winapi.h"
#else
#    include <arpa/inet.h>
#    include <errno.h>
#    include <net/if.h>
#    include <netdb.h>
#if defined __linux__ || defined __linux
#       include <linux/tcp.h>
#else
#    include <netinet/in.h>
#    include <netinet/tcp.h>
#endif
#    include <sys/ioctl.h>
#    include <sys/socket.h>
#    include <sys/time.h>
#    include <unistd.h>
 
#    ifndef SIOCGIFCONF
#        include <sys/sockio.h> // SIOCGIFCONF on Solaris, maybe others? [shinomori]
#    endif
#    ifndef FIONBIO
#        include <sys/filio.h> // FIONBIO on Solaris [FlavioJS]
#    endif
 
#    ifdef HAVE_SETRLIMIT
#        include <sys/resource.h>
#    endif
#endif
 
/**
 * Socket Interface Source
 **/
struct socket_interface sockt_s;
struct socket_interface *sockt;
 
struct socket_data **session;
 
#ifdef SEND_SHORTLIST
// Add a fd to the shortlist so that it'll be recognized as a fd that needs
// sending done on it.
void send_shortlist_add_fd(int fd);
// Do pending network sends (and eof handling) from the shortlist.
void send_shortlist_do_sends(void);
#endif
 
/////////////////////////////////////////////////////////////////////
#if defined(WIN32)
/////////////////////////////////////////////////////////////////////
// windows portability layer
 
typedef int socklen_t;
 
#define sErrno WSAGetLastError()
#define S_ENOTSOCK WSAENOTSOCK
#define S_EWOULDBLOCK WSAEWOULDBLOCK
#define S_EINTR WSAEINTR
#define S_ECONNABORTED WSAECONNABORTED
 
#define SHUT_RD   SD_RECEIVE
#define SHUT_WR   SD_SEND
#define SHUT_RDWR SD_BOTH
 
// global array of sockets (emulating linux)
// fd is the position in the array
static SOCKET sock_arr[FD_SETSIZE];
static int sock_arr_len = 0;
 
/// Returns the socket associated with the target fd.
///
/// @param fd Target fd.
/// @return Socket
#define fd2sock(fd) sock_arr[fd]
 
/// Returns the first fd associated with the socket.
/// Returns -1 if the socket is not found.
///
/// @param s Socket
/// @return Fd or -1
int sock2fd(SOCKET s)
{
    int fd;
 
    // search for the socket
    for( fd = 1; fd < sock_arr_len; ++fd )
        if( sock_arr[fd] == s )
            break;// found the socket
    if( fd == sock_arr_len )
        return -1;// not found
    return fd;
}
 
/// Inserts the socket into the global array of sockets.
/// Returns a new fd associated with the socket.
/// If there are too many sockets it closes the socket, sets an error and
//  returns -1 instead.
/// Since fd 0 is reserved, it returns values in the range [1,FD_SETSIZE[.
///
/// @param s Socket
/// @return New fd or -1
int sock2newfd(SOCKET s)
{
    int fd;
 
    // find an empty position
    for( fd = 1; fd < sock_arr_len; ++fd )
        if( sock_arr[fd] == INVALID_SOCKET )
            break;// empty position
    if( fd == ARRAYLENGTH(sock_arr) )
    {// too many sockets
        closesocket(s);
        WSASetLastError(WSAEMFILE);
        return -1;
    }
    sock_arr[fd] = s;
    if( sock_arr_len <= fd )
        sock_arr_len = fd+1;
    return fd;
}
 
int sAccept(int fd, struct sockaddr* addr, int* addrlen)
{
    SOCKET s;
 
    // accept connection
    s = accept(fd2sock(fd), addr, addrlen);
    if( s == INVALID_SOCKET )
        return -1;// error
    return sock2newfd(s);
}
 
int sClose(int fd)
{
    int ret = closesocket(fd2sock(fd));
    fd2sock(fd) = INVALID_SOCKET;
    return ret;
}
 
int sSocket(int af, int type, int protocol)
{
    SOCKET s;
 
    // create socket
    s = socket(af,type,protocol);
    if( s == INVALID_SOCKET )
        return -1;// error
    return sock2newfd(s);
}
 
char* sErr(int code)
{
    static char sbuf[512];
    // strerror does not handle socket codes
    if( FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM|FORMAT_MESSAGE_IGNORE_INSERTS, NULL,
            code, MAKELANGID(LANG_ENGLISH, SUBLANG_DEFAULT), (LPTSTR)&sbuf, sizeof(sbuf), NULL) == 0 )
        snprintf(sbuf, sizeof(sbuf), "unknown error");
    return sbuf;
}
 
#define sBind(fd,name,namelen)                      bind(fd2sock(fd),(name),(namelen))
#define sConnect(fd,name,namelen)                   connect(fd2sock(fd),(name),(namelen))
#define sIoctl(fd,cmd,argp)                         ioctlsocket(fd2sock(fd),(cmd),(argp))
#define sListen(fd,backlog)                         listen(fd2sock(fd),(backlog))
#define sRecv(fd,buf,len,flags)                     recv(fd2sock(fd),(buf),(len),(flags))
#define sSelect                                     select
#define sSend(fd,buf,len,flags)                     send(fd2sock(fd),(buf),(len),(flags))
#define sSetsockopt(fd,level,optname,optval,optlen) setsockopt(fd2sock(fd),(level),(optname),(optval),(optlen))
#define sShutdown(fd,how)                           shutdown(fd2sock(fd),(how))
#define sFD_SET(fd,set)                             FD_SET(fd2sock(fd),(set))
#define sFD_CLR(fd,set)                             FD_CLR(fd2sock(fd),(set))
#define sFD_ISSET(fd,set)                           FD_ISSET(fd2sock(fd),(set))
#define sFD_ZERO                                    FD_ZERO
 
/////////////////////////////////////////////////////////////////////
#else
/////////////////////////////////////////////////////////////////////
// nix portability layer
 
#define SOCKET_ERROR (-1)
 
#define sErrno errno
#define S_ENOTSOCK EBADF
#define S_EWOULDBLOCK EAGAIN
#define S_EINTR EINTR
#define S_ECONNABORTED ECONNABORTED
 
#define sAccept accept
#define sClose close
#define sSocket socket
#define sErr strerror
 
#define sBind bind
#define sConnect connect
#define sIoctl ioctl
#define sListen listen
#define sRecv recv
#define sSelect select
#define sSend send
#define sSetsockopt setsockopt
#define sShutdown shutdown
#define sFD_SET FD_SET
#define sFD_CLR FD_CLR
#define sFD_ISSET FD_ISSET
#define sFD_ZERO FD_ZERO
 
/////////////////////////////////////////////////////////////////////
#endif
/////////////////////////////////////////////////////////////////////
 
#ifndef MSG_NOSIGNAL
    #define MSG_NOSIGNAL 0
#endif
 
fd_set readfds;
 
// Maximum packet size in bytes, which the client is able to handle.
// Larger packets cause a buffer overflow and stack corruption.
#if PACKETVER >= 20131223
static size_t socket_max_client_packet = 0xFFFF;
#else
static size_t socket_max_client_packet = 0x6000;
#endif
 
#ifdef SHOW_SERVER_STATS
// Data I/O statistics
static size_t socket_data_i = 0, socket_data_ci = 0, socket_data_qi = 0;
static size_t socket_data_o = 0, socket_data_co = 0, socket_data_qo = 0;
static time_t socket_data_last_tick = 0;
#endif
 
// initial recv buffer size (this will also be the max. size)
// biggest known packet: S 0153 <len>.w <emblem data>.?B -> 24x24 256 color .bmp (0153 + len.w + 1618/1654/1756 bytes)
#define RFIFO_SIZE (2*1024)
// initial send buffer size (will be resized as needed)
#define WFIFO_SIZE (16*1024)
 
// Maximum size of pending data in the write fifo. (for non-server connections)
// The connection is closed if it goes over the limit.
#define WFIFO_MAX (1*1024*1024)
 
#ifdef SEND_SHORTLIST
int send_shortlist_array[FD_SETSIZE];// we only support FD_SETSIZE sockets, limit the array to that
int send_shortlist_count = 0;// how many fd's are in the shortlist
uint32 send_shortlist_set[(FD_SETSIZE+31)/32];// to know if specific fd's are already in the shortlist
#endif
 
static int create_session(int fd, RecvFunc func_recv, SendFunc func_send, ParseFunc func_parse);
 
#ifndef MINICORE
    int ip_rules = 1;
    static int connect_check(uint32 ip);
#endif
 
const char* error_msg(void)
{
    static char buf[512];
    int code = sErrno;
    snprintf(buf, sizeof(buf), "error %d: %s", code, sErr(code));
    return buf;
}
 
/*======================================
 * CORE : Default processing functions
 *--------------------------------------*/
int null_recv(int fd) { return 0; }
int null_send(int fd) { return 0; }
int null_parse(int fd) { return 0; }
 
ParseFunc default_func_parse = null_parse;
 
void set_defaultparse(ParseFunc defaultparse)
{
    default_func_parse = defaultparse;
}
 
/*======================================
 * CORE : Socket options
 *--------------------------------------*/
void set_nonblocking(int fd, unsigned long yes)
{
    // FIONBIO Use with a nonzero argp parameter to enable the nonblocking mode of socket s.
    // The argp parameter is zero if nonblocking is to be disabled.
    if( sIoctl(fd, FIONBIO, &yes) != 0 )
        ShowError("set_nonblocking: Failed to set socket #%d to non-blocking mode (%s) - Please report this!!!\n", fd, error_msg());
}
 
/**
 * Sets the options for a socket.
 *
 * @param fd  The socket descriptor
 * @param opt Optional, additional options to set (Can be NULL).
 */
void setsocketopts(int fd, struct hSockOpt *opt)
{
#if defined(WIN32)
    BOOL yes = TRUE;
#else // not WIN32
    int yes = 1;
#endif // WIN32
    struct linger lopt = { 0 };
 
    // Note: We cast the fourth argument to (char *) because, while in UNIX
    // it takes a const void *, in Windows it takes a const char *.
#if !defined(WIN32)
    // set SO_REAUSEADDR to true, unix only. on windows this option causes
    // the previous owner of the socket to give up, which is not desirable
    // in most cases, neither compatible with unix.
    if (sSetsockopt(fd, SOL_SOCKET, SO_REUSEADDR, (char *)&yes, sizeof(yes)))
        ShowWarning("setsocketopts: Unable to set SO_REUSEADDR mode for connection #%d!\n", fd);
#ifdef SO_REUSEPORT
    if (sSetsockopt(fd, SOL_SOCKET, SO_REUSEPORT, (char *)&yes, sizeof(yes)))
        ShowWarning("setsocketopts: Unable to set SO_REUSEPORT mode for connection #%d!\n", fd);
#endif // SO_REUSEPORT
#endif // WIN32
 
    // Set the socket into no-delay mode; otherwise packets get delayed for up to 200ms, likely creating server-side lag.
    // The RO protocol is mainly single-packet request/response, plus the FIFO model already does packet grouping anyway.
    if (sSetsockopt(fd, IPPROTO_TCP, TCP_NODELAY, (char *)&yes, sizeof(yes)))
        ShowWarning("setsocketopts: Unable to set TCP_NODELAY mode for connection #%d!\n", fd);
 
    if (opt && opt->setTimeo) {
#if defined(WIN32)
        DWORD timeout = 5000; // https://msdn.microsoft.com/en-us/library/windows/desktop/ms740476(v=vs.85).aspx
#else // not WIN32
        struct timeval timeout = { 0 };
        timeout.tv_sec = 5;
#endif // WIN32
 
        if (sSetsockopt(fd, SOL_SOCKET, SO_RCVTIMEO, (char *)&timeout, sizeof(timeout)))
            ShowWarning("setsocketopts: Unable to set SO_RCVTIMEO for connection #%d!\n", fd);
        if (sSetsockopt(fd, SOL_SOCKET, SO_SNDTIMEO, (char *)&timeout, sizeof(timeout)))
            ShowWarning("setsocketopts: Unable to set SO_SNDTIMEO for connection #%d!\n", fd);
    }
 
    // force the socket into no-wait, graceful-close mode (should be the default, but better make sure)
    lopt.l_onoff = 0; // SO_DONTLINGER
    lopt.l_linger = 0; // Do not care
    if (sSetsockopt(fd, SOL_SOCKET, SO_LINGER, (char *)&lopt, sizeof(lopt)))
        ShowWarning("setsocketopts: Unable to set SO_LINGER mode for connection #%d!\n", fd);
 
#ifdef TCP_THIN_LINEAR_TIMEOUTS
    if (sSetsockopt(fd, IPPROTO_TCP, TCP_THIN_LINEAR_TIMEOUTS, (char *)&yes, sizeof(yes)))
        ShowWarning("setsocketopts: Unable to set TCP_THIN_LINEAR_TIMEOUTS mode for connection #%d!\n", fd);
#endif
#ifdef TCP_THIN_DUPACK
    if (sSetsockopt(fd, IPPROTO_TCP, TCP_THIN_DUPACK, (char *)&yes, sizeof(yes)))
        ShowWarning("setsocketopts: Unable to set TCP_THIN_DUPACK mode for connection #%d!\n", fd);
#endif
}
 
/*======================================
 * CORE : Socket Sub Function
 *--------------------------------------*/
void set_eof(int fd)
{
    if (sockt->session_is_active(fd)) {
#ifdef SEND_SHORTLIST
        // Add this socket to the shortlist for eof handling.
        send_shortlist_add_fd(fd);
#endif
        sockt->session[fd]->flag.eof = 1;
    }
}
 
int recv_to_fifo(int fd)
{
    ssize_t len;
 
    if (!sockt->session_is_active(fd))
        return -1;
 
    len = sRecv(fd, (char *) sockt->session[fd]->rdata + sockt->session[fd]->rdata_size, (int)RFIFOSPACE(fd), 0);
 
    if( len == SOCKET_ERROR )
    {//An exception has occurred
        if( sErrno != S_EWOULDBLOCK ) {
            //ShowDebug("recv_to_fifo: %s, closing connection #%d\n", error_msg(), fd);
            sockt->eof(fd);
        }
        return 0;
    }
 
    if( len == 0 )
    {//Normal connection end.
        sockt->eof(fd);
        return 0;
    }
 
    sockt->session[fd]->rdata_size += len;
    sockt->session[fd]->rdata_tick = sockt->last_tick;
#ifdef SHOW_SERVER_STATS
    socket_data_i += len;
    socket_data_qi += len;
    if (!sockt->session[fd]->flag.server)
    {
        socket_data_ci += len;
    }
#endif
    return 0;
}
 
int send_from_fifo(int fd)
{
    ssize_t len;
 
    if (!sockt->session_is_valid(fd))
        return -1;
 
    if( sockt->session[fd]->wdata_size == 0 )
        return 0; // nothing to send
 
    len = sSend(fd, (const char *) sockt->session[fd]->wdata, (int)sockt->session[fd]->wdata_size, MSG_NOSIGNAL);
 
    if( len == SOCKET_ERROR )
    {//An exception has occurred
        if( sErrno != S_EWOULDBLOCK ) {
            //ShowDebug("send_from_fifo: %s, ending connection #%d\n", error_msg(), fd);
#ifdef SHOW_SERVER_STATS
            socket_data_qo -= sockt->session[fd]->wdata_size;
#endif
            sockt->session[fd]->wdata_size = 0; //Clear the send queue as we can't send anymore. [skotlex]
            sockt->eof(fd);
        }
        return 0;
    }
 
    if( len > 0 )
    {
        // some data could not be transferred?
        // shift unsent data to the beginning of the queue
        if( (size_t)len < sockt->session[fd]->wdata_size )
            memmove(sockt->session[fd]->wdata, sockt->session[fd]->wdata + len, sockt->session[fd]->wdata_size - len);
 
        sockt->session[fd]->wdata_size -= len;
#ifdef SHOW_SERVER_STATS
        socket_data_o += len;
        socket_data_qo -= len;
        if (!sockt->session[fd]->flag.server)
        {
            socket_data_co += len;
        }
#endif
    }
 
    return 0;
}
 
/// Best effort - there's no warranty that the data will be sent.
void flush_fifo(int fd)
{
    if(sockt->session[fd] != NULL)
        sockt->session[fd]->func_send(fd);
}
 
void flush_fifos(void)
{
    int i;
    for(i = 1; i < sockt->fd_max; i++)
        sockt->flush(i);
}
 
/*======================================
 * CORE : Connection functions
 *--------------------------------------*/
int connect_client(int listen_fd) {
    int fd;
    struct sockaddr_in client_address;
    socklen_t len;
 
    len = sizeof(client_address);
 
    fd = sAccept(listen_fd, (struct sockaddr*)&client_address, &len);
    if ( fd == -1 ) {
        ShowError("connect_client: accept failed (%s)!\n", error_msg());
        return -1;
    }
    if( fd == 0 ) { // reserved
        ShowError("connect_client: Socket #0 is reserved - Please report this!!!\n");
        sClose(fd);
        return -1;
    }
    if( fd >= FD_SETSIZE ) { // socket number too big
        ShowError("connect_client: New socket #%d is greater than can we handle! Increase the value of FD_SETSIZE (currently %d) for your OS to fix this!\n", fd, FD_SETSIZE);
        sClose(fd);
        return -1;
    }
 
    setsocketopts(fd,NULL);
    sockt->set_nonblocking(fd, 1);
 
#ifndef MINICORE
    if( ip_rules && !connect_check(ntohl(client_address.sin_addr.s_addr)) ) {
        sockt->close(fd);
        return -1;
    }
#endif
 
    if( sockt->fd_max <= fd ) sockt->fd_max = fd + 1;
    sFD_SET(fd,&readfds);
 
    create_session(fd, recv_to_fifo, send_from_fifo, default_func_parse);
    sockt->session[fd]->client_addr = ntohl(client_address.sin_addr.s_addr);
 
    return fd;
}
 
int make_listen_bind(uint32 ip, uint16 port)
{
    struct sockaddr_in server_address = { 0 };
    int fd;
    int result;
 
    fd = sSocket(AF_INET, SOCK_STREAM, 0);
 
    if( fd == -1 ) {
        ShowError("make_listen_bind: socket creation failed (%s)!\n", error_msg());
        exit(EXIT_FAILURE);
    }
    if( fd == 0 ) { // reserved
        ShowError("make_listen_bind: Socket #0 is reserved - Please report this!!!\n");
        sClose(fd);
        return -1;
    }
    if( fd >= FD_SETSIZE ) { // socket number too big
        ShowError("make_listen_bind: New socket #%d is greater than can we handle! Increase the value of FD_SETSIZE (currently %d) for your OS to fix this!\n", fd, FD_SETSIZE);
        sClose(fd);
        return -1;
    }
 
    setsocketopts(fd,NULL);
    sockt->set_nonblocking(fd, 1);
 
    server_address.sin_family      = AF_INET;
    server_address.sin_addr.s_addr = htonl(ip);
    server_address.sin_port        = htons(port);
 
    result = sBind(fd, (struct sockaddr*)&server_address, sizeof(server_address));
    if( result == SOCKET_ERROR ) {
        ShowError("make_listen_bind: bind failed (socket #%d, %s)!\n", fd, error_msg());
        exit(EXIT_FAILURE);
    }
    result = sListen(fd,5);
    if( result == SOCKET_ERROR ) {
        ShowError("make_listen_bind: listen failed (socket #%d, %s)!\n", fd, error_msg());
        exit(EXIT_FAILURE);
    }
 
    if(sockt->fd_max <= fd) sockt->fd_max = fd + 1;
    sFD_SET(fd, &readfds);
 
    create_session(fd, connect_client, null_send, null_parse);
    sockt->session[fd]->client_addr = 0; // just listens
    sockt->session[fd]->rdata_tick = 0; // disable timeouts on this socket
 
    return fd;
}
 
int make_connection(uint32 ip, uint16 port, struct hSockOpt *opt) {
    struct sockaddr_in remote_address = { 0 };
    int fd;
    int result;
 
    fd = sSocket(AF_INET, SOCK_STREAM, 0);
 
    if (fd == -1) {
        ShowError("make_connection: socket creation failed (%s)!\n", error_msg());
        return -1;
    }
    if( fd == 0 ) {// reserved
        ShowError("make_connection: Socket #0 is reserved - Please report this!!!\n");
        sClose(fd);
        return -1;
    }
    if( fd >= FD_SETSIZE ) {// socket number too big
        ShowError("make_connection: New socket #%d is greater than can we handle! Increase the value of FD_SETSIZE (currently %d) for your OS to fix this!\n", fd, FD_SETSIZE);
        sClose(fd);
        return -1;
    }
 
    setsocketopts(fd,opt);
 
    remote_address.sin_family      = AF_INET;
    remote_address.sin_addr.s_addr = htonl(ip);
    remote_address.sin_port        = htons(port);
 
    if( !( opt && opt->silent ) )
        ShowStatus("Connecting to %d.%d.%d.%d:%i\n", CONVIP(ip), port);
 
    result = sConnect(fd, (struct sockaddr *)(&remote_address), sizeof(struct sockaddr_in));
    if( result == SOCKET_ERROR ) {
        if( !( opt && opt->silent ) )
            ShowError("make_connection: connect failed (socket #%d, %s)!\n", fd, error_msg());
        sockt->close(fd);
        return -1;
    }
    //Now the socket can be made non-blocking. [skotlex]
    sockt->set_nonblocking(fd, 1);
 
    if (sockt->fd_max <= fd) sockt->fd_max = fd + 1;
    sFD_SET(fd,&readfds);
 
    create_session(fd, recv_to_fifo, send_from_fifo, default_func_parse);
    sockt->session[fd]->client_addr = ntohl(remote_address.sin_addr.s_addr);
 
    return fd;
}
 
static int create_session(int fd, RecvFunc func_recv, SendFunc func_send, ParseFunc func_parse)
{
    CREATE(sockt->session[fd], struct socket_data, 1);
    CREATE(sockt->session[fd]->rdata, unsigned char, RFIFO_SIZE);
    CREATE(sockt->session[fd]->wdata, unsigned char, WFIFO_SIZE);
    sockt->session[fd]->max_rdata  = RFIFO_SIZE;
    sockt->session[fd]->max_wdata  = WFIFO_SIZE;
    sockt->session[fd]->func_recv  = func_recv;
    sockt->session[fd]->func_send  = func_send;
    sockt->session[fd]->func_parse = func_parse;
    sockt->session[fd]->rdata_tick = sockt->last_tick;
    sockt->session[fd]->session_data = NULL;
    sockt->session[fd]->hdata = NULL;
    return 0;
}
 
static void delete_session(int fd)
{
    if (sockt->session_is_valid(fd)) {
#ifdef SHOW_SERVER_STATS
        socket_data_qi -= sockt->session[fd]->rdata_size - sockt->session[fd]->rdata_pos;
        socket_data_qo -= sockt->session[fd]->wdata_size;
#endif
        aFree(sockt->session[fd]->rdata);
        aFree(sockt->session[fd]->wdata);
        if( sockt->session[fd]->session_data )
            aFree(sockt->session[fd]->session_data);
        HPM->data_store_destroy(&sockt->session[fd]->hdata);
        aFree(sockt->session[fd]);
        sockt->session[fd] = NULL;
    }
}
 
int realloc_fifo(int fd, unsigned int rfifo_size, unsigned int wfifo_size)
{
    if (!sockt->session_is_valid(fd))
        return 0;
 
    if( sockt->session[fd]->max_rdata != rfifo_size && sockt->session[fd]->rdata_size < rfifo_size) {
        RECREATE(sockt->session[fd]->rdata, unsigned char, rfifo_size);
        sockt->session[fd]->max_rdata  = rfifo_size;
    }
 
    if( sockt->session[fd]->max_wdata != wfifo_size && sockt->session[fd]->wdata_size < wfifo_size) {
        RECREATE(sockt->session[fd]->wdata, unsigned char, wfifo_size);
        sockt->session[fd]->max_wdata  = wfifo_size;
    }
    return 0;
}
 
int realloc_writefifo(int fd, size_t addition)
{
    size_t newsize;
 
    if (!sockt->session_is_valid(fd)) // might not happen
        return 0;
 
    if (sockt->session[fd]->wdata_size + addition  > sockt->session[fd]->max_wdata) {
        // grow rule; grow in multiples of WFIFO_SIZE
        newsize = WFIFO_SIZE;
        while( sockt->session[fd]->wdata_size + addition > newsize ) newsize += WFIFO_SIZE;
    } else if (sockt->session[fd]->max_wdata >= (size_t)2*(sockt->session[fd]->flag.server?FIFOSIZE_SERVERLINK:WFIFO_SIZE)
           && (sockt->session[fd]->wdata_size+addition)*4 < sockt->session[fd]->max_wdata
    ) {
        // shrink rule, shrink by 2 when only a quarter of the fifo is used, don't shrink below nominal size.
        newsize = sockt->session[fd]->max_wdata / 2;
    } else {
        // no change
        return 0;
    }
 
    RECREATE(sockt->session[fd]->wdata, unsigned char, newsize);
    sockt->session[fd]->max_wdata  = newsize;
 
    return 0;
}
 
/// advance the RFIFO cursor (marking 'len' bytes as processed)
int rfifoskip(int fd, size_t len)
{
    struct socket_data *s;
 
    if (!sockt->session_is_active(fd))
        return 0;
 
    s = sockt->session[fd];
 
    if (s->rdata_size < s->rdata_pos + len) {
        ShowError("RFIFOSKIP: skipped past end of read buffer! Adjusting from %"PRIuS" to %"PRIuS" (session #%d)\n", len, RFIFOREST(fd), fd);
        len = RFIFOREST(fd);
    }
 
    s->rdata_pos = s->rdata_pos + len;
#ifdef SHOW_SERVER_STATS
    socket_data_qi -= len;
#endif
    return 0;
}
 
/// advance the WFIFO cursor (marking 'len' bytes for sending)
int wfifoset(int fd, size_t len)
{
    size_t newreserve;
    struct socket_data* s = sockt->session[fd];
 
    if (!sockt->session_is_valid(fd) || s->wdata == NULL)
        return 0;
 
    // we have written len bytes to the buffer already before calling WFIFOSET
    if (s->wdata_size+len > s->max_wdata) {
        // actually there was a buffer overflow already
        uint32 ip = s->client_addr;
        ShowFatalError("WFIFOSET: Write Buffer Overflow. Connection %d (%d.%d.%d.%d) has written %u bytes on a %u/%u bytes buffer.\n", fd, CONVIP(ip), (unsigned int)len, (unsigned int)s->wdata_size, (unsigned int)s->max_wdata);
        ShowDebug("Likely command that caused it: 0x%x\n", (*(uint16*)(s->wdata + s->wdata_size)));
        // no other chance, make a better fifo model
        exit(EXIT_FAILURE);
    }
 
    if( len > 0xFFFF )
    {
        // dynamic packets allow up to UINT16_MAX bytes (<packet_id>.W <packet_len>.W ...)
        // all known fixed-size packets are within this limit, so use the same limit
        ShowFatalError("WFIFOSET: Packet 0x%x is too big. (len=%u, max=%u)\n", (*(uint16*)(s->wdata + s->wdata_size)), (unsigned int)len, 0xFFFF);
        exit(EXIT_FAILURE);
    }
    else if( len == 0 )
    {
        // abuses the fact, that the code that did WFIFOHEAD(fd,0), already wrote
        // the packet type into memory, even if it could have overwritten vital data
        // this can happen when a new packet was added on map-server, but packet len table was not updated
        ShowWarning("WFIFOSET: Attempted to send zero-length packet, most likely 0x%04x (please report this).\n", WFIFOW(fd,0));
        return 0;
    }
 
    if( !s->flag.server ) {
 
        if (len > socket_max_client_packet) { // see declaration of socket_max_client_packet for details
            ShowError("WFIFOSET: Dropped too large client packet 0x%04x (length=%"PRIuS", max=%"PRIuS").\n",
                      WFIFOW(fd,0), len, socket_max_client_packet);
            return 0;
        }
 
    }
    s->wdata_size += len;
#ifdef SHOW_SERVER_STATS
    socket_data_qo += len;
#endif
    //If the interserver has 200% of its normal size full, flush the data.
    if( s->flag.server && s->wdata_size >= 2*FIFOSIZE_SERVERLINK )
        sockt->flush(fd);
 
    // always keep a WFIFO_SIZE reserve in the buffer
    // For inter-server connections, let the reserve be 1/4th of the link size.
    newreserve = s->flag.server ? FIFOSIZE_SERVERLINK / 4 : WFIFO_SIZE;
 
    // readjust the buffer to include the chosen reserve
    sockt->realloc_writefifo(fd, newreserve);
 
#ifdef SEND_SHORTLIST
    send_shortlist_add_fd(fd);
#endif
 
    return 0;
}
 
int do_sockets(int next)
{
    fd_set rfd;
    struct timeval timeout;
    int ret,i;
 
    // PRESEND Timers are executed before do_sendrecv and can send packets and/or set sessions to eof.
    // Send remaining data and process client-side disconnects here.
#ifdef SEND_SHORTLIST
    send_shortlist_do_sends();
#else
    for (i = 1; i < sockt->fd_max; i++)
    {
        if(!sockt->session[fd]
            continue;
 
        if(sockt->session[fd]>wdata_size)
            sockt->session[fd]>func_send(i);
    }
#endif
 
    // can timeout until the next tick
    timeout.tv_sec  = next/1000;
    timeout.tv_usec = next%1000*1000;
 
    memcpy(&rfd, &readfds, sizeof(rfd));
    ret = sSelect(sockt->fd_max, &rfd, NULL, NULL, &timeout);
 
    if( ret == SOCKET_ERROR )
    {
        if( sErrno != S_EINTR )
        {
            ShowFatalError("do_sockets: select() failed, %s!\n", error_msg());
            exit(EXIT_FAILURE);
        }
        return 0; // interrupted by a signal, just loop and try again
    }
 
    sockt->last_tick = time(NULL);
 
#if defined(WIN32)
    // on windows, enumerating all members of the fd_set is way faster if we access the internals
    for( i = 0; i < (int)rfd.fd_count; ++i )
    {
        int fd = sock2fd(rfd.fd_array);
        if( sockt->session[fd] )
            sockt->session[fd]->func_recv(fd);
    }
#else
    // otherwise assume that the fd_set is a bit-array and enumerate it in a standard way
    for( i = 1; ret && i < sockt->fd_max; ++i )
    {
        if(sFD_ISSET(i,&rfd) && sockt->session)
        {
            sockt->session->func_recv(i);
            --ret;
        }
    }
#endif
 
    // POSTSEND Send remaining data and handle eof sessions.
#ifdef SEND_SHORTLIST
    send_shortlist_do_sends();
#else
    for (i = 1; i < sockt->fd_max; i++)
    {
        if(!sockt->session)
            continue;
 
        if(sockt->session->wdata_size)
            sockt->session->func_send(i);
 
        if (sockt->session->flag.eof) { //func_send can't free a session, this is safe.
            //Finally, even if there is no data to parse, connections signaled eof should be closed, so we call parse_func [skotlex]
            sockt->session->func_parse(i); //This should close the session immediately.
        }
    }
#endif
 
    // parse input data on each socket
    for(i = 1; i < sockt->fd_max; i++)
    {
        if(!sockt->session)
            continue;
 
        if (sockt->session->rdata_tick && DIFF_TICK(sockt->last_tick, sockt->session->rdata_tick) > sockt->stall_time) {
            if( sockt->session->flag.server ) {/* server is special */
                if( sockt->session->flag.ping != 2 )/* only update if necessary otherwise it'd resend the ping unnecessarily */
                    sockt->session->flag.ping = 1;
            } else {
                ShowInfo("Session #%d timed out\n", i);
                sockt->eof(i);
            }
        }
 
#ifdef __clang_analyzer__
        // Let Clang's static analyzer know this never happens (it thinks it might because of a NULL check in session_is_valid)
        if (!sockt->session) continue;
#endif // __clang_analyzer__
        sockt->session->func_parse(i);
 
        if(!sockt->session)
            continue;
 
        RFIFOFLUSH(i);
        // after parse, check client's RFIFO size to know if there is an invalid packet (too big and not parsed)
        if (sockt->session->rdata_size == sockt->session->max_rdata) {
            sockt->eof(i);
            continue;
        }
    }
 
#ifdef SHOW_SERVER_STATS
    if (sockt->last_tick != socket_data_last_tick)
    {
        char buf[1024];
 
        sprintf(buf, "In: %.03f kB/s (%.03f kB/s, Q: %.03f kB) | Out: %.03f kB/s (%.03f kB/s, Q: %.03f kB) | RAM: %.03f MB", socket_data_i/1024., socket_data_ci/1024., socket_data_qi/1024., socket_data_o/1024., socket_data_co/1024., socket_data_qo/1024., iMalloc->usage()/1024.);
#ifdef _WIN32
        SetConsoleTitle(buf);
#else
        ShowMessage("\033[s\033[1;1H\033[2K%s\033[u", buf);
#endif
        socket_data_last_tick = sockt->last_tick;
        socket_data_i = socket_data_ci = 0;
        socket_data_o = socket_data_co = 0;
    }
#endif
 
    return 0;
}
 
//////////////////////////////
#ifndef MINICORE
//////////////////////////////
// IP rules and DDoS protection
 
typedef struct connect_history {
    uint32 ip;
    int64 tick;
    int count;
    unsigned ddos : 1;
} ConnectHistory;
 
typedef struct access_control {
    uint32 ip;
    uint32 mask;
} AccessControl;
 
enum aco {
    ACO_DENY_ALLOW,
    ACO_ALLOW_DENY,
    ACO_MUTUAL_FAILURE
};
 
static AccessControl* access_allow = NULL;
static AccessControl* access_deny = NULL;
static int access_order    = ACO_DENY_ALLOW;
static int access_allownum = 0;
static int access_denynum  = 0;
static int access_debug    = 0;
static int ddos_count      = 10;
static int ddos_interval   = 3*1000;
static int ddos_autoreset  = 10*60*1000;
DBMap *connect_history = NULL;
 
static int connect_check_(uint32 ip);
 
/// Verifies if the IP can connect. (with debug info)
/// @see connect_check_()
static int connect_check(uint32 ip)
{
    int result = connect_check_(ip);
    if( access_debug ) {
        ShowInfo("connect_check: Connection from %d.%d.%d.%d %s\n", CONVIP(ip),result ? "allowed." : "denied!");
    }
    return result;
}
 
/// Verifies if the IP can connect.
///  0      : Connection Rejected
///  1 or 2 : Connection Accepted
static int connect_check_(uint32 ip)
{
    ConnectHistory* hist = NULL;
    int i;
    int is_allowip = 0;
    int is_denyip = 0;
    int connect_ok = 0;
 
    // Search the allow list
    for( i=0; i < access_allownum; ++i ){
        if (SUBNET_MATCH(ip, access_allow.ip, access_allow.mask)) {
            if( access_debug ){
                ShowInfo("connect_check: Found match from allow list:%d.%d.%d.%d IP:%d.%d.%d.%d Mask:%d.%d.%d.%d\n",
                    CONVIP(ip),
                    CONVIP(access_allow.ip),
                    CONVIP(access_allow.mask));
            }
            is_allowip = 1;
            break;
        }
    }
    // Search the deny list
    for( i=0; i < access_denynum; ++i ){
        if (SUBNET_MATCH(ip, access_deny.ip, access_deny.mask)) {
            if( access_debug ){
                ShowInfo("connect_check: Found match from deny list:%d.%d.%d.%d IP:%d.%d.%d.%d Mask:%d.%d.%d.%d\n",
                    CONVIP(ip),
                    CONVIP(access_deny.ip),
                    CONVIP(access_deny.mask));
            }
            is_denyip = 1;
            break;
        }
    }
    // Decide connection status
    //  0 : Reject
    //  1 : Accept
    //  2 : Unconditional Accept (accepts even if flagged as DDoS)
    switch(access_order) {
        case ACO_DENY_ALLOW:
        default:
            if( is_denyip )
                connect_ok = 0; // Reject
            else if( is_allowip )
                connect_ok = 2; // Unconditional Accept
            else
                connect_ok = 1; // Accept
            break;
        case ACO_ALLOW_DENY:
            if( is_allowip )
                connect_ok = 2; // Unconditional Accept
            else if( is_denyip )
                connect_ok = 0; // Reject
            else
                connect_ok = 1; // Accept
            break;
        case ACO_MUTUAL_FAILURE:
            if( is_allowip && !is_denyip )
                connect_ok = 2; // Unconditional Accept
            else
                connect_ok = 0; // Reject
            break;
    }
 
    // Inspect connection history
    if( ( hist = uidb_get(connect_history, ip)) ) { //IP found
        if( hist->ddos ) {// flagged as DDoS
            return (connect_ok == 2 ? 1 : 0);
        } else if( DIFF_TICK(timer->gettick(),hist->tick) < ddos_interval ) {// connection within ddos_interval
                hist->tick = timer->gettick();
                if( ++hist->count >= ddos_count ) {// DDoS attack detected
                    hist->ddos = 1;
                    ShowWarning("connect_check: DDoS Attack detected from %d.%d.%d.%d!\n", CONVIP(ip));
                    return (connect_ok == 2 ? 1 : 0);
                }
                return connect_ok;
        } else {// not within ddos_interval, clear data
            hist->tick  = timer->gettick();
            hist->count = 0;
            return connect_ok;
        }
    }
    // IP not found, add to history
    CREATE(hist, ConnectHistory, 1);
    hist->ip   = ip;
    hist->tick = timer->gettick();
    uidb_put(connect_history, ip, hist);
    return connect_ok;
}
 
/// Timer function.
/// Deletes old connection history records.
static int connect_check_clear(int tid, int64 tick, int id, intptr_t data) {
    int clear = 0;
    int list  = 0;
    ConnectHistory *hist = NULL;
    DBIterator *iter;
 
    if( !db_size(connect_history) )
        return 0;
 
    iter = db_iterator(connect_history);
 
    for( hist = dbi_first(iter); dbi_exists(iter); hist = dbi_next(iter) ){
        if( (!hist->ddos && DIFF_TICK(tick,hist->tick) > ddos_interval*3) ||
            (hist->ddos && DIFF_TICK(tick,hist->tick) > ddos_autoreset) )
            {// Remove connection history
                uidb_remove(connect_history, hist->ip);
                clear++;
            }
        list++;
    }
    dbi_destroy(iter);
 
    if( access_debug ){
        ShowInfo("connect_check_clear: Cleared %d of %d from IP list.\n", clear, list);
    }
 
    return list;
}
 
/// Parses the ip address and mask and puts it into acc.
/// Returns 1 is successful, 0 otherwise.
int access_ipmask(const char* str, AccessControl* acc)
{
    uint32 ip;
    uint32 mask;
 
    if( strcmp(str,"all") == 0 ) {
        ip   = 0;
        mask = 0;
    } else {
        unsigned int a[4];
        unsigned int m[4];
        int n;
        if( ((n=sscanf(str,"%u.%u.%u.%u/%u.%u.%u.%u",a,a+1,a+2,a+3,m,m+1,m+2,m+3)) != 8 && // not an ip + standard mask
                (n=sscanf(str,"%u.%u.%u.%u/%u",a,a+1,a+2,a+3,m)) != 5 && // not an ip + bit mask
                (n=sscanf(str,"%u.%u.%u.%u",a,a+1,a+2,a+3)) != 4 ) || // not an ip
                a[0] > 255 || a[1] > 255 || a[2] > 255 || a[3] > 255 || // invalid ip
                (n == 8 && (m[0] > 255 || m[1] > 255 || m[2] > 255 || m[3] > 255)) || // invalid standard mask
                (n == 5 && m[0] > 32) ){ // invalid bit mask
            return 0;
        }
        ip = MAKEIP(a[0],a[1],a[2],a[3]);
        if( n == 8 )
        {// standard mask
            mask = MAKEIP(m[0],m[1],m[2],m[3]);
        } else if( n == 5 )
        {// bit mask
            mask = 0;
            while( m[0] ){
                mask = (mask >> 1) | 0x80000000;
                --m[0];
            }
        } else
        {// just this ip
            mask = 0xFFFFFFFF;
        }
    }
    if( access_debug ){
        ShowInfo("access_ipmask: Loaded IP:%d.%d.%d.%d mask:%d.%d.%d.%d\n", CONVIP(ip), CONVIP(mask));
    }
    acc->ip   = ip;
    acc->mask = mask;
    return 1;
}
//////////////////////////////
#endif
//////////////////////////////
 
int socket_config_read(const char* cfgName)
{
    char line[1024],w1[1024],w2[1024];
    FILE *fp;
 
    fp = fopen(cfgName, "r");
    if(fp == NULL) {
        ShowError("File not found: %s\n", cfgName);
        return 1;
    }
 
    while (fgets(line, sizeof(line), fp)) {
        if(line[0] == '/' && line[1] == '/')
            continue;
        if (sscanf(line, "%1023[^:]: %1023[^\r\n]", w1, w2) != 2)
            continue;
 
        if (!strcmpi(w1, "stall_time")) {
            sockt->stall_time = atoi(w2);
            if( sockt->stall_time < 3 )
                sockt->stall_time = 3;/* a minimum is required to refrain it from killing itself */
        }
#ifndef MINICORE
        else if (!strcmpi(w1, "enable_ip_rules")) {
            ip_rules = config_switch(w2);
        } else if (!strcmpi(w1, "order")) {
            if (!strcmpi(w2, "deny,allow"))
                access_order = ACO_DENY_ALLOW;
            else if (!strcmpi(w2, "allow,deny"))
                access_order = ACO_ALLOW_DENY;
            else if (!strcmpi(w2, "mutual-failure"))
                access_order = ACO_MUTUAL_FAILURE;
        } else if (!strcmpi(w1, "allow")) {
            RECREATE(access_allow, AccessControl, access_allownum+1);
            if (access_ipmask(w2, &access_allow[access_allownum]))
                ++access_allownum;
            else
                ShowError("socket_config_read: Invalid ip or ip range '%s'!\n", line);
        } else if (!strcmpi(w1, "deny")) {
            RECREATE(access_deny, AccessControl, access_denynum+1);
            if (access_ipmask(w2, &access_deny[access_denynum]))
                ++access_denynum;
            else
                ShowError("socket_config_read: Invalid ip or ip range '%s'!\n", line);
        }
        else if (!strcmpi(w1,"ddos_interval"))
            ddos_interval = atoi(w2);
        else if (!strcmpi(w1,"ddos_count"))
            ddos_count = atoi(w2);
        else if (!strcmpi(w1,"ddos_autoreset"))
            ddos_autoreset = atoi(w2);
        else if (!strcmpi(w1,"debug"))
            access_debug = config_switch(w2);
        else if (!strcmpi(w1,"socket_max_client_packet"))
            socket_max_client_packet = strtoul(w2, NULL, 0);
#endif
        else if (!strcmpi(w1, "import"))
            socket_config_read(w2);
        else
            ShowWarning("Unknown setting '%s' in file %s\n", w1, cfgName);
    }
 
    fclose(fp);
    return 0;
}
 
void socket_final(void)
{
    int i;
#ifndef MINICORE
    if( connect_history )
        db_destroy(connect_history);
    if( access_allow )
        aFree(access_allow);
    if( access_deny )
        aFree(access_deny);
#endif
 
    for( i = 1; i < sockt->fd_max; i++ )
        if(sockt->session)
            sockt->close(i);
 
    // sockt->session[0]
    aFree(sockt->session[0]->rdata);
    aFree(sockt->session[0]->wdata);
    aFree(sockt->session[0]);
 
    aFree(sockt->session);
 
    VECTOR_CLEAR(sockt->lan_subnets);
    VECTOR_CLEAR(sockt->allowed_ips);
    VECTOR_CLEAR(sockt->trusted_ips);
}
 
/// Closes a socket.
void socket_close(int fd)
{
    if( fd <= 0 ||fd >= FD_SETSIZE )
        return;// invalid
 
    sockt->flush(fd); // Try to send what's left (although it might not succeed since it's a nonblocking socket)
    sFD_CLR(fd, &readfds);// this needs to be done before closing the socket
    sShutdown(fd, SHUT_RDWR); // Disallow further reads/writes
    sClose(fd); // We don't really care if these closing functions return an error, we are just shutting down and not reusing this socket.
    if (sockt->session[fd]) delete_session(fd);
}
 
/// Retrieve local ips in host byte order.
/// Uses loopback is no address is found.
int socket_getips(uint32* ips, int max)
{
    int num = 0;
 
    if( ips == NULL || max <= 0 )
        return 0;
 
#ifdef WIN32
    {
        char fullhost[255];
 
        // XXX This should look up the local IP addresses in the registry
        // instead of calling gethostbyname. However, the way IP addresses
        // are stored in the registry is annoyingly complex, so I'll leave
        // this as T.B.D. [Meruru]
        if (gethostname(fullhost, sizeof(fullhost)) == SOCKET_ERROR) {
            ShowError("socket_getips: No hostname defined!\n");
            return 0;
        } else {
            u_long** a;
            struct hostent *hent =gethostbyname(fullhost);
            if( hent == NULL ){
                ShowError("socket_getips: Cannot resolve our own hostname to an IP address\n");
                return 0;
            }
            a = (u_long**)hent->h_addr_list;
            for (; num < max && a[num] != NULL; ++num)
                ips[num] = (uint32)ntohl(*a[num]);
        }
    }
#else // not WIN32
    {
        int fd;
        char buf[2*16*sizeof(struct ifreq)];
        struct ifconf ic;
        u_long ad;
 
        fd = sSocket(AF_INET, SOCK_STREAM, 0);
        if (fd == -1) {
            ShowError("socket_getips: Unable to create a socket!\n");
            return 0;
        }
 
        memset(buf, 0x00, sizeof(buf));
 
        // The ioctl call will fail with Invalid Argument if there are more
        // interfaces than will fit in the buffer
        ic.ifc_len = sizeof(buf);
        ic.ifc_buf = buf;
        if (sIoctl(fd, SIOCGIFCONF, &ic) == -1) {
            ShowError("socket_getips: SIOCGIFCONF failed!\n");
            sClose(fd);
            return 0;
        } else {
            int pos;
            for (pos = 0; pos < ic.ifc_len && num < max; ) {
                struct ifreq *ir = (struct ifreq*)(buf+pos);
                struct sockaddr_in *a = (struct sockaddr_in*) &(ir->ifr_addr);
                if (a->sin_family == AF_INET) {
                    ad = ntohl(a->sin_addr.s_addr);
                    if (ad != INADDR_LOOPBACK && ad != INADDR_ANY)
                        ips[num++] = (uint32)ad;
                }
    #if (defined(BSD) && BSD >= 199103) || defined(_AIX) || defined(__APPLE__)
                pos += ir->ifr_addr.sa_len + sizeof(ir->ifr_name);
    #else// not AIX or APPLE
                pos += sizeof(struct ifreq);
    #endif//not AIX or APPLE
            }
        }
        sClose(fd);
    }
#endif // not W32
 
    // Use loopback if no ips are found
    if( num == 0 )
        ips[num++] = (uint32)INADDR_LOOPBACK;
 
    return num;
}
 
void socket_init(void)
{
    char *SOCKET_CONF_FILENAME = "conf/packet.conf";
    uint64 rlim_cur = FD_SETSIZE;
 
#ifdef WIN32
    {// Start up windows networking
        WSADATA wsaData;
        WORD wVersionRequested = MAKEWORD(2, 0);
        if( WSAStartup(wVersionRequested, &wsaData) != 0 )
        {
            ShowError("socket_init: WinSock not available!\n");
            return;
        }
        if( LOBYTE(wsaData.wVersion) != 2 || HIBYTE(wsaData.wVersion) != 0 )
        {
            ShowError("socket_init: WinSock version mismatch (2.0 or compatible required)!\n");
            return;
        }
    }
#elif defined(HAVE_SETRLIMIT) && !defined(CYGWIN)
    // NOTE: getrlimit and setrlimit have bogus behavior in cygwin.
    //       "Number of fds is virtually unlimited in cygwin" (sys/param.h)
    {// set socket limit to FD_SETSIZE
        struct rlimit rlp;
        if( 0 == getrlimit(RLIMIT_NOFILE, &rlp) )
        {
            rlp.rlim_cur = FD_SETSIZE;
            if( 0 != setrlimit(RLIMIT_NOFILE, &rlp) )
            {// failed, try setting the maximum too (permission to change system limits is required)
                rlp.rlim_max = FD_SETSIZE;
                if( 0 != setrlimit(RLIMIT_NOFILE, &rlp) )
                {// failed
                    const char *errmsg = error_msg();
                    int rlim_ori;
                    // set to maximum allowed
                    getrlimit(RLIMIT_NOFILE, &rlp);
                    rlim_ori = (int)rlp.rlim_cur;
                    rlp.rlim_cur = rlp.rlim_max;
                    setrlimit(RLIMIT_NOFILE, &rlp);
                    // report limit
                    getrlimit(RLIMIT_NOFILE, &rlp);
                    rlim_cur = rlp.rlim_cur;
                    ShowWarning("socket_init: failed to set socket limit to %d, setting to maximum allowed (original limit=%d, current limit=%d, maximum allowed=%d, %s).\n", FD_SETSIZE, rlim_ori, (int)rlp.rlim_cur, (int)rlp.rlim_max, errmsg);
                }
            }
        }
    }
#endif
 
    // Get initial local ips
    sockt->naddr_ = sockt->getips(sockt->addr_,16);
 
    sFD_ZERO(&readfds);
#if defined(SEND_SHORTLIST)
    memset(send_shortlist_set, 0, sizeof(send_shortlist_set));
#endif
 
    CREATE(sockt->session, struct socket_data *, FD_SETSIZE);
 
    socket_config_read(SOCKET_CONF_FILENAME);
 
    // initialize last send-receive tick
    sockt->last_tick = time(NULL);
 
    // sockt->session[0] is now currently used for disconnected sessions of the map server, and as such,
    // should hold enough buffer (it is a vacuum so to speak) as it is never flushed. [skotlex]
    create_session(0, null_recv, null_send, null_parse);
 
#ifndef MINICORE
    // Delete old connection history every 5 minutes
    connect_history = uidb_alloc(DB_OPT_RELEASE_DATA);
    timer->add_func_list(connect_check_clear, "connect_check_clear");
    timer->add_interval(timer->gettick()+1000, connect_check_clear, 0, 0, 5*60*1000);
#endif
 
    ShowInfo("Server supports up to '"CL_WHITE"%"PRId64""CL_RESET"' concurrent connections.\n", rlim_cur);
}
 
bool session_is_valid(int fd)
{
    return ( fd > 0 && fd < FD_SETSIZE && sockt->session[fd] != NULL );
}
 
bool session_is_active(int fd)
{
    return ( sockt->session_is_valid(fd) && !sockt->session[fd]->flag.eof );
}
 
// Resolves hostname into a numeric ip.
uint32 host2ip(const char* hostname)
{
    struct hostent* h = gethostbyname(hostname);
    return (h != NULL) ? ntohl(*(uint32*)h->h_addr) : 0;
}
 
/**
 * Converts a numeric ip into a dot-formatted string.
 *
 * @param ip     Numeric IP to convert.
 * @param ip_str Output buffer, optional (if provided, must have size greater or equal to 16).
 *
 * @return A pointer to the output string.
 */
const char *ip2str(uint32 ip, char *ip_str)
{
    struct in_addr addr;
    addr.s_addr = htonl(ip);
    return (ip_str == NULL) ? inet_ntoa(addr) : strncpy(ip_str, inet_ntoa(addr), 16);
}
 
// Converts a dot-formatted ip string into a numeric ip.
uint32 str2ip(const char* ip_str)
{
    return ntohl(inet_addr(ip_str));
}
 
// Reorders bytes from network to little endian (Windows).
// Necessary for sending port numbers to the RO client until Gravity notices that they forgot ntohs() calls.
uint16 ntows(uint16 netshort)
{
    return ((netshort & 0xFF) << 8) | ((netshort & 0xFF00) >> 8);
}
 
/* [ind/Hercules] - socket_datasync */
void socket_datasync(int fd, bool send) {
    struct {
        unsigned int length;/* short is not enough for some */
    } data_list[] = {
        { sizeof(struct mmo_charstatus) },
        { sizeof(struct quest) },
        { sizeof(struct item) },
        { sizeof(struct point) },
        { sizeof(struct s_skill) },
        { sizeof(struct status_change_data) },
        { sizeof(struct storage_data) },
        { sizeof(struct guild_storage) },
        { sizeof(struct s_pet) },
        { sizeof(struct s_mercenary) },
        { sizeof(struct s_homunculus) },
        { sizeof(struct s_elemental) },
        { sizeof(struct s_friend) },
        { sizeof(struct mail_message) },
        { sizeof(struct mail_data) },
        { sizeof(struct party_member) },
        { sizeof(struct party) },
        { sizeof(struct guild_member) },
        { sizeof(struct guild_position) },
        { sizeof(struct guild_alliance) },
        { sizeof(struct guild_expulsion) },
        { sizeof(struct guild_skill) },
        { sizeof(struct guild) },
        { sizeof(struct guild_castle) },
        { sizeof(struct fame_list) },
        { PACKETVER },
    };
    unsigned short i;
    unsigned int alen = ARRAYLENGTH(data_list);
    if( send ) {
        unsigned short p_len = ( alen * 4 ) + 4;
        WFIFOHEAD(fd, p_len);
 
        WFIFOW(fd, 0) = 0x2b0a;
        WFIFOW(fd, 2) = p_len;
 
        for( i = 0; i < alen; i++ ) {
            WFIFOL(fd, 4 + ( i * 4 ) ) = data_list.length;
        }
 
        WFIFOSET(fd, p_len);
    } else {
        for( i = 0; i < alen; i++ ) {
            if( RFIFOL(fd, 4 + (i * 4) ) != data_list.length ) {
                /* force the other to go wrong too so both are taken down */
                WFIFOHEAD(fd, 8);
                WFIFOW(fd, 0) = 0x2b0a;
                WFIFOW(fd, 2) = 8;
                WFIFOL(fd, 4) = 0;
                WFIFOSET(fd, 8);
                sockt->flush(fd);
                /* shut down */
                ShowFatalError("Servers are out of sync! recompile from scratch (%d)\n",i);
                exit(EXIT_FAILURE);
            }
        }
    }
}
 
#ifdef SEND_SHORTLIST
// Add a fd to the shortlist so that it'll be recognized as a fd that needs
// sending or eof handling.
void send_shortlist_add_fd(int fd)
{
    int i;
    int bit;
 
    if (!sockt->session_is_valid(fd))
        return;// out of range
 
    i = fd/32;
    bit = fd%32;
 
    if( (send_shortlist_set>>bit)&1 )
        return;// already in the list
 
    if (send_shortlist_count >= ARRAYLENGTH(send_shortlist_array)) {
        ShowDebug("send_shortlist_add_fd: shortlist is full, ignoring... (fd=%d shortlist.count=%d shortlist.length=%d)\n",
                  fd, send_shortlist_count, ARRAYLENGTH(send_shortlist_array));
        return;
    }
 
    // set the bit
    send_shortlist_set |= 1<<bit;
    // Add to the end of the shortlist array.
    send_shortlist_array[send_shortlist_count++] = fd;
}
 
// Do pending network sends and eof handling from the shortlist.
void send_shortlist_do_sends(void)
{
    int i;
 
    for( i = send_shortlist_count-1; i >= 0; --i )
    {
        int fd = send_shortlist_array;
        int idx = fd/32;
        int bit = fd%32;
 
        // Remove fd from shortlist, move the last fd to the current position
        --send_shortlist_count;
        send_shortlist_array = send_shortlist_array[send_shortlist_count];
        send_shortlist_array[send_shortlist_count] = 0;
 
        if( fd <= 0 || fd >= FD_SETSIZE )
        {
            ShowDebug("send_shortlist_do_sends: fd is out of range, corrupted memory? (fd=%d)\n", fd);
            continue;
        }
        if( ((send_shortlist_set[idx]>>bit)&1) == 0 )
        {
            ShowDebug("send_shortlist_do_sends: fd is not set, why is it in the shortlist? (fd=%d)\n", fd);
            continue;
        }
        send_shortlist_set[idx]&=~(1<<bit);// unset fd
        // If this session still exists, perform send operations on it and
        // check for the eof state.
        if( sockt->session[fd] )
        {
            // Send data
            if( sockt->session[fd]->wdata_size )
                sockt->session[fd]->func_send(fd);
 
            // If it's been marked as eof, call the parse func on it so that
            // the socket will be immediately closed.
            if( sockt->session[fd]->flag.eof )
                sockt->session[fd]->func_parse(fd);
 
            // If the session still exists, is not eof and has things left to
            // be sent from it we'll re-add it to the shortlist.
            if( sockt->session[fd] && !sockt->session[fd]->flag.eof && sockt->session[fd]->wdata_size )
                send_shortlist_add_fd(fd);
        }
    }
}
#endif
 
/**
 * Checks whether the given IP comes from LAN or WAN.
 *
 * @param[in]  ip   IP address to check.
 * @param[out] info Verbose output, if requested. Filled with the matching entry. Ignored if NULL.
 * @retval 0 if it is a WAN IP.
 * @return the appropriate LAN server address to send, if it is a LAN IP.
 */
uint32 socket_lan_subnet_check(uint32 ip, struct s_subnet *info)
{
    int i;
    ARR_FIND(0, VECTOR_LENGTH(sockt->lan_subnets), i, SUBNET_MATCH(ip, VECTOR_INDEX(sockt->lan_subnets, i).ip, VECTOR_INDEX(sockt->lan_subnets, i).mask));
    if (i != VECTOR_LENGTH(sockt->lan_subnets)) {
        if (info) {
            info->ip = VECTOR_INDEX(sockt->lan_subnets, i).ip;
            info->mask = VECTOR_INDEX(sockt->lan_subnets, i).mask;
        }
        return VECTOR_INDEX(sockt->lan_subnets, i).ip;
    }
    if (info) {
        info->ip = info->mask = 0;
    }
    return 0;
}
 
/**
 * Checks whether the given IP is allowed to connect as a server.
 *
 * @param ip IP address to check.
 * @retval true if we allow server connections from the given IP.
 * @retval false otherwise.
 */
bool socket_allowed_ip_check(uint32 ip)
{
    int i;
    ARR_FIND(0, VECTOR_LENGTH(sockt->allowed_ips), i, SUBNET_MATCH(ip, VECTOR_INDEX(sockt->allowed_ips, i).ip, VECTOR_INDEX(sockt->allowed_ips, i).mask));
    if (i != VECTOR_LENGTH(sockt->allowed_ips))
        return true;
    return sockt->trusted_ip_check(ip); // If an address is trusted, it's automatically also allowed.
}
 
/**
 * Checks whether the given IP is trusted and can skip ipban checks.
 *
 * @param ip IP address to check.
 * @retval true if we trust the given IP.
 * @retval false otherwise.
 */
bool socket_trusted_ip_check(uint32 ip)
{
    int i;
    ARR_FIND(0, VECTOR_LENGTH(sockt->trusted_ips), i, SUBNET_MATCH(ip, VECTOR_INDEX(sockt->trusted_ips, i).ip, VECTOR_INDEX(sockt->trusted_ips, i).mask));
    if (i != VECTOR_LENGTH(sockt->trusted_ips))
        return true;
    return false;
}
 
/**
 * Helper function to read a list of network.conf values.
 *
 * Entries will be appended to the variable-size array pointed to by list/count.
 *
 * @param[in]     t         The list to parse.
 * @param[in,out] list      Vector to append to. Must not be NULL (but the vector may be empty).
 * @param[in]     filename  Current filename, for output/logging reasons.
 * @param[in]     groupname Current group name, for output/logging reasons.
 * @return The amount of entries read, zero in case of errors.
 */
int socket_net_config_read_sub(config_setting_t *t, struct s_subnet_vector *list, const char *filename, const char *groupname)
{
    int i, len;
    char ipbuf[64], maskbuf[64];
 
    nullpo_retr(0, list);
 
    if (t == NULL)
        return 0;
 
    len = libconfig->setting_length(t);
 
    VECTOR_ENSURE(*list, len, 1);
    for (i = 0; i < len; ++i) {
        const char *subnet = libconfig->setting_get_string_elem(t, i);
        struct s_subnet *entry = NULL;
 
        if (sscanf(subnet, "%63[^:]:%63[^:]", ipbuf, maskbuf) != 2) {
            ShowWarning("Invalid IP:Subnet entry in configuration file %s: '%s' (%s)\n", filename, subnet, groupname);
            continue;
        }
        VECTOR_PUSHZEROED(*list);
        entry = &VECTOR_LAST(*list);
        entry->ip = sockt->str2ip(ipbuf);
        entry->mask = sockt->str2ip(maskbuf);
    }
    return (int)VECTOR_LENGTH(*list);
}
 
/**
 * Reads the network configuration file.
 *
 * @param filename The filename to read from.
 */
void socket_net_config_read(const char *filename)
{
    config_t network_config;
    int i;
    nullpo_retv(filename);
 
    if (libconfig->read_file(&network_config, filename)) {
        ShowError("LAN Support configuration file is not found: '%s'. This server won't be able to accept connections from any servers.\n", filename);
        return;
    }
 
    VECTOR_CLEAR(sockt->lan_subnets);
    if (sockt->net_config_read_sub(libconfig->lookup(&network_config, "lan_subnets"), &sockt->lan_subnets, filename, "lan_subnets") > 0)
        ShowStatus("Read information about %d LAN subnets.\n", (int)VECTOR_LENGTH(sockt->lan_subnets));
 
    VECTOR_CLEAR(sockt->trusted_ips);
    if (sockt->net_config_read_sub(libconfig->lookup(&network_config, "trusted"), &sockt->trusted_ips, filename, "trusted") > 0)
        ShowStatus("Read information about %d trusted IP ranges.\n", (int)VECTOR_LENGTH(sockt->trusted_ips));
    ARR_FIND(0, VECTOR_LENGTH(sockt->trusted_ips), i, SUBNET_MATCH(0, VECTOR_INDEX(sockt->trusted_ips, i).ip, VECTOR_INDEX(sockt->trusted_ips, i).mask));
    if (i != VECTOR_LENGTH(sockt->trusted_ips)) {
        ShowError("Using a wildcard IP range in the trusted server IPs is NOT RECOMMENDED.\n");
        ShowNotice("Please edit your '%s' trusted list to fit your network configuration.\n", filename);
    }
 
    VECTOR_CLEAR(sockt->allowed_ips);
    if (sockt->net_config_read_sub(libconfig->lookup(&network_config, "allowed"), &sockt->allowed_ips, filename, "allowed") > 0)
        ShowStatus("Read information about %d allowed server IP ranges.\n", (int)VECTOR_LENGTH(sockt->allowed_ips));
    if (VECTOR_LENGTH(sockt->allowed_ips) + VECTOR_LENGTH(sockt->trusted_ips) == 0) {
        ShowError("No allowed server IP ranges configured. This server won't be able to accept connections from any char servers.\n");
    }
    ARR_FIND(0, VECTOR_LENGTH(sockt->allowed_ips), i, SUBNET_MATCH(0, VECTOR_INDEX(sockt->allowed_ips, i).ip, VECTOR_INDEX(sockt->allowed_ips, i).mask));
    if (i != VECTOR_LENGTH(sockt->allowed_ips)) {
        ShowWarning("Using a wildcard IP range in the allowed server IPs is NOT RECOMMENDED.\n");
        ShowNotice("Please edit your '%s' allowed list to fit your network configuration.\n", filename);
    }
    libconfig->destroy(&network_config);
    return;
}
 
void socket_defaults(void) {
    sockt = &sockt_s;
 
    sockt->fd_max = 0;
    /* */
    sockt->stall_time = 60;
    sockt->last_tick = 0;
    /* */
    memset(&sockt->addr_, 0, sizeof(sockt->addr_));
    sockt->naddr_ = 0;
    /* */
    VECTOR_INIT(sockt->lan_subnets);
    VECTOR_INIT(sockt->allowed_ips);
    VECTOR_INIT(sockt->trusted_ips);
 
    sockt->init = socket_init;
    sockt->final = socket_final;
    /* */
    sockt->perform = do_sockets;
    /* */
    sockt->datasync = socket_datasync;
    /* */
    sockt->make_listen_bind = make_listen_bind;
    sockt->make_connection = make_connection;
    sockt->realloc_fifo = realloc_fifo;
    sockt->realloc_writefifo = realloc_writefifo;
    sockt->wfifoset = wfifoset;
    sockt->rfifoskip = rfifoskip;
    sockt->close = socket_close;
    /* */
    sockt->session_is_valid = session_is_valid;
    sockt->session_is_active = session_is_active;
    /* */
    sockt->flush = flush_fifo;
    sockt->flush_fifos = flush_fifos;
    sockt->set_nonblocking = set_nonblocking;
    sockt->set_defaultparse = set_defaultparse;
    sockt->host2ip = host2ip;
    sockt->ip2str = ip2str;
    sockt->str2ip = str2ip;
    sockt->ntows = ntows;
    sockt->getips = socket_getips;
    sockt->eof = set_eof;
 
    sockt->lan_subnet_check = socket_lan_subnet_check;
    sockt->allowed_ip_check = socket_allowed_ip_check;
    sockt->trusted_ip_check = socket_trusted_ip_check;
    sockt->net_config_read_sub = socket_net_config_read_sub;
    sockt->net_config_read = socket_net_config_read;
}

a new revision not working?
what changed?
new revision add #include "common/config.h"
Edited by ucell_uz

Share this post


Link to post
Share on other sites
  • 0

Getting this error when trying to make sql:

O3qEbp1.png

 

Try run

make clean
./configure
make

Share this post


Link to post
Share on other sites
  • 0

Probably you have broken files.

Show first errors and not last.

Also show output from commands:

 

git diff
git status
gcc --version 

Share this post


Link to post
Share on other sites
  • 0

 

Probably you have broken files.

Show first errors and not last.

Also show output from commands:

 

git diff
git status
gcc --version 

m6oWHAR.png

 

gcc --version: gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-11)

 

I'm sorry, but how do I use git diff and git status?

Share this post


Link to post
Share on other sites
  • 0

Try update gcc, because it too old

Done that. This is what I'm getting:

 

 

[root@@ragnarok emulador]# make sql
        MAKE    mt19937ar
make[1]: Entering directory `/home/emulador/3rdparty/mt19937ar'
        CC      mt19937ar.c
make[1]: Leaving directory `/home/emulador/3rdparty/mt19937ar'
        MAKE    libconfig
make[1]: Entering directory `/home/emulador/3rdparty/libconfig'
        CC      libconfig.c
libconfig.c:74:12: warning: redundant redeclaration of ‘libconfig_yylex_init_extra’ [-Wredundant-decls]
 extern int libconfig_yylex_init_extra(struct scan_context *scan_ctx,
            ^
In file included from libconfig.c:28:0:
scanner.h:237:5: note: previous declaration of ‘libconfig_yylex_init_extra’ was here
 int libconfig_yylex_init_extra (YY_EXTRA_TYPE user_defined,yyscan_t* scanner);
     ^
libconfig.c: In function ‘config_destroy’:
libconfig.c:48:25: warning: cast discards ‘__attribute__((const))’ qualifier from pointer target type [-Wcast-qual]
 #define _delete(P) free((void *)(P))
                         ^
libconfig.c:717:5: note: in expansion of macro ‘_delete’
     _delete(*f);
     ^
libconfig.c:48:25: warning: cast discards ‘__attribute__((const))’ qualifier from pointer target type [-Wcast-qual]
 #define _delete(P) free((void *)(P))
                         ^
libconfig.c:720:3: note: in expansion of macro ‘_delete’
   _delete(config->include_dir);
   ^
libconfig.c: In function ‘config_set_include_dir’:
libconfig.c:48:25: warning: cast discards ‘__attribute__((const))’ qualifier from pointer target type [-Wcast-qual]
 #define _delete(P) free((void *)(P))
                         ^
libconfig.c:1497:3: note: in expansion of macro ‘_delete’
   _delete(config->include_dir);
   ^
        CC      grammar.c
grammar.y: In function ‘libconfig_yyparse’:
grammar.y:56:25: warning: cast discards ‘__attribute__((const))’ qualifier from pointer target type [-Wcast-qual]
grammar.y:336:7: note: in expansion of macro ‘_delete’
grammar.y:56:25: warning: cast discards ‘__attribute__((const))’ qualifier from pointer target type [-Wcast-qual]
grammar.y:352:7: note: in expansion of macro ‘_delete’
        CC      scanctx.c
scanctx.c: In function ‘__scanctx_add_filename’:
scanctx.c:50:12: warning: cast discards ‘__attribute__((const))’ qualifier from pointer target type [-Wcast-qual]
       free((void *)filename);
            ^
scanctx.c: In function ‘scanctx_push_include’:
scanctx.c:132:10: warning: cast discards ‘__attribute__((const))’ qualifier from pointer target type [-Wcast-qual]
     free((void *)file);
          ^
        CC      scanner.c
        CC      strbuf.c
make[1]: Leaving directory `/home/emulador/3rdparty/libconfig'
        MAKE    common_sql
make[1]: Entering directory `/home/emulador/src/common'
        MKDIR   obj_all
        CC      conf.c
conf.c: In function ‘libconfig_defaults’:
conf.c:377:27: error: ‘config_set_options’ undeclared (first use in this function)
  libconfig->set_options = config_set_options;
                           ^
conf.c:377:27: note: each undeclared identifier is reported only once for each function it appears in
conf.c:378:27: error: ‘config_get_options’ undeclared (first use in this function)
  libconfig->get_options = config_get_options;
                           ^
conf.c:396:30: error: ‘config_setting_lookup’ undeclared (first use in this function)
  libconfig->setting_lookup = config_setting_lookup;
                              ^
make[1]: *** [obj_all/conf.o] Error 1
make[1]: Leaving directory `/home/emulador/src/common'
make: *** [common_sql] Error 2
Edited by Ga_Chittolina

Share this post


Link to post
Share on other sites
  • 0

I had updated it to 4.8, now tried updating it to 6.1, and this is what I'm getting, when using ./configure:

 

 

 [root@@ragnarok emulador]# ./configure
checking for gcc... gcc
checking whether the C compiler works... no
configure: error: in `/home/emulador':
configure: error: C compiler cannot create executables
See `config.log' for more details

 

config.log:

 

This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

It was created by configure, which was
generated by GNU Autoconf 2.69. Invocation command line was

$ ./configure

## --------- ##
## Platform. ##
## --------- ##

hostname = ragnarok
uname -m = i686
uname -r = 2.6.32-042stab113.11
uname -s = Linux
uname -v = #1 SMP Fri Dec 18 17:32:04 MSK 2015

/usr/bin/uname -p = unknown
/bin/uname -X = unknown

/bin/arch = i686
/usr/bin/arch -k = unknown
/usr/convex/getsysinfo = unknown
/usr/bin/hostinfo = unknown
/bin/machine = unknown
/usr/bin/oslevel = unknown
/bin/universe = unknown

PATH: /usr/local/sbin
PATH: /usr/local/bin
PATH: /sbin
PATH: /bin
PATH: /usr/sbin
PATH: /usr/bin
PATH: /root/bin


## ----------- ##
## Core tests. ##
## ----------- ##

configure:2246: checking for gcc
configure:2262: found /usr/bin/gcc
configure:2273: result: gcc
configure:2502: checking for C compiler version
configure:2511: gcc --version >&5
gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-11)
Copyright © 2010 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

configure:2522: $? = 0
configure:2511: gcc -v >&5
Using built-in specs.
Target: i686-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk --disable-dssi --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre --enable-libgcj-multifile --enable-java-maintainer-mode --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --disable-libjava-multilib --with-ppl --with-cloog --with-tune=generic --with-arch=i686 --build=i686-redhat-linux
Thread model: posix
gcc version 4.4.7 20120313 (Red Hat 4.4.7-11) (GCC)
configure:2522: $? = 0
configure:2511: gcc -V >&5
gcc: '-V' option must have argument
configure:2522: $? = 1
configure:2511: gcc -qversion >&5
gcc: unrecognized option '-qversion'
gcc: no input files
configure:2522: $? = 1
configure:2542: checking whether the C compiler works
configure:2564: gcc conftest.c >&5
configure:2568: $? = 0
configure:2616: result: yes
configure:2619: checking for C compiler default output file name
configure:2621: result: a.out
configure:2627: checking for suffix of executables
configure:2634: gcc -o conftest conftest.c >&5
configure:2638: $? = 0
configure:2660: result:
configure:2682: checking whether we are cross compiling
configure:2690: gcc -o conftest conftest.c >&5
configure:2694: $? = 0
configure:2701: ./conftest
configure:2705: $? = 0
configure:2720: result: no
configure:2725: checking for suffix of object files
configure:2747: gcc -c conftest.c >&5
configure:2751: $? = 0
configure:2772: result: o
configure:2776: checking whether we are using the GNU C compiler
configure:2795: gcc -c conftest.c >&5
configure:2795: $? = 0
configure:2804: result: yes
configure:2813: checking whether gcc accepts -g
configure:2833: gcc -c -g conftest.c >&5
configure:2833: $? = 0
configure:2874: result: yes
configure:2891: checking for gcc option to accept ISO C89
configure:2954: gcc -c -g -O2 conftest.c >&5
configure:2954: $? = 0
configure:2967: result: none needed
configure:2993: checking how to run the C preprocessor
configure:3024: gcc -E conftest.c
configure:3024: $? = 0
configure:3038: gcc -E conftest.c
conftest.c:9:28: error: ac_nonexistent.h: No such file or directory
configure:3038: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL ""
| /* end confdefs.h. */
| #include
configure:3063: result: gcc -E
configure:3083: gcc -E conftest.c
configure:3083: $? = 0
configure:3097: gcc -E conftest.c
conftest.c:9:28: error: ac_nonexistent.h: No such file or directory
configure:3097: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL ""
| /* end confdefs.h. */
| #include
configure:3126: checking for grep that handles long lines and -e
configure:3184: result: /bin/grep
configure:3189: checking for egrep
configure:3251: result: /bin/grep -E
configure:3256: checking for ANSI C header files
configure:3276: gcc -c -g -O2 conftest.c >&5
configure:3276: $? = 0
configure:3349: gcc -o conftest -g -O2 conftest.c >&5
configure:3349: $? = 0
configure:3349: ./conftest
configure:3349: $? = 0
configure:3360: result: yes
configure:3373: checking for sys/types.h
configure:3373: gcc -c -g -O2 conftest.c >&5
configure:3373: $? = 0
configure:3373: result: yes
configure:3373: checking for sys/stat.h
configure:3373: gcc -c -g -O2 conftest.c >&5
configure:3373: $? = 0
configure:3373: result: yes
configure:3373: checking for stdlib.h
configure:3373: gcc -c -g -O2 conftest.c >&5
configure:3373: $? = 0
configure:3373: result: yes
configure:3373: checking for string.h
configure:3373: gcc -c -g -O2 conftest.c >&5
configure:3373: $? = 0
configure:3373: result: yes
configure:3373: checking for memory.h
configure:3373: gcc -c -g -O2 conftest.c >&5
configure:3373: $? = 0
configure:3373: result: yes
configure:3373: checking for strings.h
configure:3373: gcc -c -g -O2 conftest.c >&5
configure:3373: $? = 0
configure:3373: result: yes
configure:3373: checking for inttypes.h
configure:3373: gcc -c -g -O2 conftest.c >&5
configure:3373: $? = 0
configure:3373: result: yes
configure:3373: checking for stdint.h
configure:3373: gcc -c -g -O2 conftest.c >&5
configure:3373: $? = 0
configure:3373: result: yes
configure:3373: checking for unistd.h
configure:3373: gcc -c -g -O2 conftest.c >&5
configure:3373: $? = 0
configure:3373: result: yes
configure:3386: checking minix/config.h usability
configure:3386: gcc -c -g -O2 conftest.c >&5
conftest.c:52:26: error: minix/config.h: No such file or directory
configure:3386: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL ""
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| /* end confdefs.h. */
| #include
| #ifdef HAVE_SYS_TYPES_H
| # include
| #endif
| #ifdef HAVE_SYS_STAT_H
| # include
| #endif
| #ifdef STDC_HEADERS
| # include
| # include
| #else
| # ifdef HAVE_STDLIB_H
| # include
| # endif
| #endif
| #ifdef HAVE_STRING_H
| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
| # include
| # endif
| # include
| #endif
| #ifdef HAVE_STRINGS_H
| # include
| #endif
| #ifdef HAVE_INTTYPES_H
| # include
| #endif
| #ifdef HAVE_STDINT_H
| # include
| #endif
| #ifdef HAVE_UNISTD_H
| # include
| #endif
| #include
configure:3386: result: no
configure:3386: checking minix/config.h presence
configure:3386: gcc -E conftest.c
conftest.c:19:26: error: minix/config.h: No such file or directory
configure:3386: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL ""
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| /* end confdefs.h. */
| #include
configure:3386: result: no
configure:3386: checking for minix/config.h
configure:3386: result: no
configure:3407: checking whether it is safe to define __EXTENSIONS__
configure:3425: gcc -c -g -O2 conftest.c >&5
configure:3425: $? = 0
configure:3432: result: yes
configure:3841: checking whether make sets $(MAKE)
configure:3863: result: yes
configure:3920: checking for gcc
configure:3947: result: gcc
configure:4176: checking for C compiler version
configure:4185: gcc --version >&5
gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-11)
Copyright © 2010 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

configure:4196: $? = 0
configure:4185: gcc -v >&5
Using built-in specs.
Target: i686-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk --disable-dssi --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre --enable-libgcj-multifile --enable-java-maintainer-mode --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --disable-libjava-multilib --with-ppl --with-cloog --with-tune=generic --with-arch=i686 --build=i686-redhat-linux
Thread model: posix
gcc version 4.4.7 20120313 (Red Hat 4.4.7-11) (GCC)
configure:4196: $? = 0
configure:4185: gcc -V >&5
gcc: '-V' option must have argument
configure:4196: $? = 1
configure:4185: gcc -qversion >&5
gcc: unrecognized option '-qversion'
gcc: no input files
configure:4196: $? = 1
configure:4200: checking whether we are using the GNU C compiler
configure:4228: result: yes
configure:4237: checking whether gcc accepts -g
configure:4298: result: yes
configure:4315: checking for gcc option to accept ISO C89
configure:4391: result: none needed
configure:4416: checking how to run the C preprocessor
configure:4486: result: gcc -E
configure:4506: gcc -E -DMAXCONN=16384 conftest.c
configure:4506: $? = 0
configure:4520: gcc -E -DMAXCONN=16384 conftest.c
conftest.c:24:28: error: ac_nonexistent.h: No such file or directory
configure:4520: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL ""
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define __EXTENSIONS__ 1
| #define _ALL_SOURCE 1
| #define _GNU_SOURCE 1
| #define _POSIX_PTHREAD_SEMANTICS 1
| #define _TANDEM_SOURCE 1
| /* end confdefs.h. */
| #include
configure:4550: checking for ar
configure:4568: found /usr/bin/ar
configure:4580: result: /usr/bin/ar
configure:4631: checking whether byte ordering is bigendian
configure:4646: gcc -c -g -O2 -pipe -ffast-math -Wall -Wextra -Wno-sign-compare -std=c99 -DMAXCONN=16384 -I../common conftest.c >&5
conftest.c:25: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'a'
configure:4646: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL ""
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define __EXTENSIONS__ 1
| #define _ALL_SOURCE 1
| #define _GNU_SOURCE 1
| #define _POSIX_PTHREAD_SEMANTICS 1
| #define _TANDEM_SOURCE 1
| /* end confdefs.h. */
| #ifndef __APPLE_CC__
| not a universal capable compiler
| #endif
| typedef int dummy;
|
configure:4691: gcc -c -g -O2 -pipe -ffast-math -Wall -Wextra -Wno-sign-compare -std=c99 -DMAXCONN=16384 -I../common conftest.c >&5
configure:4691: $? = 0
configure:4709: gcc -c -g -O2 -pipe -ffast-math -Wall -Wextra -Wno-sign-compare -std=c99 -DMAXCONN=16384 -I../common conftest.c >&5
conftest.c: In function 'main':
conftest.c:31: error: 'not' undeclared (first use in this function)
conftest.c:31: error: (Each undeclared identifier is reported only once
conftest.c:31: error: for each function it appears in.)
conftest.c:31: error: expected ';' before 'big'
configure:4709: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL ""
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define __EXTENSIONS__ 1
| #define _ALL_SOURCE 1
| #define _GNU_SOURCE 1
| #define _POSIX_PTHREAD_SEMANTICS 1
| #define _TANDEM_SOURCE 1
| /* end confdefs.h. */
| #include
| #include
|
| int
| main ()
| {
| #if BYTE_ORDER != BIG_ENDIAN
| not big endian
| #endif
|
| ;
| return 0;
| }
configure:4837: result: no
configure:4906: checking whether gcc produces 32bit code
configure:4924: gcc -o conftest -g -O2 -pipe -ffast-math -Wall -Wextra -Wno-sign-compare -std=c99 -DMAXCONN=16384 -I../common conftest.c >&5
conftest.c: In function 'main':
conftest.c:25: warning: unused parameter 'argc'
conftest.c:25: warning: unused parameter 'argv'
configure:4924: $? = 0
configure:4924: ./conftest
configure:4924: $? = 0
configure:4926: result: yes
configure:4928: checking whether gcc supports -march=i686 (and we can run it)
configure:4949: gcc -o conftest -g -O2 -pipe -ffast-math -Wall -Wextra -Wno-sign-compare -std=c99 -march=i686 -DMAXCONN=16384 -I../common -march=i686 conftest.c >&5
conftest.c: In function 'main':
conftest.c:25: warning: unused parameter 'argc'
conftest.c:25: warning: unused parameter 'argv'
configure:4949: $? = 0
configure:4949: ./conftest
configure:4949: $? = 0
configure:4951: result: yes
configure:4983: checking whether gcc supports __thread specifier (TLS)
configure:5002: gcc -o conftest -g -O2 -pipe -ffast-math -Wall -Wextra -Wno-sign-compare -std=c99 -march=i686 -DMAXCONN=16384 -I../common -march=i686 conftest.c >&5
conftest.c: In function 'main':
conftest.c:27: warning: unused parameter 'argc'
conftest.c:27: warning: unused parameter 'argv'
configure:5002: $? = 0
configure:5002: ./conftest
configure:5002: $? = 0
configure:5004: result: yes
configure:5027: checking whether gcc accepts -rdynamic
configure:5038: gcc -o conftest -g -O2 -pipe -ffast-math -Wall -Wextra -Wno-sign-compare -std=c99 -march=i686 -DMAXCONN=16384 -I../common -DHAS_TLS -march=i686 -rdynamic conftest.c >&5
conftest.c: In function 'main':
conftest.c:25: warning: unused parameter 'argc'
conftest.c:25: warning: unused parameter 'argv'
configure:5038: $? = 0
configure:5040: result: yes
configure:5981: checking whether gcc supports -Wno-unused-parameter
configure:5989: gcc -c -g -O2 -pipe -ffast-math -Wall -Wextra -Wno-sign-compare -std=c99 -march=i686 -Werror -Wno-unused-parameter -DMAXCONN=16384 -I../common -DHAS_TLS conftest.c >&5
configure:5989: $? = 0
configure:5999: gcc -c -g -O2 -pipe -ffast-math -Wall -Wextra -Wno-sign-compare -std=c99 -march=i686 -Werror -Wunused-parameter -DMAXCONN=16384 -I../common -DHAS_TLS conftest.c >&5
configure:5999: $? = 0
configure:6001: result: yes
configure:6006: checking whether gcc can actually use -Wno-unused-parameter
configure:6013: gcc -c -g -O2 -pipe -ffast-math -Wall -Wextra -Wno-sign-compare -std=c99 -march=i686 -Werror -Wunused-parameter -DMAXCONN=16384 -I../common -DHAS_TLS conftest.c >&5
cc1: warnings being treated as errors
conftest.c: In function 'foo':
conftest.c:24: error: unused parameter 'bar'
configure:6013: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL ""
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define __EXTENSIONS__ 1
| #define _ALL_SOURCE 1
| #define _GNU_SOURCE 1
| #define _POSIX_PTHREAD_SEMANTICS 1
| #define _TANDEM_SOURCE 1
| /* end confdefs.h. */
| int foo(int bar) { return 0; }
configure:6026: gcc -c -g -O2 -pipe -ffast-math -Wall -Wextra -Wno-sign-compare -std=c99 -march=i686 -Werror -Wno-unused-parameter -DMAXCONN=16384 -I../common -DHAS_TLS conftest.c >&5
configure:6026: $? = 0
configure:6028: result: yes
configure:6069: checking whether gcc supports -Wno-clobbered
configure:6077: gcc -c -g -O2 -pipe -ffast-math -Wall -Wextra -Wno-sign-compare -std=c99 -march=i686 -Wno-unused-parameter -Werror -Wno-clobbered -DMAXCONN=16384 -I../common -DHAS_TLS conftest.c >&5
configure:6077: $? = 0
configure:6087: gcc -c -g -O2 -pipe -ffast-math -Wall -Wextra -Wno-sign-compare -std=c99 -march=i686 -Wno-unused-parameter -Werror -Wclobbered -DMAXCONN=16384 -I../common -DHAS_TLS conftest.c >&5
configure:6087: $? = 0
configure:6089: result: yes
configure:6157: checking whether gcc supports -Wempty-body
configure:6165: gcc -c -g -O2 -pipe -ffast-math -Wall -Wextra -Wno-sign-compare -std=c99 -march=i686 -Wno-unused-parameter -Wno-clobbered -Werror -Wempty-body -DMAXCONN=16384 -I../common -DHAS_TLS conftest.c >&5
configure:6165: $? = 0
configure:6167: result: yes
configure:6206: checking whether gcc supports -Wnewline-eof
configure:6214: gcc -c -g -O2 -pipe -ffast-math -Wall -Wextra -Wno-sign-compare -std=c99 -march=i686 -Wno-unused-parameter -Wno-clobbered -Wempty-body -Werror -Wnewline-eof -DMAXCONN=16384 -I../common -DHAS_TLS conftest.c >&5
cc1: error: unrecognized command line option "-Wnewline-eof"
configure:6214: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL ""
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define __EXTENSIONS__ 1
| #define _ALL_SOURCE 1
| #define _GNU_SOURCE 1
| #define _POSIX_PTHREAD_SEMANTICS 1
| #define _TANDEM_SOURCE 1
| /* end confdefs.h. */
| int foo;
configure:6245: result: no
configure:6255: checking whether gcc supports -Wint-conversion
configure:6263: gcc -c -g -O2 -pipe -ffast-math -Wall -Wextra -Wno-sign-compare -std=c99 -march=i686 -Wno-unused-parameter -Wno-clobbered -Wempty-body -Werror -Wint-conversion -DMAXCONN=16384 -I../common -DHAS_TLS conftest.c >&5
cc1: error: unrecognized command line option "-Wint-conversion"
configure:6263: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL ""
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define __EXTENSIONS__ 1
| #define _ALL_SOURCE 1
| #define _GNU_SOURCE 1
| #define _POSIX_PTHREAD_SEMANTICS 1
| #define _TANDEM_SOURCE 1
| /* end confdefs.h. */
| int foo;
configure:6294: result: no
configure:6304: checking whether gcc supports -Winit-self
configure:6312: gcc -c -g -O2 -pipe -ffast-math -Wall -Wextra -Wno-sign-compare -std=c99 -march=i686 -Wno-unused-parameter -Wno-clobbered -Wempty-body -Werror -Winit-self -DMAXCONN=16384 -I../common -DHAS_TLS conftest.c >&5
configure:6312: $? = 0
configure:6314: result: yes
configure:6353: checking whether gcc supports -Wpointer-arith
configure:6361: gcc -c -g -O2 -pipe -ffast-math -Wall -Wextra -Wno-sign-compare -std=c99 -march=i686 -Wno-unused-parameter -Wno-clobbered -Wempty-body -Winit-self -Werror -Wpointer-arith -DMAXCONN=16384 -I../common -DHAS_TLS conftest.c >&5
configure:6361: $? = 0
configure:6363: result: yes
configure:6402: checking whether gcc supports -Wswitch-bool
configure:6410: gcc -c -g -O2 -pipe -ffast-math -Wall -Wextra -Wno-sign-compare -std=c99 -march=i686 -Wno-unused-parameter -Wno-clobbered -Wempty-body -Winit-self -Wpointer-arith -Werror -Wswitch-bool -DMAXCONN=16384 -I../common -DHAS_TLS conftest.c >&5
cc1: error: unrecognized command line option "-Wswitch-bool"
configure:6410: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL ""
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define __EXTENSIONS__ 1
| #define _ALL_SOURCE 1
| #define _GNU_SOURCE 1
| #define _POSIX_PTHREAD_SEMANTICS 1
| #define _TANDEM_SOURCE 1
| /* end confdefs.h. */
| int foo;
configure:6441: result: no
configure:6451: checking whether gcc supports -Wenum-conversion
configure:6459: gcc -c -g -O2 -pipe -ffast-math -Wall -Wextra -Wno-sign-compare -std=c99 -march=i686 -Wno-unused-parameter -Wno-clobbered -Wempty-body -Winit-self -Wpointer-arith -Werror -Wenum-conversion -DMAXCONN=16384 -I../common -DHAS_TLS conftest.c >&5
cc1: error: unrecognized command line option "-Wenum-conversion"
configure:6459: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL ""
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define __EXTENSIONS__ 1
| #define _ALL_SOURCE 1
| #define _GNU_SOURCE 1
| #define _POSIX_PTHREAD_SEMANTICS 1
| #define _TANDEM_SOURCE 1
| /* end confdefs.h. */
| int foo;
configure:6490: result: no
configure:6500: checking whether gcc supports -Wshorten-64-to-32
configure:6508: gcc -c -g -O2 -pipe -ffast-math -Wall -Wextra -Wno-sign-compare -std=c99 -march=i686 -Wno-unused-parameter -Wno-clobbered -Wempty-body -Winit-self -Wpointer-arith -Werror -Wshorten-64-to-32 -DMAXCONN=16384 -I../common -DHAS_TLS conftest.c >&5
cc1: error: unrecognized command line option "-Wshorten-64-to-32"
configure:6508: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL ""
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define __EXTENSIONS__ 1
| #define _ALL_SOURCE 1
| #define _GNU_SOURCE 1
| #define _POSIX_PTHREAD_SEMANTICS 1
| #define _TANDEM_SOURCE 1
| /* end confdefs.h. */
| int foo;
configure:6539: result: no
configure:6549: checking whether gcc supports -Wconstant-conversion
configure:6557: gcc -c -g -O2 -pipe -ffast-math -Wall -Wextra -Wno-sign-compare -std=c99 -march=i686 -Wno-unused-parameter -Wno-clobbered -Wempty-body -Winit-self -Wpointer-arith -Werror -Wconstant-conversion -DMAXCONN=16384 -I../common -DHAS_TLS conftest.c >&5
cc1: error: unrecognized command line option "-Wconstant-conversion"
configure:6557: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL ""
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define __EXTENSIONS__ 1
| #define _ALL_SOURCE 1
| #define _GNU_SOURCE 1
| #define _POSIX_PTHREAD_SEMANTICS 1
| #define _TANDEM_SOURCE 1
| /* end confdefs.h. */
| int foo;
configure:6588: result: no
configure:6598: checking whether gcc supports -Wbool-conversion
configure:6606: gcc -c -g -O2 -pipe -ffast-math -Wall -Wextra -Wno-sign-compare -std=c99 -march=i686 -Wno-unused-parameter -Wno-clobbered -Wempty-body -Winit-self -Wpointer-arith -Werror -Wbool-conversion -DMAXCONN=16384 -I../common -DHAS_TLS conftest.c >&5
cc1: error: unrecognized command line option "-Wbool-conversion"
configure:6606: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL ""
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define __EXTENSIONS__ 1
| #define _ALL_SOURCE 1
| #define _GNU_SOURCE 1
| #define _POSIX_PTHREAD_SEMANTICS 1
| #define _TANDEM_SOURCE 1
| /* end confdefs.h. */
| int foo;
configure:6637: result: no
configure:6647: checking whether gcc supports -Wformat-security
configure:6655: gcc -c -g -O2 -pipe -ffast-math -Wall -Wextra -Wno-sign-compare -std=c99 -march=i686 -Wno-unused-parameter -Wno-clobbered -Wempty-body -Winit-self -Wpointer-arith -Werror -Wformat-security -DMAXCONN=16384 -I../common -DHAS_TLS conftest.c >&5
configure:6655: $? = 0
configure:6657: result: yes
configure:6696: checking whether gcc supports -Wformat
configure:6704: gcc -c -g -O2 -pipe -ffast-math -Wall -Wextra -Wno-sign-compare -std=c99 -march=i686 -Wno-unused-parameter -Wno-clobbered -Wempty-body -Winit-self -Wpointer-arith -Wformat-security -Werror -Wformat -DMAXCONN=16384 -I../common -DHAS_TLS conftest.c >&5
configure:6704: $? = 0
configure:6706: result: yes
configure:6745: checking whether gcc supports -Wformat-signedness
configure:6753: gcc -c -g -O2 -pipe -ffast-math -Wall -Wextra -Wno-sign-compare -std=c99 -march=i686 -Wno-unused-parameter -Wno-clobbered -Wempty-body -Winit-self -Wpointer-arith -Wformat-security -Wformat -Werror -Wformat-signedness -DMAXCONN=16384 -I../common -DHAS_TLS conftest.c >&5
cc1: error: unrecognized command line option "-Wformat-signedness"
configure:6753: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL ""
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define __EXTENSIONS__ 1
| #define _ALL_SOURCE 1
| #define _GNU_SOURCE 1
| #define _POSIX_PTHREAD_SEMANTICS 1
| #define _TANDEM_SOURCE 1
| /* end confdefs.h. */
| int foo;
configure:6784: result: no
configure:6794: checking whether gcc supports -Wformat-y2k
configure:6802: gcc -c -g -O2 -pipe -ffast-math -Wall -Wextra -Wno-sign-compare -std=c99 -march=i686 -Wno-unused-parameter -Wno-clobbered -Wempty-body -Winit-self -Wpointer-arith -Wformat-security -Wformat -Werror -Wformat-y2k -DMAXCONN=16384 -I../common -DHAS_TLS conftest.c >&5
configure:6802: $? = 0
configure:6804: result: yes
configure:6843: checking whether gcc supports -Wmissing-include-dirs
configure:6851: gcc -c -g -O2 -pipe -ffast-math -Wall -Wextra -Wno-sign-compare -std=c99 -march=i686 -Wno-unused-parameter -Wno-clobbered -Wempty-body -Winit-self -Wpointer-arith -Wformat-security -Wformat -Wformat-y2k -Werror -Wmissing-include-dirs -DMAXCONN=16384 -I../common -DHAS_TLS conftest.c >&5
cc1: error: ../common: No such file or directory
configure:6851: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL ""
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define __EXTENSIONS__ 1
| #define _ALL_SOURCE 1
| #define _GNU_SOURCE 1
| #define _POSIX_PTHREAD_SEMANTICS 1
| #define _TANDEM_SOURCE 1
| /* end confdefs.h. */
| int foo;
configure:6882: result: no
configure:6892: checking whether gcc supports -Wsuggest-attribute=noreturn
configure:6900: gcc -c -g -O2 -pipe -ffast-math -Wall -Wextra -Wno-sign-compare -std=c99 -march=i686 -Wno-unused-parameter -Wno-clobbered -Wempty-body -Winit-self -Wpointer-arith -Wformat-security -Wformat -Wformat-y2k -Werror -Wsuggest-attribute=noreturn -DMAXCONN=16384 -I../common -DHAS_TLS conftest.c >&5
cc1: error: unrecognized command line option "-Wsuggest-attribute=noreturn"
configure:6900: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL ""
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define __EXTENSIONS__ 1
| #define _ALL_SOURCE 1
| #define _GNU_SOURCE 1
| #define _POSIX_PTHREAD_SEMANTICS 1
| #define _TANDEM_SOURCE 1
| /* end confdefs.h. */
| int foo;
configure:6931: result: no
configure:6941: checking whether gcc supports -Wundef
configure:6949: gcc -c -g -O2 -pipe -ffast-math -Wall -Wextra -Wno-sign-compare -std=c99 -march=i686 -Wno-unused-parameter -Wno-clobbered -Wempty-body -Winit-self -Wpointer-arith -Wformat-security -Wformat -Wformat-y2k -Werror -Wundef -DMAXCONN=16384 -I../common -DHAS_TLS conftest.c >&5
configure:6949: $? = 0
configure:6951: result: yes
configure:6992: checking whether gcc supports -Wnested-externs
configure:7000: gcc -c -g -O2 -pipe -ffast-math -Wall -Wextra -Wno-sign-compare -std=c99 -march=i686 -Wno-unused-parameter -Wno-clobbered -Wempty-body -Winit-self -Wpointer-arith -Wformat-security -Wformat -Wformat-y2k -Wundef -Werror -Wnested-externs -DMAXCONN=16384 -I../common -DHAS_TLS conftest.c >&5
configure:7000: $? = 0
configure:7002: result: yes
configure:7041: checking whether gcc supports -Wold-style-definition
configure:7049: gcc -c -g -O2 -pipe -ffast-math -Wall -Wextra -Wno-sign-compare -std=c99 -march=i686 -Wno-unused-parameter -Wno-clobbered -Wempty-body -Winit-self -Wpointer-arith -Wformat-security -Wformat -Wformat-y2k -Wundef -Wnested-externs -Werror -Wold-style-definition -DMAXCONN=16384 -I../common -DHAS_TLS conftest.c >&5
configure:7049: $? = 0
configure:7051: result: yes
configure:7090: checking whether gcc supports -Woverlength-strings
configure:7098: gcc -c -g -O2 -pipe -ffast-math -Wall -Wextra -Wno-sign-compare -std=c99 -march=i686 -Wno-unused-parameter -Wno-clobbered -Wempty-body -Winit-self -Wpointer-arith -Wformat-security -Wformat -Wformat-y2k -Wundef -Wnested-externs -Wold-style-definition -Werror -Woverlength-strings -DMAXCONN=16384 -I../common -DHAS_TLS conftest.c >&5
configure:7098: $? = 0
configure:7100: result: yes
configure:7139: checking whether gcc supports -Wredundant-decls
configure:7147: gcc -c -g -O2 -pipe -ffast-math -Wall -Wextra -Wno-sign-compare -std=c99 -march=i686 -Wno-unused-parameter -Wno-clobbered -Wempty-body -Winit-self -Wpointer-arith -Wformat-security -Wformat -Wformat-y2k -Wundef -Wnested-externs -Wold-style-definition -Woverlength-strings -Werror -Wredundant-decls -DMAXCONN=16384 -I../common -DHAS_TLS conftest.c >&5
configure:7147: $? = 0
configure:7149: result: yes
configure:7188: checking whether gcc supports -Wcast-qual
configure:7196: gcc -c -g -O2 -pipe -ffast-math -Wall -Wextra -Wno-sign-compare -std=c99 -march=i686 -Wno-unused-parameter -Wno-clobbered -Wempty-body -Winit-self -Wpointer-arith -Wformat-security -Wformat -Wformat-y2k -Wundef -Wnested-externs -Wold-style-definition -Woverlength-strings -Wredundant-decls -Werror -Wcast-qual -DMAXCONN=16384 -I../common -DHAS_TLS conftest.c >&5
configure:7196: $? = 0
configure:7198: result: yes
configure:7237: checking whether gcc supports -Wmisleading-indentation
configure:7245: gcc -c -g -O2 -pipe -ffast-math -Wall -Wextra -Wno-sign-compare -std=c99 -march=i686 -Wno-unused-parameter -Wno-clobbered -Wempty-body -Winit-self -Wpointer-arith -Wformat-security -Wformat -Wformat-y2k -Wundef -Wnested-externs -Wold-style-definition -Woverlength-strings -Wredundant-decls -Wcast-qual -Werror -Wmisleading-indentation -DMAXCONN=16384 -I../common -DHAS_TLS conftest.c >&5
cc1: error: unrecognized command line option "-Wmisleading-indentation"
configure:7245: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL ""
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define __EXTENSIONS__ 1
| #define _ALL_SOURCE 1
| #define _GNU_SOURCE 1
| #define _POSIX_PTHREAD_SEMANTICS 1
| #define _TANDEM_SOURCE 1
| /* end confdefs.h. */
| int foo;
configure:7276: result: no
configure:7286: checking whether gcc supports -Wnull-dereference
configure:7294: gcc -c -g -O2 -pipe -ffast-math -Wall -Wextra -Wno-sign-compare -std=c99 -march=i686 -Wno-unused-parameter -Wno-clobbered -Wempty-body -Winit-self -Wpointer-arith -Wformat-security -Wformat -Wformat-y2k -Wundef -Wnested-externs -Wold-style-definition -Woverlength-strings -Wredundant-decls -Wcast-qual -Werror -Wnull-dereference -DMAXCONN=16384 -I../common -DHAS_TLS conftest.c >&5
cc1: error: unrecognized command line option "-Wnull-dereference"
configure:7294: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL ""
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define __EXTENSIONS__ 1
| #define _ALL_SOURCE 1
| #define _GNU_SOURCE 1
| #define _POSIX_PTHREAD_SEMANTICS 1
| #define _TANDEM_SOURCE 1
| /* end confdefs.h. */
| int foo;
configure:7325: result: no
configure:7335: checking whether gcc supports -Wno-format-nonliteral
configure:7343: gcc -c -g -O2 -pipe -ffast-math -Wall -Wextra -Wno-sign-compare -std=c99 -march=i686 -Wno-unused-parameter -Wno-clobbered -Wempty-body -Winit-self -Wpointer-arith -Wformat-security -Wformat -Wformat-y2k -Wundef -Wnested-externs -Wold-style-definition -Woverlength-strings -Wredundant-decls -Wcast-qual -Werror -Wno-format-nonliteral -DMAXCONN=16384 -I../common -DHAS_TLS conftest.c >&5
configure:7343: $? = 0
configure:7353: gcc -c -g -O2 -pipe -ffast-math -Wall -Wextra -Wno-sign-compare -std=c99 -march=i686 -Wno-unused-parameter -Wno-clobbered -Wempty-body -Winit-self -Wpointer-arith -Wformat-security -Wformat -Wformat-y2k -Wundef -Wnested-externs -Wold-style-definition -Woverlength-strings -Wredundant-decls -Wcast-qual -Werror -Wformat-nonliteral -DMAXCONN=16384 -I../common -DHAS_TLS conftest.c >&5
configure:7353: $? = 0
configure:7355: result: yes
configure:7423: checking whether gcc supports -Wno-switch
configure:7431: gcc -c -g -O2 -pipe -ffast-math -Wall -Wextra -Wno-sign-compare -std=c99 -march=i686 -Wno-unused-parameter -Wno-clobbered -Wempty-body -Winit-self -Wpointer-arith -Wformat-security -Wformat -Wformat-y2k -Wundef -Wnested-externs -Wold-style-definition -Woverlength-strings -Wredundant-decls -Wcast-qual -Wno-format-nonliteral -Werror -Wno-switch -DMAXCONN=16384 -I../common -DHAS_TLS conftest.c >&5
configure:7431: $? = 0
configure:7441: gcc -c -g -O2 -pipe -ffast-math -Wall -Wextra -Wno-sign-compare -std=c99 -march=i686 -Wno-unused-parameter -Wno-clobbered -Wempty-body -Winit-self -Wpointer-arith -Wformat-security -Wformat -Wformat-y2k -Wundef -Wnested-externs -Wold-style-definition -Woverlength-strings -Wredundant-decls -Wcast-qual -Wno-format-nonliteral -Werror -Wswitch -DMAXCONN=16384 -I../common -DHAS_TLS conftest.c >&5
configure:7441: $? = 0
configure:7443: result: yes
configure:7511: checking whether gcc supports -Wno-missing-field-initializers
configure:7519: gcc -c -g -O2 -pipe -ffast-math -Wall -Wextra -Wno-sign-compare -std=c99 -march=i686 -Wno-unused-parameter -Wno-clobbered -Wempty-body -Winit-self -Wpointer-arith -Wformat-security -Wformat -Wformat-y2k -Wundef -Wnested-externs -Wold-style-definition -Woverlength-strings -Wredundant-decls -Wcast-qual -Wno-format-nonliteral -Wno-switch -Werror -Wno-missing-field-initializers -DMAXCONN=16384 -I../common -DHAS_TLS conftest.c >&5
configure:7519: $? = 0
configure:7529: gcc -c -g -O2 -pipe -ffast-math -Wall -Wextra -Wno-sign-compare -std=c99 -march=i686 -Wno-unused-parameter -Wno-clobbered -Wempty-body -Winit-self -Wpointer-arith -Wformat-security -Wformat -Wformat-y2k -Wundef -Wnested-externs -Wold-style-definition -Woverlength-strings -Wredundant-decls -Wcast-qual -Wno-format-nonliteral -Wno-switch -Werror -Wmissing-field-initializers -DMAXCONN=16384 -I../common -DHAS_TLS conftest.c >&5
configure:7529: $? = 0
configure:7531: result: yes
configure:7599: checking whether gcc supports -Wno-suggest-attribute=format
configure:7607: gcc -c -g -O2 -pipe -ffast-math -Wall -Wextra -Wno-sign-compare -std=c99 -march=i686 -Wno-unused-parameter -Wno-clobbered -Wempty-body -Winit-self -Wpointer-arith -Wformat-security -Wformat -Wformat-y2k -Wundef -Wnested-externs -Wold-style-definition -Woverlength-strings -Wredundant-decls -Wcast-qual -Wno-format-nonliteral -Wno-switch -Wno-missing-field-initializers -Werror -Wno-suggest-attribute=format -DMAXCONN=16384 -I../common -DHAS_TLS conftest.c >&5
configure:7607: $? = 0
configure:7617: gcc -c -g -O2 -pipe -ffast-math -Wall -Wextra -Wno-sign-compare -std=c99 -march=i686 -Wno-unused-parameter -Wno-clobbered -Wempty-body -Winit-self -Wpointer-arith -Wformat-security -Wformat -Wformat-y2k -Wundef -Wnested-externs -Wold-style-definition -Woverlength-strings -Wredundant-decls -Wcast-qual -Wno-format-nonliteral -Wno-switch -Wno-missing-field-initializers -Werror -Wsuggest-attribute=format -DMAXCONN=16384 -I../common -DHAS_TLS conftest.c >&5
cc1: error: unrecognized command line option "-Wsuggest-attribute=format"
configure:7617: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL ""
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define __EXTENSIONS__ 1
| #define _ALL_SOURCE 1
| #define _GNU_SOURCE 1
| #define _POSIX_PTHREAD_SEMANTICS 1
| #define _TANDEM_SOURCE 1
| /* end confdefs.h. */
| int foo;
configure:7667: result: no
configure:7692: checking whether gcc supports -Wshadow
configure:7700: gcc -c -g -O2 -pipe -ffast-math -Wall -Wextra -Wno-sign-compare -std=c99 -march=i686 -Wno-unused-parameter -Wno-clobbered -Wempty-body -Winit-self -Wpointer-arith -Wformat-security -Wformat -Wformat-y2k -Wundef -Wnested-externs -Wold-style-definition -Woverlength-strings -Wredundant-decls -Wcast-qual -Wno-format-nonliteral -Wno-switch -Wno-missing-field-initializers -Werror -Wshadow -DMAXCONN=16384 -I../common -DHAS_TLS conftest.c >&5
configure:7700: $? = 0
configure:7702: result: yes
configure:7741: checking whether gcc can efficiently use -Wshadow
configure:7757: gcc -c -g -O2 -pipe -ffast-math -Wall -Wextra -Wno-sign-compare -std=c99 -march=i686 -Wno-unused-parameter -Wno-clobbered -Wempty-body -Winit-self -Wpointer-arith -Wformat-security -Wformat -Wformat-y2k -Wundef -Wnested-externs -Wold-style-definition -Woverlength-strings -Wredundant-decls -Wcast-qual -Wno-format-nonliteral -Wno-switch -Wno-missing-field-initializers -Wshadow -Werror -Wshadow -DMAXCONN=16384 -I../common -DHAS_TLS conftest.c >&5
cc1: warnings being treated as errors
conftest.c: In function 'bar':
conftest.c:29: error: declaration of 'foo' shadows a global declaration
conftest.c:25: error: shadowed declaration is here
configure:7757: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL ""
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define __EXTENSIONS__ 1
| #define _ALL_SOURCE 1
| #define _GNU_SOURCE 1
| #define _POSIX_PTHREAD_SEMANTICS 1
| #define _TANDEM_SOURCE 1
| /* end confdefs.h. */
|
| int foo(void) {
| return 0;
| }
| int bar(void) {
| int foo = 0;
| return foo + 1;
| }
|
configure:7765: result: no
configure:7774: checking whether gcc supports -fPIC
configure:7782: gcc -c -g -O2 -pipe -ffast-math -Wall -Wextra -Wno-sign-compare -std=c99 -march=i686 -Wno-unused-parameter -Wno-clobbered -Wempty-body -Winit-self -Wpointer-arith -Wformat-security -Wformat -Wformat-y2k -Wundef -Wnested-externs -Wold-style-definition -Woverlength-strings -Wredundant-decls -Wcast-qual -Wno-format-nonliteral -Wno-switch -Wno-missing-field-initializers -fPIC -DMAXCONN=16384 -I../common -DHAS_TLS conftest.c >&5
configure:7782: $? = 0
configure:7784: result: yes
configure:7801: checking how to make shared objects
configure:7820: gcc -o conftest -g -O2 -pipe -ffast-math -Wall -Wextra -Wno-sign-compare -std=c99 -march=i686 -Wno-unused-parameter -Wno-clobbered -Wempty-body -Winit-self -Wpointer-arith -Wformat-security -Wformat -Wformat-y2k -Wundef -Wnested-externs -Wold-style-definition -Woverlength-strings -Wredundant-decls -Wcast-qual -Wno-format-nonliteral -Wno-switch -Wno-missing-field-initializers -fPIC -shared -DMAXCONN=16384 -I../common -DHAS_TLS -march=i686 -rdynamic conftest.c >&5
configure:7820: $? = 0
configure:7842: gcc -o conftest -g -O2 -pipe -ffast-math -Wall -Wextra -Wno-sign-compare -std=c99 -march=i686 -Wno-unused-parameter -Wno-clobbered -Wempty-body -Winit-self -Wpointer-arith -Wformat-security -Wformat -Wformat-y2k -Wundef -Wnested-externs -Wold-style-definition -Woverlength-strings -Wredundant-decls -Wcast-qual -Wno-format-nonliteral -Wno-switch -Wno-missing-field-initializers -fPIC -nostart -DMAXCONN=16384 -I../common -DHAS_TLS -march=i686 -rdynamic conftest.c >&5
gcc: unrecognized option '-nostart'
/usr/lib/gcc/i686-redhat-linux/4.4.7/../../../crt1.o: In function `_start':
(.text+0x18): undefined reference to `main'
collect2: ld returned 1 exit status
configure:7842: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL ""
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define __EXTENSIONS__ 1
| #define _ALL_SOURCE 1
| #define _GNU_SOURCE 1
| #define _POSIX_PTHREAD_SEMANTICS 1
| #define _TANDEM_SOURCE 1
| /* end confdefs.h. */
|
| int bar = 0;
|
| int foo(void)
| {
| return bar;
| }
|
configure:7859: result: -shared yes
configure:7868: checking whether gcc needs -Wl,--no-undefined to check for undefined references in shared objects
configure:7880: gcc -o conftest -fPIC -shared -DMAXCONN=16384 -I../common -DHAS_TLS -march=i686 -rdynamic conftest.c >&5
configure:7880: $? = 0
configure:7893: gcc -o conftest -fPIC -shared -Wl,--no-undefined -DMAXCONN=16384 -I../common -DHAS_TLS -march=i686 -rdynamic conftest.c >&5
configure:7893: $? = 0
configure:7895: result: yes
configure:7928: checking whether gcc supports -fno-strict-aliasing
configure:7936: gcc -c -g -O2 -pipe -ffast-math -Wall -Wextra -Wno-sign-compare -std=c99 -march=i686 -Wno-unused-parameter -Wno-clobbered -Wempty-body -Winit-self -Wpointer-arith -Wformat-security -Wformat -Wformat-y2k -Wundef -Wnested-externs -Wold-style-definition -Woverlength-strings -Wredundant-decls -Wcast-qual -Wno-format-nonliteral -Wno-switch -Wno-missing-field-initializers -fno-strict-aliasing -DMAXCONN=16384 -I../common -DHAS_TLS conftest.c >&5
configure:7936: $? = 0
configure:7937: result: yes
configure:7958: checking for setrlimit
configure:7958: gcc -o conftest -g -O2 -pipe -ffast-math -Wall -Wextra -Wno-sign-compare -std=c99 -march=i686 -Wno-unused-parameter -Wno-clobbered -Wempty-body -Winit-self -Wpointer-arith -Wformat-security -Wformat -Wformat-y2k -Wundef -Wnested-externs -Wold-style-definition -Woverlength-strings -Wredundant-decls -Wcast-qual -Wno-format-nonliteral -Wno-switch -Wno-missing-field-initializers -fno-strict-aliasing -DMAXCONN=16384 -I../common -DHAS_TLS -march=i686 -rdynamic conftest.c >&5
conftest.c: In function 'main':
conftest.c:56: warning: old-style function definition
configure:7958: $? = 0
configure:7958: result: yes
configure:7968: checking for strnlen
configure:7968: gcc -o conftest -g -O2 -pipe -ffast-math -Wall -Wextra -Wno-sign-compare -std=c99 -march=i686 -Wno-unused-parameter -Wno-clobbered -Wempty-body -Winit-self -Wpointer-arith -Wformat-security -Wformat -Wformat-y2k -Wundef -Wnested-externs -Wold-style-definition -Woverlength-strings -Wredundant-decls -Wcast-qual -Wno-format-nonliteral -Wno-switch -Wno-missing-field-initializers -fno-strict-aliasing -DMAXCONN=16384 -I../common -DHAS_TLS -DHAVE_SETRLIMIT -march=i686 -rdynamic conftest.c >&5
conftest.c: In function 'main':
conftest.c:56: warning: old-style function definition
configure:7968: $? = 0
configure:7968: result: yes
configure:7977: checking for uselocale
configure:7977: gcc -o conftest -g -O2 -pipe -ffast-math -Wall -Wextra -Wno-sign-compare -std=c99 -march=i686 -Wno-unused-parameter -Wno-clobbered -Wempty-body -Winit-self -Wpointer-arith -Wformat-security -Wformat -Wformat-y2k -Wundef -Wnested-externs -Wold-style-definition -Woverlength-strings -Wredundant-decls -Wcast-qual -Wno-format-nonliteral -Wno-switch -Wno-missing-field-initializers -fno-strict-aliasing -DMAXCONN=16384 -I../common -DHAS_TLS -DHAVE_SETRLIMIT -DHAVE_STRNLEN -march=i686 -rdynamic conftest.c >&5
conftest.c: In function 'main':
conftest.c:56: warning: old-style function definition
configure:7977: $? = 0
configure:7977: result: yes
configure:7988: checking for newlocale
configure:7988: gcc -o conftest -g -O2 -pipe -ffast-math -Wall -Wextra -Wno-sign-compare -std=c99 -march=i686 -Wno-unused-parameter -Wno-clobbered -Wempty-body -Winit-self -Wpointer-arith -Wformat-security -Wformat -Wformat-y2k -Wundef -Wnested-externs -Wold-style-definition -Woverlength-strings -Wredundant-decls -Wcast-qual -Wno-format-nonliteral -Wno-switch -Wno-missing-field-initializers -fno-strict-aliasing -DMAXCONN=16384 -I../common -DHAS_TLS -DHAVE_SETRLIMIT -DHAVE_STRNLEN -march=i686 -rdynamic conftest.c >&5
conftest.c: In function 'main':
conftest.c:57: warning: old-style function definition
configure:7988: $? = 0
configure:7988: result: yes
configure:7999: checking for freelocale
configure:7999: gcc -o conftest -g -O2 -pipe -ffast-math -Wall -Wextra -Wno-sign-compare -std=c99 -march=i686 -Wno-unused-parameter -Wno-clobbered -Wempty-body -Winit-self -Wpointer-arith -Wformat-security -Wformat -Wformat-y2k -Wundef -Wnested-externs -Wold-style-definition -Woverlength-strings -Wredundant-decls -Wcast-qual -Wno-format-nonliteral -Wno-switch -Wno-missing-field-initializers -fno-strict-aliasing -DMAXCONN=16384 -I../common -DHAS_TLS -DHAVE_SETRLIMIT -DHAVE_STRNLEN -march=i686 -rdynamic conftest.c >&5
conftest.c: In function 'main':
conftest.c:58: warning: old-style function definition
configure:7999: $? = 0
configure:7999: result: yes
configure:8010: checking xlocale.h usability
configure:8010: gcc -c -g -O2 -pipe -ffast-math -Wall -Wextra -Wno-sign-compare -std=c99 -march=i686 -Wno-unused-parameter -Wno-clobbered -Wempty-body -Winit-self -Wpointer-arith -Wformat-security -Wformat -Wformat-y2k -Wundef -Wnested-externs -Wold-style-definition -Woverlength-strings -Wredundant-decls -Wcast-qual -Wno-format-nonliteral -Wno-switch -Wno-missing-field-initializers -fno-strict-aliasing -DMAXCONN=16384 -I../common -DHAS_TLS -DHAVE_SETRLIMIT -DHAVE_STRNLEN conftest.c >&5
configure:8010: $? = 0
configure:8010: result: yes
configure:8010: checking xlocale.h presence
configure:8010: gcc -E -DMAXCONN=16384 -I../common -DHAS_TLS -DHAVE_SETRLIMIT -DHAVE_STRNLEN conftest.c
configure:8010: $? = 0
configure:8010: result: yes
configure:8010: checking for xlocale.h
configure:8010: result: yes
configure:8169: checking host OS
configure:8172: result: Linux
configure:8200: checking for MinGW
configure:8211: result: no
configure:8220: checking for library containing inflateEnd
configure:8251: gcc -o conftest -g -O2 -pipe -ffast-math -Wall -Wextra -Wno-sign-compare -std=c99 -march=i686 -Wno-unused-parameter -Wno-clobbered -Wempty-body -Winit-self -Wpointer-arith -Wformat-security -Wformat -Wformat-y2k -Wundef -Wnested-externs -Wold-style-definition -Woverlength-strings -Wredundant-decls -Wcast-qual -Wno-format-nonliteral -Wno-switch -Wno-missing-field-initializers -fno-strict-aliasing -g -DMAXCONN=16384 -I../common -DHAS_TLS -DHAVE_SETRLIMIT -DHAVE_STRNLEN -DDEBUG -march=i686 -rdynamic conftest.c -ldl >&5
conftest.c: In function 'main':
conftest.c:37: warning: old-style function definition
/tmp/ccw8qu8x.o: In function `main':
/home/emulador/conftest.c:39: undefined reference to `inflateEnd'
collect2: ld returned 1 exit status
configure:8251: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL ""
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define __EXTENSIONS__ 1
| #define _ALL_SOURCE 1
| #define _GNU_SOURCE 1
| #define _POSIX_PTHREAD_SEMANTICS 1
| #define _TANDEM_SOURCE 1
| #define HAVE_USELOCALE 1
| #define HAVE_NEWLOCALE 1
| #define HAVE_FREELOCALE 1
| #define HAVE_XLOCALE_H 1
| /* end confdefs.h. */
|
| /* Override any GCC internal prototype to avoid an error.
| Use char because int might match the return type of a GCC
| builtin and then its argument prototype would still apply. */
| #ifdef __cplusplus
| extern "C"
| #endif
| char inflateEnd ();
| int
| main ()
| {
| return inflateEnd ();
| ;
| return 0;
| }
configure:8251: gcc -o conftest -g -O2 -pipe -ffast-math -Wall -Wextra -Wno-sign-compare -std=c99 -march=i686 -Wno-unused-parameter -Wno-clobbered -Wempty-body -Winit-self -Wpointer-arith -Wformat-security -Wformat -Wformat-y2k -Wundef -Wnested-externs -Wold-style-definition -Woverlength-strings -Wredundant-decls -Wcast-qual -Wno-format-nonliteral -Wno-switch -Wno-missing-field-initializers -fno-strict-aliasing -g -DMAXCONN=16384 -I../common -DHAS_TLS -DHAVE_SETRLIMIT -DHAVE_STRNLEN -DDEBUG -march=i686 -rdynamic conftest.c -lz -ldl >&5
conftest.c: In function 'main':
conftest.c:37: warning: old-style function definition
configure:8251: $? = 0
configure:8268: result: -lz
configure:8278: checking zlib.h usability
configure:8278: gcc -c -g -O2 -pipe -ffast-math -Wall -Wextra -Wno-sign-compare -std=c99 -march=i686 -Wno-unused-parameter -Wno-clobbered -Wempty-body -Winit-self -Wpointer-arith -Wformat-security -Wformat -Wformat-y2k -Wundef -Wnested-externs -Wold-style-definition -Woverlength-strings -Wredundant-decls -Wcast-qual -Wno-format-nonliteral -Wno-switch -Wno-missing-field-initializers -fno-strict-aliasing -g -DMAXCONN=16384 -I../common -DHAS_TLS -DHAVE_SETRLIMIT -DHAVE_STRNLEN -DDEBUG conftest.c >&5
configure:8278: $? = 0
configure:8278: result: yes
configure:8278: checking zlib.h presence
configure:8278: gcc -E -DMAXCONN=16384 -I../common -DHAS_TLS -DHAVE_SETRLIMIT -DHAVE_STRNLEN -DDEBUG conftest.c
configure:8278: $? = 0
configure:8278: result: yes
configure:8278: checking for zlib.h
configure:8278: result: yes
configure:8291: checking for library containing sqrt
configure:8322: gcc -o conftest -g -O2 -pipe -ffast-math -Wall -Wextra -Wno-sign-compare -std=c99 -march=i686 -Wno-unused-parameter -Wno-clobbered -Wempty-body -Winit-self -Wpointer-arith -Wformat-security -Wformat -Wformat-y2k -Wundef -Wnested-externs -Wold-style-definition -Woverlength-strings -Wredundant-decls -Wcast-qual -Wno-format-nonliteral -Wno-switch -Wno-missing-field-initializers -fno-strict-aliasing -g -DMAXCONN=16384 -I../common -DHAS_TLS -DHAVE_SETRLIMIT -DHAVE_STRNLEN -DDEBUG -march=i686 -rdynamic conftest.c -lz -ldl >&5
conftest.c:35: warning: conflicting types for built-in function 'sqrt'
conftest.c: In function 'main':
conftest.c:37: warning: old-style function definition
/tmp/ccXkRbtG.o: In function `main':
/home/emulador/conftest.c:39: undefined reference to `sqrt'
collect2: ld returned 1 exit status
configure:8322: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL ""
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define __EXTENSIONS__ 1
| #define _ALL_SOURCE 1
| #define _GNU_SOURCE 1
| #define _POSIX_PTHREAD_SEMANTICS 1
| #define _TANDEM_SOURCE 1
| #define HAVE_USELOCALE 1
| #define HAVE_NEWLOCALE 1
| #define HAVE_FREELOCALE 1
| #define HAVE_XLOCALE_H 1
| /* end confdefs.h. */
|
| /* Override any GCC internal prototype to avoid an error.
| Use char because int might match the return type of a GCC
| builtin and then its argument prototype would still apply. */
| #ifdef __cplusplus
| extern "C"
| #endif
| char sqrt ();
| int
| main ()
| {
| return sqrt ();
| ;
| return 0;
| }
configure:8322: gcc -o conftest -g -O2 -pipe -ffast-math -Wall -Wextra -Wno-sign-compare -std=c99 -march=i686 -Wno-unused-parameter -Wno-clobbered -Wempty-body -Winit-self -Wpointer-arith -Wformat-security -Wformat -Wformat-y2k -Wundef -Wnested-externs -Wold-style-definition -Woverlength-strings -Wredundant-decls -Wcast-qual -Wno-format-nonliteral -Wno-switch -Wno-missing-field-initializers -fno-strict-aliasing -g -DMAXCONN=16384 -I../common -DHAS_TLS -DHAVE_SETRLIMIT -DHAVE_STRNLEN -DDEBUG -march=i686 -rdynamic conftest.c -lm -lz -ldl >&5
conftest.c:35: warning: conflicting types for built-in function 'sqrt'
conftest.c: In function 'main':
conftest.c:37: warning: old-style function definition
configure:8322: $? = 0
configure:8339: result: -lm
configure:8354: checking for library containing clock_gettime
configure:8385: gcc -o conftest -g -O2 -pipe -ffast-math -Wall -Wextra -Wno-sign-compare -std=c99 -march=i686 -Wno-unused-parameter -Wno-clobbered -Wempty-body -Winit-self -Wpointer-arith -Wformat-security -Wformat -Wformat-y2k -Wundef -Wnested-externs -Wold-style-definition -Woverlength-strings -Wredundant-decls -Wcast-qual -Wno-format-nonliteral -Wno-switch -Wno-missing-field-initializers -fno-strict-aliasing -g -DMAXCONN=16384 -I../common -DHAS_TLS -DHAVE_SETRLIMIT -DHAVE_STRNLEN -DDEBUG -march=i686 -rdynamic conftest.c -lm -lz -ldl >&5
conftest.c: In function 'main':
conftest.c:37: warning: old-style function definition
/tmp/ccXoktwO.o: In function `main':
/home/emulador/conftest.c:39: undefined reference to `clock_gettime'
collect2: ld returned 1 exit status
configure:8385: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL ""
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define __EXTENSIONS__ 1
| #define _ALL_SOURCE 1
| #define _GNU_SOURCE 1
| #define _POSIX_PTHREAD_SEMANTICS 1
| #define _TANDEM_SOURCE 1
| #define HAVE_USELOCALE 1
| #define HAVE_NEWLOCALE 1
| #define HAVE_FREELOCALE 1
| #define HAVE_XLOCALE_H 1
| /* end confdefs.h. */
|
| /* Override any GCC internal prototype to avoid an error.
| Use char because int might match the return type of a GCC
| builtin and then its argument prototype would still apply. */
| #ifdef __cplusplus
| extern "C"
| #endif
| char clock_gettime ();
| int
| main ()
| {
| return clock_gettime ();
| ;
| return 0;
| }
configure:8385: gcc -o conftest -g -O2 -pipe -ffast-math -Wall -Wextra -Wno-sign-compare -std=c99 -march=i686 -Wno-unused-parameter -Wno-clobbered -Wempty-body -Winit-self -Wpointer-arith -Wformat-security -Wformat -Wformat-y2k -Wundef -Wnested-externs -Wold-style-definition -Woverlength-strings -Wredundant-decls -Wcast-qual -Wno-format-nonliteral -Wno-switch -Wno-missing-field-initializers -fno-strict-aliasing -g -DMAXCONN=16384 -I../common -DHAS_TLS -DHAVE_SETRLIMIT -DHAVE_STRNLEN -DDEBUG -march=i686 -rdynamic conftest.c -lrt -lm -lz -ldl >&5
conftest.c: In function 'main':
conftest.c:37: warning: old-style function definition
configure:8385: $? = 0
configure:8402: result: -lrt
configure:8421: checking whether CLOCK_MONOTONIC is supported and works
configure:8444: gcc -o conftest -g -O2 -pipe -ffast-math -Wall -Wextra -Wno-sign-compare -std=c99 -march=i686 -Wno-unused-parameter -Wno-clobbered -Wempty-body -Winit-self -Wpointer-arith -Wformat-security -Wformat -Wformat-y2k -Wundef -Wnested-externs -Wold-style-definition -Woverlength-strings -Wredundant-decls -Wcast-qual -Wno-format-nonliteral -Wno-switch -Wno-missing-field-initializers -fno-strict-aliasing -g -DMAXCONN=16384 -I../common -DHAS_TLS -DHAVE_SETRLIMIT -DHAVE_STRNLEN -DDEBUG -march=i686 -rdynamic conftest.c -lrt -lm -lz -ldl >&5
configure:8444: $? = 0
configure:8444: ./conftest
configure:8444: $? = 0
configure:8446: result: yes
configure:8468: checking for library containing pthread_create
configure:8499: gcc -o conftest -g -O2 -pipe -ffast-math -Wall -Wextra -Wno-sign-compare -std=c99 -march=i686 -Wno-unused-parameter -Wno-clobbered -Wempty-body -Winit-self -Wpointer-arith -Wformat-security -Wformat -Wformat-y2k -Wundef -Wnested-externs -Wold-style-definition -Woverlength-strings -Wredundant-decls -Wcast-qual -Wno-format-nonliteral -Wno-switch -Wno-missing-field-initializers -fno-strict-aliasing -g -DMAXCONN=16384 -I../common -DHAS_TLS -DHAVE_SETRLIMIT -DHAVE_STRNLEN -DDEBUG -DHAVE_MONOTONIC_CLOCK -march=i686 -rdynamic conftest.c -lrt -lm -lz -ldl >&5
conftest.c: In function 'main':
conftest.c:37: warning: old-style function definition
configure:8499: $? = 0
configure:8516: result: none required
configure:8526: checking for library containing pthread_sigmask
configure:8557: gcc -o conftest -g -O2 -pipe -ffast-math -Wall -Wextra -Wno-sign-compare -std=c99 -march=i686 -Wno-unused-parameter -Wno-clobbered -Wempty-body -Winit-self -Wpointer-arith -Wformat-security -Wformat -Wformat-y2k -Wundef -Wnested-externs -Wold-style-definition -Woverlength-strings -Wredundant-decls -Wcast-qual -Wno-format-nonliteral -Wno-switch -Wno-missing-field-initializers -fno-strict-aliasing -g -DMAXCONN=16384 -I../common -DHAS_TLS -DHAVE_SETRLIMIT -DHAVE_STRNLEN -DDEBUG -DHAVE_MONOTONIC_CLOCK -march=i686 -rdynamic conftest.c -lrt -lm -lz -ldl >&5
conftest.c: In function 'main':
conftest.c:37: warning: old-style function definition
configure:8557: $? = 0
configure:8574: result: none required
configure:8584: checking for library containing pthread_attr_init
configure:8615: gcc -o conftest -g -O2 -pipe -ffast-math -Wall -Wextra -Wno-sign-compare -std=c99 -march=i686 -Wno-unused-parameter -Wno-clobbered -Wempty-body -Winit-self -Wpointer-arith -Wformat-security -Wformat -Wformat-y2k -Wundef -Wnested-externs -Wold-style-definition -Woverlength-strings -Wredundant-decls -Wcast-qual -Wno-format-nonliteral -Wno-switch -Wno-missing-field-initializers -fno-strict-aliasing -g -DMAXCONN=16384 -I../common -DHAS_TLS -DHAVE_SETRLIMIT -DHAVE_STRNLEN -DDEBUG -DHAVE_MONOTONIC_CLOCK -march=i686 -rdynamic conftest.c -lrt -lm -lz -ldl >&5
conftest.c: In function 'main':
conftest.c:37: warning: old-style function definition
configure:8615: $? = 0
configure:8632: result: none required
configure:8642: checking for library containing pthread_attr_setstacksize
configure:8673: gcc -o conftest -g -O2 -pipe -ffast-math -Wall -Wextra -Wno-sign-compare -std=c99 -march=i686 -Wno-unused-parameter -Wno-clobbered -Wempty-body -Winit-self -Wpointer-arith -Wformat-security -Wformat -Wformat-y2k -Wundef -Wnested-externs -Wold-style-definition -Woverlength-strings -Wredundant-decls -Wcast-qual -Wno-format-nonliteral -Wno-switch -Wno-missing-field-initializers -fno-strict-aliasing -g -DMAXCONN=16384 -I../common -DHAS_TLS -DHAVE_SETRLIMIT -DHAVE_STRNLEN -DDEBUG -DHAVE_MONOTONIC_CLOCK -march=i686 -rdynamic conftest.c -lrt -lm -lz -ldl >&5
conftest.c: In function 'main':
conftest.c:37: warning: old-style function definition
configure:8673: $? = 0
configure:8690: result: none required
configure:8700: checking for library containing pthread_attr_destroy
configure:8731: gcc -o conftest -g -O2 -pipe -ffast-math -Wall -Wextra -Wno-sign-compare -std=c99 -march=i686 -Wno-unused-parameter -Wno-clobbered -Wempty-body -Winit-self -Wpointer-arith -Wformat-security -Wformat -Wformat-y2k -Wundef -Wnested-externs -Wold-style-definition -Woverlength-strings -Wredundant-decls -Wcast-qual -Wno-format-nonliteral -Wno-switch -Wno-missing-field-initializers -fno-strict-aliasing -g -DMAXCONN=16384 -I../common -DHAS_TLS -DHAVE_SETRLIMIT -DHAVE_STRNLEN -DDEBUG -DHAVE_MONOTONIC_CLOCK -march=i686 -rdynamic conftest.c -lrt -lm -lz -ldl >&5
conftest.c: In function 'main':
conftest.c:37: warning: old-style function definition
configure:8731: $? = 0
configure:8748: result: none required
configure:8758: checking for library containing pthread_cancel
configure:8789: gcc -o conftest -g -O2 -pipe -ffast-math -Wall -Wextra -Wno-sign-compare -std=c99 -march=i686 -Wno-unused-parameter -Wno-clobbered -Wempty-body -Winit-self -Wpointer-arith -Wformat-security -Wformat -Wformat-y2k -Wundef -Wnested-externs -Wold-style-definition -Woverlength-strings -Wredundant-decls -Wcast-qual -Wno-format-nonliteral -Wno-switch -Wno-missing-field-initializers -fno-strict-aliasing -g -DMAXCONN=16384 -I../common -DHAS_TLS -DHAVE_SETRLIMIT -DHAVE_STRNLEN -DDEBUG -DHAVE_MONOTONIC_CLOCK -march=i686 -rdynamic conftest.c -lrt -lm -lz -ldl >&5
conftest.c: In function 'main':
conftest.c:37: warning: old-style function definition
configure:8789: $? = 0
configure:8806: result: none required
configure:8816: checking for library containing pthread_join
configure:8847: gcc -o conftest -g -O2 -pipe -ffast-math -Wall -Wextra -Wno-sign-compare -std=c99 -march=i686 -Wno-unused-parameter -Wno-clobbered -Wempty-body -Winit-self -Wpointer-arith -Wformat-security -Wformat -Wformat-y2k -Wundef -Wnested-externs -Wold-style-definition -Woverlength-strings -Wredundant-decls -Wcast-qual -Wno-format-nonliteral -Wno-switch -Wno-missing-field-initializers -fno-strict-aliasing -g -DMAXCONN=16384 -I../common -DHAS_TLS -DHAVE_SETRLIMIT -DHAVE_STRNLEN -DDEBUG -DHAVE_MONOTONIC_CLOCK -march=i686 -rdynamic conftest.c -lrt -lm -lz -ldl >&5
conftest.c: In function 'main':
conftest.c:37: warning: old-style function definition
configure:8847: $? = 0
configure:8864: result: none required
configure:8878: checking execinfo.h usability
configure:8878: gcc -c -g -O2 -pipe -ffast-math -Wall -Wextra -Wno-sign-compare -std=c99 -march=i686 -Wno-unused-parameter -Wno-clobbered -Wempty-body -Winit-self -Wpointer-arith -Wformat-security -Wformat -Wformat-y2k -Wundef -Wnested-externs -Wold-style-definition -Woverlength-strings -Wredundant-decls -Wcast-qual -Wno-format-nonliteral -Wno-switch -Wno-missing-field-initializers -fno-strict-aliasing -g -DMAXCONN=16384 -I../common -DHAS_TLS -DHAVE_SETRLIMIT -DHAVE_STRNLEN -DDEBUG -DHAVE_MONOTONIC_CLOCK conftest.c >&5
configure:8878: $? = 0
configure:8878: result: yes
configure:8878: checking execinfo.h presence
configure:8878: gcc -E -DMAXCONN=16384 -I../common -DHAS_TLS -DHAVE_SETRLIMIT -DHAVE_STRNLEN -DDEBUG -DHAVE_MONOTONIC_CLOCK conftest.c
configure:8878: $? = 0
configure:8878: result: yes
configure:8878: checking for execinfo.h
configure:8878: result: yes
configure:8884: checking for library containing backtrace
configure:8915: gcc -o conftest -g -O2 -pipe -ffast-math -Wall -Wextra -Wno-sign-compare -std=c99 -march=i686 -Wno-unused-parameter -Wno-clobbered -Wempty-body -Winit-self -Wpointer-arith -Wformat-security -Wformat -Wformat-y2k -Wundef -Wnested-externs -Wold-style-definition -Woverlength-strings -Wredundant-decls -Wcast-qual -Wno-format-nonliteral -Wno-switch -Wno-missing-field-initializers -fno-strict-aliasing -g -DMAXCONN=16384 -I../common -DHAS_TLS -DHAVE_SETRLIMIT -DHAVE_STRNLEN -DDEBUG -DHAVE_MONOTONIC_CLOCK -march=i686 -rdynamic conftest.c -lrt -lm -lz -ldl >&5
conftest.c: In function 'main':
conftest.c:38: warning: old-style function definition
configure:8915: $? = 0
configure:8932: result: none required
configure:8955: checking for mysql_config
configure:8973: found /usr/bin/mysql_config
configure:8986: result: /usr/bin/mysql_config
configure:9010: checking for mysql_init
configure:9010: gcc -o conftest -g -O2 -pipe -ffast-math -Wall -Wextra -Wno-sign-compare -std=c99 -march=i686 -Wno-unused-parameter -Wno-clobbered -Wempty-body -Winit-self -Wpointer-arith -Wformat-security -Wformat -Wformat-y2k -Wundef -Wnested-externs -Wold-style-definition -Woverlength-strings -Wredundant-decls -Wcast-qual -Wno-format-nonliteral -Wno-switch -Wno-missing-field-initializers -fno-strict-aliasing -g -DHAVE_EXECINFO -DMAXCONN=16384 -I../common -DHAS_TLS -DHAVE_SETRLIMIT -DHAVE_STRNLEN -DDEBUG -DHAVE_MONOTONIC_CLOCK -I/usr/include/mysql -march=i686 -rdynamic conftest.c -lrt -lm -lz -ldl -rdynamic -L/usr/lib/mysql -lmysqlclient -lz -lcrypt -lnsl -lm -lssl -lcrypto >&5
conftest.c: In function 'main':
conftest.c:61: warning: old-style function definition
configure:9010: $? = 0
configure:9010: result: yes
configure:9015: checking mysql.h usability
configure:9015: gcc -c -g -O2 -pipe -ffast-math -Wall -Wextra -Wno-sign-compare -std=c99 -march=i686 -Wno-unused-parameter -Wno-clobbered -Wempty-body -Winit-self -Wpointer-arith -Wformat-security -Wformat -Wformat-y2k -Wundef -Wnested-externs -Wold-style-definition -Woverlength-strings -Wredundant-decls -Wcast-qual -Wno-format-nonliteral -Wno-switch -Wno-missing-field-initializers -fno-strict-aliasing -g -DHAVE_EXECINFO -DMAXCONN=16384 -I../common -DHAS_TLS -DHAVE_SETRLIMIT -DHAVE_STRNLEN -DDEBUG -DHAVE_MONOTONIC_CLOCK -I/usr/include/mysql conftest.c >&5
configure:9015: $? = 0
configure:9015: result: yes
configure:9015: checking mysql.h presence
configure:9015: gcc -E -DMAXCONN=16384 -I../common -DHAS_TLS -DHAVE_SETRLIMIT -DHAVE_STRNLEN -DDEBUG -DHAVE_MONOTONIC_CLOCK -I/usr/include/mysql conftest.c
configure:9015: $? = 0
configure:9015: result: yes
configure:9015: checking for mysql.h
configure:9015: result: yes
configure:9026: checking MySQL library (required)
configure:9029: result: yes (5.1.73)
configure:9047: checking PCRE library
configure:9049: checking pcre.h usability
configure:9049: gcc -c -g -O2 -pipe -ffast-math -Wall -Wextra -Wno-sign-compare -std=c99 -march=i686 -Wno-unused-parameter -Wno-clobbered -Wempty-body -Winit-self -Wpointer-arith -Wformat-security -Wformat -Wformat-y2k -Wundef -Wnested-externs -Wold-style-definition -Woverlength-strings -Wredundant-decls -Wcast-qual -Wno-format-nonliteral -Wno-switch -Wno-missing-field-initializers -fno-strict-aliasing -g -DHAVE_EXECINFO -DMAXCONN=16384 -I../common -DHAS_TLS -DHAVE_SETRLIMIT -DHAVE_STRNLEN -DDEBUG -DHAVE_MONOTONIC_CLOCK conftest.c >&5
configure:9049: $? = 0
configure:9049: result: yes
configure:9049: checking pcre.h presence
configure:9049: gcc -E -DMAXCONN=16384 -I../common -DHAS_TLS -DHAVE_SETRLIMIT -DHAVE_STRNLEN -DDEBUG -DHAVE_MONOTONIC_CLOCK conftest.c
configure:9049: $? = 0
configure:9049: result: yes
configure:9049: checking for pcre.h
configure:9049: result: yes
configure:9057: checking for library containing pcre_study
configure:9088: gcc -o conftest -g -O2 -pipe -ffast-math -Wall -Wextra -Wno-sign-compare -std=c99 -march=i686 -Wno-unused-parameter -Wno-clobbered -Wempty-body -Winit-self -Wpointer-arith -Wformat-security -Wformat -Wformat-y2k -Wundef -Wnested-externs -Wold-style-definition -Woverlength-strings -Wredundant-decls -Wcast-qual -Wno-format-nonliteral -Wno-switch -Wno-missing-field-initializers -fno-strict-aliasing -g -DHAVE_EXECINFO -DMAXCONN=16384 -I../common -DHAS_TLS -DHAVE_SETRLIMIT -DHAVE_STRNLEN -DDEBUG -DHAVE_MONOTONIC_CLOCK -march=i686 -rdynamic conftest.c -lrt -lm -lz -ldl >&5
conftest.c: In function 'main':
conftest.c:38: warning: old-style function definition
/tmp/cciUdAWS.o: In function `main':
/home/emulador/conftest.c:40: undefined reference to `pcre_study'
collect2: ld returned 1 exit status
configure:9088: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL ""
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define __EXTENSIONS__ 1
| #define _ALL_SOURCE 1
| #define _GNU_SOURCE 1
| #define _POSIX_PTHREAD_SEMANTICS 1
| #define _TANDEM_SOURCE 1
| #define HAVE_USELOCALE 1
| #define HAVE_NEWLOCALE 1
| #define HAVE_FREELOCALE 1
| #define HAVE_XLOCALE_H 1
| #define HAVE_EXECINFO_H 1
| /* end confdefs.h. */
|
| /* Override any GCC internal prototype to avoid an error.
| Use char because int might match the return type of a GCC
| builtin and then its argument prototype would still apply. */
| #ifdef __cplusplus
| extern "C"
| #endif
| char pcre_study ();
| int
| main ()
| {
| return pcre_study ();
| ;
| return 0;
| }
configure:9088: gcc -o conftest -g -O2 -pipe -ffast-math -Wall -Wextra -Wno-sign-compare -std=c99 -march=i686 -Wno-unused-parameter -Wno-clobbered -Wempty-body -Winit-self -Wpointer-arith -Wformat-security -Wformat -Wformat-y2k -Wundef -Wnested-externs -Wold-style-definition -Woverlength-strings -Wredundant-decls -Wcast-qual -Wno-format-nonliteral -Wno-switch -Wno-missing-field-initializers -fno-strict-aliasing -g -DHAVE_EXECINFO -DMAXCONN=16384 -I../common -DHAS_TLS -DHAVE_SETRLIMIT -DHAVE_STRNLEN -DDEBUG -DHAVE_MONOTONIC_CLOCK -march=i686 -rdynamic conftest.c -lpcre -lrt -lm -lz -ldl >&5
conftest.c: In function 'main':
conftest.c:38: warning: old-style function definition
configure:9088: $? = 0
configure:9105: result: -lpcre
configure:9266: checking for doxygen
configure:9282: found /usr/bin/doxygen
configure:9294: result: yes
configure:9305: checking for perl
configure:9321: found /usr/bin/perl
configure:9333: result: yes
configure:9494: creating ./config.status

## ---------------------- ##
## Running config.status. ##
## ---------------------- ##

This file was extended by config.status, which was
generated by GNU Autoconf 2.69. Invocation command line was

CONFIG_FILES =
CONFIG_HEADERS =
CONFIG_LINKS =
CONFIG_COMMANDS =
$ ./config.status

on ragnarok

config.status:751: creating Makefile
config.status:751: creating src/common/Makefile
config.status:751: creating 3rdparty/mt19937ar/Makefile
config.status:751: creating 3rdparty/libconfig/Makefile
config.status:751: creating src/char/Makefile
config.status:751: creating src/login/Makefile
config.status:751: creating src/map/Makefile
config.status:751: creating src/plugins/Makefile
config.status:751: creating src/tool/Makefile
config.status:751: creating src/test/Makefile
config.status:751: creating tools/HPMHookGen/Makefile

## ---------------- ##
## Cache variables. ##
## ---------------- ##

ac_cv_c_bigendian=no
ac_cv_c_compiler_gnu=yes
ac_cv_env_CC_set=
ac_cv_env_CC_value=
ac_cv_env_CFLAGS_set=
ac_cv_env_CFLAGS_value=
ac_cv_env_CPPFLAGS_set=
ac_cv_env_CPPFLAGS_value=
ac_cv_env_CPP_set=
ac_cv_env_CPP_value=
ac_cv_env_LDFLAGS_set=
ac_cv_env_LDFLAGS_value=
ac_cv_env_LIBS_set=
ac_cv_env_LIBS_value=
ac_cv_env_build_alias_set=
ac_cv_env_build_alias_value=
ac_cv_env_host_alias_set=
ac_cv_env_host_alias_value=
ac_cv_env_target_alias_set=
ac_cv_env_target_alias_value=
ac_cv_func_freelocale=yes
ac_cv_func_mysql_init=yes
ac_cv_func_newlocale=yes
ac_cv_func_setrlimit=yes
ac_cv_func_strnlen=yes
ac_cv_func_uselocale=yes
ac_cv_header_execinfo_h=yes
ac_cv_header_inttypes_h=yes
ac_cv_header_memory_h=yes
ac_cv_header_minix_config_h=no
ac_cv_header_mysql_h=yes
ac_cv_header_pcre_h=yes
ac_cv_header_stdc=yes
ac_cv_header_stdint_h=yes
ac_cv_header_stdlib_h=yes
ac_cv_header_string_h=yes
ac_cv_header_strings_h=yes
ac_cv_header_sys_stat_h=yes
ac_cv_header_sys_types_h=yes
ac_cv_header_unistd_h=yes
ac_cv_header_xlocale_h=yes
ac_cv_header_zlib_h=yes
ac_cv_objext=o
ac_cv_path_AR=/usr/bin/ar
ac_cv_path_EGREP='/bin/grep -E'
ac_cv_path_GREP=/bin/grep
ac_cv_path_MYSQL_CONFIG_HOME=/usr/bin/mysql_config
ac_cv_prog_CPP='gcc -E'
ac_cv_prog_HAVE_DOXYGEN=yes
ac_cv_prog_HAVE_PERL=yes
ac_cv_prog_ac_ct_CC=gcc
ac_cv_prog_cc_c89=
ac_cv_prog_cc_g=yes
ac_cv_prog_make_make_set=yes
ac_cv_safe_to_define___extensions__=yes
ac_cv_search_backtrace='none required'
ac_cv_search_clock_gettime=-lrt
ac_cv_search_inflateEnd=-lz
ac_cv_search_pcre_study=-lpcre
ac_cv_search_pthread_attr_destroy='none required'
ac_cv_search_pthread_attr_init='none required'
ac_cv_search_pthread_attr_setstacksize='none required'
ac_cv_search_pthread_cancel='none required'
ac_cv_search_pthread_create='none required'
ac_cv_search_pthread_join='none required'
ac_cv_search_pthread_sigmask='none required'
ac_cv_search_sqrt=-lm

## ----------------- ##
## Output variables. ##
## ----------------- ##

AR='/usr/bin/ar'
CC='gcc'
CFLAGS='-g -O2 -pipe -ffast-math -Wall -Wextra -Wno-sign-compare -std=c99 -march=i686 -Wno-unused-parameter -Wno-clobbered -Wempty-body -Winit-self -Wpointer-arith -Wformat-security -Wformat -Wformat-y2k -Wundef -Wnested-externs -Wold-style-definition -Woverlength-strings -Wredundant-decls -Wcast-qual -Wno-format-nonliteral -Wno-switch -Wno-missing-field-initializers -fno-strict-aliasing -g -DHAVE_EXECINFO'
CPP='gcc -E'
CPPFLAGS=' -DMAXCONN=16384 -I../common -DHAS_TLS -DHAVE_SETRLIMIT -DHAVE_STRNLEN -DDEBUG -DHAVE_MONOTONIC_CLOCK'
DEFS='-DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -D__EXTENSIONS__=1 -D_ALL_SOURCE=1 -D_GNU_SOURCE=1 -D_POSIX_PTHREAD_SEMANTICS=1 -D_TANDEM_SOURCE=1 -DHAVE_USELOCALE=1 -DHAVE_NEWLOCALE=1 -DHAVE_FREELOCALE=1 -DHAVE_XLOCALE_H=1 -DHAVE_EXECINFO_H=1'
DLLEXT='.so'
ECHO_C=''
ECHO_N='-n'
ECHO_T=''
EGREP='/bin/grep -E'
EXEEXT=''
GREP='/bin/grep'
HAVE_DOXYGEN='yes'
HAVE_MYSQL='yes'
HAVE_PERL='yes'
LDFLAGS=' -march=i686 -rdynamic'
LIBOBJS=''
LIBS='-lpcre -lrt -lm -lz -ldl'
LTLIBOBJS=''
MYSQL_CFLAGS='-I/usr/include/mysql'
MYSQL_CONFIG_HOME='/usr/bin/mysql_config'
MYSQL_LIBS='-rdynamic -L/usr/lib/mysql -lmysqlclient -lz -lcrypt -lnsl -lm -lssl -lcrypto'
MYSQL_VERSION='5.1.73'
OBJEXT='o'
PACKAGE_BUGREPORT=''
PACKAGE_NAME=''
PACKAGE_STRING=''
PACKAGE_TARNAME=''
PACKAGE_URL=''
PACKAGE_VERSION=''
PATH_SEPARATOR=':'
PLUGINSTATIC=''
SET_MAKE=''
SHELL='/bin/sh'
SOFLAGS=' -fPIC -shared -Wl,--no-undefined'
STATIC=''
WITH_PLUGINS='yes'
ac_ct_CC='gcc'
bindir='${exec_prefix}/bin'
build_alias=''
datadir='${datarootdir}'
datarootdir='${prefix}/share'
docdir='${datarootdir}/doc/${PACKAGE}'
dvidir='${docdir}'
exec_prefix='${prefix}'
host_alias=''
htmldir='${docdir}'
includedir='${prefix}/include'
infodir='${datarootdir}/info'
libdir='${exec_prefix}/lib'
libexecdir='${exec_prefix}/libexec'
localedir='${datarootdir}/locale'
localstatedir='${prefix}/var'
mandir='${datarootdir}/man'
oldincludedir='/usr/include'
pdfdir='${docdir}'
prefix='/usr/local'
program_transform_name='s,x,x,'
psdir='${docdir}'
runstatedir='${localstatedir}/run'
sbindir='${exec_prefix}/sbin'
sharedstatedir='${prefix}/com'
sysconfdir='${prefix}/etc'
target_alias=''

## ----------- ##
## confdefs.h. ##
## ----------- ##

/* confdefs.h */
#define PACKAGE_NAME ""
#define PACKAGE_TARNAME ""
#define PACKAGE_VERSION ""
#define PACKAGE_STRING ""
#define PACKAGE_BUGREPORT ""
#define PACKAGE_URL ""
#define STDC_HEADERS 1
#define HAVE_SYS_TYPES_H 1
#define HAVE_SYS_STAT_H 1
#define HAVE_STDLIB_H 1
#define HAVE_STRING_H 1
#define HAVE_MEMORY_H 1
#define HAVE_STRINGS_H 1
#define HAVE_INTTYPES_H 1
#define HAVE_STDINT_H 1
#define HAVE_UNISTD_H 1
#define __EXTENSIONS__ 1
#define _ALL_SOURCE 1
#define _GNU_SOURCE 1
#define _POSIX_PTHREAD_SEMANTICS 1
#define _TANDEM_SOURCE 1
#define HAVE_USELOCALE 1
#define HAVE_NEWLOCALE 1
#define HAVE_FREELOCALE 1
#define HAVE_XLOCALE_H 1
#define HAVE_EXECINFO_H 1

configure: exit 0

 

Edited by Ga_Chittolina

Share this post


Link to post
Share on other sites
  • 0

From log you using: gcc version 4.4.7 20120313

Share this post


Link to post
Share on other sites
  • 0

 

From log you using: gcc version 4.4.7 20120313

@@4144 But "gcc --version" returns 6.1. What should I do, then?
Are you sure it's GCC 6.1?

GCC 6.1 was released on April 27, 2016

And is not available on any repo(unless you manually download and compiled the GCC) which I doubt..

Share this post


Link to post
Share on other sites
  • 0

 

From log you using: gcc version 4.4.7 20120313

@@4144 But "gcc --version" returns 6.1. What should I do, then?

 

Can you show output from: gcc --version? I mean show all strings

Share this post


Link to post
Share on other sites
  • 0

@@4144 @@Dastgir

Yeah, I did download and compile it manually. Here's the gcc --version output:

 

 

[root@@ragnarok rathenaTeste]# gcc --version
gcc (GCC) 6.1.0
Copyright © 2016 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

 Does this version work, or I have to use an older version of gcc? If so, can you tell me which version works?

Share this post


Link to post
Share on other sites
  • 0

You sure you running compilation and gcc 6 in same server?

Because in your different output i see different users.



And yes gcc 6 works, if it compiled in correct way

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.