Commit Graph

78 Commits

Author SHA1 Message Date
Alexander Barton 722afc1b81 Make sure that SYSCONFDIR is always set
This is useful when ./configure hasn't been run but some source code
linters are run in an editor, for example.
2016-07-22 19:01:04 +02:00
Alexander Barton 9811223fb8 Whitespace fixes (no functional changes) 2015-08-01 15:15:30 +02:00
Alexander Barton a5ca8be658 Streamline ".gitignore" files 2015-07-19 03:03:06 +02:00
Alexander Barton a13bb78b1e Update copyright notices of recently changed files 2014-03-17 12:22:00 +01:00
Alexander Barton 37090a28e8 portab.h: Restructure and clean up code
- Don't use HAVE_SYS_TYPES_H, <sys/types.h> is a required header now.
- Streamline check for boolean data types.
- Better indent #ifdef constructs.
2014-03-17 01:17:30 +01:00
Alexander Barton 259c314d14 Remove imp.h and exp.h header files
These include files don't have a function any more, remove them.
2014-03-17 00:17:02 +01:00
Alexander Barton 51396f8f1c strdup.c: Code cleanup 2014-03-16 22:59:03 +01:00
Alexander Barton 43fb18f2f5 Code cleanup, remove blank lines 2014-03-16 22:11:26 +01:00
Alexander Barton e747fe9277 Fix configure script and "make check" for TCP Wrappers
Add missing #include's and static variables.

Problem spotted on OpenBSD.
2014-01-17 16:18:55 +01:00
Alexander Barton 5d88030bd1 Support non-standard vsnprintf() return code
C99 states that vsnprintf() "returns the number of characters that
would have been printed if the n were unlimited"; but according to the
Linux manual page "glibc until 2.0.6 would return -1 when the output
was truncated" -- so we have to handle both cases ...
2014-01-04 23:57:05 +01:00
Alexander Barton f024a4992a portabtest: Add checks for strdup(), strndup(), and strtok_r() 2014-01-01 16:38:36 +01:00
Alexander Barton d38747d951 portabtest: Actually test functions
Test functions snprintf(), strlcpy(), strlcat(), vsnprintf() for
correctness, not only existance (which was quite useless, because
if they weren't available, the program could not have been linked
at all ...).
2014-01-01 15:57:34 +01:00
Alexander Barton 18070e5381 portabtest: Only use one exit code to indicate errors 2013-12-29 17:48:25 +01:00
Alexander Barton d913323ca9 portabtest: Code cleanup 2013-12-29 17:46:54 +01:00
Alexander Barton 8d25044ce5 vsnprintf.c: make code compatible with ansi2knr tool 2013-11-09 23:41:20 +01:00
Alexander Barton c3c719b978 Remove unused vsnprintf.c test function 2013-11-09 23:31:51 +01:00
Federico G. Schwindt 6ac5a82eec private strndup() implementation in case libc does not provide it 2013-08-26 10:47:04 +01:00
Alexander Barton b5b3dd9cfd Add Cygwin binaries (*.exe) to .gitignore files 2012-12-25 18:52:49 +01:00
Alexander Barton e0da56fc7b Disable UID/GID checks on "single user OS"
Don't abort on "single user operating systems" that don't know more than
one user account and therefore can't change user and group IDs.

Currently, the only such system supported by ngIRCd is Haiku, a BeOS
clone.
2012-10-11 14:54:13 +00:00
Alexander Barton 3e22fc32f3 Remove all geneerated Makefile.am on "make maintainer-clean" 2012-09-24 20:45:37 +02:00
Alexander Barton 8e1beae4e7 Include all build-system files into distribution archives 2012-09-24 14:34:16 +02:00
Alexander Barton 192e304b94 Change build system to support new and old GNU automake
Starting with GNU automake 1.12, the "de-ANSI-fication support" has been
removed, which ngIRCd used to enable building itself on very old systems.

Now the problem is, that using automake >= 1.12 isn't working because of
the now unsupported M4 macros. Therefore the solution that this patch
implements is to dynamically generate the automake input files with our
own ./autogen.sh script:

  configure.ng => configure.in
  Makefile.ng => Makefile.am

This is quite an ugly approach, but it works and enables us to:

  1. use current automake >= 1.12 for development and "private builds",
  2. still build distribution archives using automake 1.11.x that have
     "de-ANSI-fication support" enabled in the generated Makefile's.

And if you are using Makefile's generated with a automake version newer
than 1.11.x (without "de-ANSI-fication support"), the ./configure script
warns you not to use this generated build system to generate distribution
archives.

Drawback of this patch: you MUST use our autogen.sh script, you can't call
the autoconf/automake commands directly any more; but autoreconf should
still work ...
2012-09-23 18:13:55 +02:00
Alexander Barton 82bf4eb059 configure.in: use AC_CANONICAL_HOST (not AC_CANONICAL_TARGET)
See the autoconf manual for details:
http://www.gnu.org/software/autoconf/manual/autoconf.html#Specifying-Target-Triplets
2012-09-13 00:06:08 +02:00
Alexander Barton 13d9e0c5a7 Test for gai_strerror()
If gai_strerror() isn't available, use a macro that simply returns
a static error message (regardless of the real error code).

