Remove wrong #ifdef in Option_String()

This fixes the following error when compiling without zlib support:

  irc.c: In function ‘Option_String’:
  irc.c:487: error: ‘options’ undeclared (first use in this function)

Reported by "der_baer" on #ngircd.

(cherry picked from commit 4ab688c5e82281c4d9ad2a4498523b1722c1f738)
vsnprintf.c: make code compatible with ansi2knr tool

(cherry picked from commit 8d25044ce515e25f453d22426c484a11d00af0f1)
conf-ssl.h: make code compatible with pre-ANSI C compilers

(cherry picked from commit 61d1c864c55291c1f5f81f284e984b044fe2722f)
Only use unsetenv() when it is available

AIX 4.3 dosn't support it, for example.

(cherry picked from commit ae00c100acdb4d2d3f99524d30258d07eefcfb6d)
Check for working getaddrinfo() function

At least AIX 4.3.3 and 5.1 have a broken implementation of getaddrinfo()
which doesn't handle "0" as numeric service correctly. This patch adds
a configure check for this case and changes all calling functions to only
use getaddrinfo() if it "works".

See <http://www.stacken.kth.se/lists/heimdal-discuss/2004-05/msg00059.html>

(cherry picked from commit b8433e9261c516d7b8743b33681050b6666192e5)

Conflicts:
	configure.ng
OS X has a working getaddrinfo() implementation

(cherry picked from commit bd33bd770decd470577487fa4bd399cb1d8426fc)
WEBIRC: Don't respect hostname when DNS is disabled

When DNS lookups are disabled, don't set the hostname received by the
WEBIRC command, but use the IP address instead.

Reported by Toni Spets <toni.spets@iki.fi>, thanks!

Closes bug #167.

(cherry picked from commit 1a628fff51fcfddde391e6c0f27686835e1b6d2e)
Fix permanent k/gline

Reported by Toni Spets (hifi - at - jnz - dot - fi).

(cherry picked from commit 9230f2fff1d374ecef93dafeb14099f22c9ef787)
Update Copyright notices for 2014

(cherry picked from commit 788da901ee3fa525a38dc99016d2612f6b945352)
Makefile.am: don't use "test -e", it isn't portable

(cherry picked from commit 7b358a57acfbb6e70f7c63d796b1e45e86431d1f)
platformtest.sh: don't use "test -e", it isn't portable

(cherry picked from commit e2b85ccde360ccc389afb0af12d5d75f0549f666)
Add libwrap at the end of the configure run

If libwrap becomes added earlier, other tests may fail because of not all
external variables required by libwrap are available when linking: for
example allow_severity and deny_severity.

This patch adds generic support for the LDFLAGS_END and LIBS_END variables
(CFLAGS_END has been implemented already).

Problem spotted on OpenBSD.

(cherry picked from commit 0f85c4c6a70a71c935af9c28e2c469ea4b66220a)

Conflicts:
	configure.ng
Fix configure script and "make check" for TCP Wrappers

Add missing #include's and static variables.

Problem spotted on OpenBSD.

(cherry picked from commit e747fe92775f577a38f8dd681f7a58f751348f5e)

Conflicts:
	configure.ng
	src/portab/portabtest.c
Use $(MKDIR_P) instead of $(mkinstalldirs) in Makefile's

And test for "mkdir -p" using AC_PROG_MKDIR_P in "configure".

(cherry picked from commit 90062111f7fd3be5941d94781470b391bebfccaa)
configure: Only link "contrib/Debian" if it exists

This isn't the case on "VPATH builds", for example.

(cherry picked from commit 14a84dfca57efeb744aa6219ca7776dc629871b7)
Correctly use cloaked IRC masks on "INVITE nickname"

The cloaked IRC mask of a user is his visible mask, so the daemon has
to use it for generating the "one time" entries for the invite list of
the given channel.

Without this patch, ngIRCd records the real IRC mask which will never
match while the target client is "+x", and even worse, will disclose
the real mask on "MODE #channel +I" commands :-/

Bug reported by Cahata on #ngircd, thanks!

(cherry picked from commit 20b52fe33dc3387d50790ed6da8c47c34277527a)
Services.txt: Update information for Anope 2.x

(cherry picked from commit 755562d1477ed28e4e793fb42fa0cc0b295ea1b5)
CHARCONV: Fix handling conversion errors

Don't overwrite already converted text!

(cherry picked from commit abf280d5bd5648817135c487a19941b2ef4b0701)
Fix two K&R C portability issues

Fix the following two errors emitted by the Apple K&R C compiler
on Apple A/UX:

"./class.c", line 47: no automatic aggregate initialization
"./class.c", line 47: illegal lhs of assignment operator

"./conf.c", line 1052: syntax error

Tested on A/UX 3.1.1.

(cherry picked from commit a4ed90ba9af1dce4df3f57f6a7c84097000c7256)
Spoofed prefixes: Really kill connection on non-server links

This fixes commit 6cbe1308 which only killed the connection when the
spoofed prefix itself belonged to a non-server client.

(cherry picked from commit 5009ab3e8c5a6fe7db5c5ad1d3fdc8aecfc64b55)