For example, GNU libc 2.0.7 doesn't implement gai_strerror().
2011-11-06 14:16:59 +01:00
Alexander Barton 2a7dd06ebd Code cleanup: mostly removing empty lines 2011-02-13 17:52:38 +01:00
Alexander Barton 03628dbeaf Add Doxygen @file documentation to each source and header file 2011-02-13 17:52:38 +01:00
Alexander Barton 5f2bc55d36 Only use "__attribute__ ((unused))" if GCC >=2.8 is used
At least GCC 2.7.2 doesn't support this attribute.
2010-10-19 22:13:48 +02:00
Alexander Barton 7b69bc2ae8 Added some missing files of GIT tree to distribution archives
The following bits and bytes were not included in distribution archives:
 - contrib: ngindent, ngircd.sh
 - contrib/Debian: ngircd.postinst
 - contrib/MacOSX: preinstall.sh, postinstall.sh
 - doc/src: Doxyfile, header.inc.html, footer.inc.html, ngircd-doc.css
 - src/portab: splint.h
2008-11-13 23:17:32 +01:00
Alexander Barton dfc3de131c Make ngIRCd compile and run on NeXTSTEP 3.3 and OPENSTEP 4.2
by Steven D. Blackford <kb7sqi@aol.com>:

"I wanted to let you know that I've done a quick port of ngircd-0.12.0 for
NEXTSTEP3.3/OPENSTEP4.2. There wasn't a lot of changes required to get it
to compile clean, but I did make the necessary changes so that I didn't
have to use -posix flag. The NeXT has a pretty buggy POSIX implementation
so I always try to work around it. :-)
Anway, here's the changes required to get it to compile."
2008-08-01 16:21:16 +02:00
Scott Perry b90f71ca2a Use strtok_r instead of strchr in IRC_JOIN.
This patch does significant cleanup on the join code by using strtok_r
instead of mangling strchr to parse channel names and keys in parallel when
a JOIN command contains a list of channels and keys.

Also adds an strtok_r implementation to libportab.
2008-05-26 21:20:03 +02:00
Alexander Barton 7b33424c13 Added "portabtest" binary to .gitignore file in src/portabtest/. 2008-04-09 19:46:26 +02:00
Alexander Barton bc63064d5c Moved .cvsignore files to .gitignore
Since we are using GIT starting from now, I converted all the
.cvsignore files to .gitignore files.
2008-04-09 18:54:52 +02:00
Alexander Barton 43f8d149bb added "portabtest" binary to list of files to ignore. 2006-12-28 13:34:43 +00:00
Alexander Barton 949a4ef793 Added .cvsignore files to hide generated files from CVS. 2006-12-28 13:20:07 +00:00
Alexander Barton 77f54693ef Removed unnecessary #define of "LOCAL", now use plain C "static" instead. 2005-07-31 20:13:07 +00:00
Florian Westphal 77faf14b29 use strdup() to add oper hostname mask. 2005-04-16 09:23:01 +00:00
Florian Westphal 8b17579e60 private strdup() implementation in case libc does not provide it. 2005-04-16 09:20:53 +00:00
Alexander Barton ca8ab38cac Use typedef instead of #define to declare the socklen_t type if needed. 2005-04-09 18:27:16 +00:00
Alexander Barton 4d0b03b423 Debine NDEBUG if DEBUG isn't defined to disable all assert() checks as well. 2005-03-30 16:37:02 +00:00
Florian Westphal 8adff59223 Remove INT, LONG, BOOLEAN, STATIC, CONST, CHAR datatypes.
use stdbool.h / inttypes.h if available.
2005-03-19 18:43:48 +00:00
Alexander Barton 3da942e237 Updated to latest strl{cat|cpy} code of rsync:
- Make sure that strlcpy() returns the right value when the bufsize is 0.
- Fixed a bug in strlcat() where it would not properly detect a no-change
  condition if called with an initial string longer than the specified
  size limit (due to an unsigned var's inability to go negative).
Patch by Florian Westphal, <westphal@foo.fh-furtwangen.de>.
2005-02-27 09:29:13 +00:00
Alexander Barton 6c5f4beb53 Fixed return values of our own implementation of strlcpy(). The code has
been taken from rsync and they fixed it, but we didn't until today :-/
2005-01-18 09:05:37 +00:00
Alexander Barton f697923c48 Fixed detection of GNU C version and usability of __attribute__. 2004-03-15 19:26:39 +00:00
Alexander Barton c53903eb3f Use "__attribute__" only if gcc is at least version 2.7 2004-01-17 03:22:46 +00:00
Alexander Barton daa996f177 Added missing prototype for dummy_snprintf(). 2003-04-21 10:53:38 +00:00
Alexander Barton 016e547daa Re-corrected test for CVS version. 2003-03-31 19:01:02 +00:00
Alexander Barton f53455977d Added #include for stdarg.h when using ower own version of vsnprintf(). 2003-03-17 01:12:10 +00:00
Alexander Barton 9ca1f6a988 Removed now obsolete test for A/UX: configure does this job now. 2003-03-17 00:53:52 +00:00
Alexander Barton 444fdcf905 - Check functions only on systems that support prototypes, elder cpmpilers
become confused instead!
2003-01-04 10:40:01 +00:00
Alexander Barton 8139505829 - Link portabtest agains "true" library. 2003-01-03 22:04:14 +00:00