Commit Graph

63 Commits

Author SHA1 Message Date
Paul Jakma
6f0e3f6e17 [autoconf] bugs 162,303,178: Fix 'present but can not be compiled' warnings
2007-05-09 Paul Jakma <paul.jakma@sun.com>

	* configure.ac: sys/conf.h depends on sys/param.h, at least on
	  FBSD 6.2.
	  (bug #363) Should check for in_pktinfo for IRDP

2006-05-27 Paul Jakma <paul.jakma@sun.com>

	* configure.ac: General cleanup of header and type checks, introducing
	  an internal define, QUAGGA_INCLUDES, to build up a list of
	  stuff to include so as to avoid 'present but cant be compiled'
	  warnings.
	  Misc additional checks of things missing according to autoscan.
	  Add LIBM, for bgpd's use of libm, so as to avoid burdening
	  LIBS, and all the binaries, with libm linkage.
	  Remove the bad practice of using m4 changequote(), just
	  quote the []'s in the case statements properly.
	  This should fix bugs 162, 303 and 178.
	* */*.{c,h}: Update all HAVE_* to the standard autoconf namespaced
	  HAVE_* defines. I.e. HAVE_SA_LEN -> HAVE_STRUCT_SOCKADDR_SA_LEN,
	* bgpd/Makefile.am: Add LIBM to bgpd's LDADD, for pow().
2007-05-10 02:38:51 +00:00
Paul Jakma
5a54df971e [lib/sockunion] trivial: use XSTRDUP.
2006-02-21 Paul Jakma <paul.jakma@sun.com>

	* sockunion.c: (sockunion_{su2str,log}) Use XSTRDUP.
	  Particularly with _su2str, as that string gets XFREEd,
	  which can be annoying if run debug code in memory.c.
2006-02-21 01:37:14 +00:00
paul
2ba9a37add 2005-05-19 Paul Jakma <paul@dishone.st>
* sockunion.c: (sockunion_getsockname) use MTYPE_SOCKUNION, not TMP
	  (sockunion_getpeername) ditto
2005-05-19 01:37:50 +00:00
paul
8cc4198f9f 2005-05-06 Paul Jakma <paul@dishone.st>
* (general) extern and static'ification of functions in code and
	  header.
	  Cleanup any definitions with unspecified arguments.
	  Add casts for callback assignments where the callback is defined,
	  typically, as passing void *, but the function being assigned has
	  some other pointer type defined as its argument, as gcc complains
	  about casts from void * to X* via function arguments.
	  Fix some old K&R style function argument definitions.
	  Add noreturn gcc attribute to some functions, as appropriate.
	  Add unused gcc attribute to some functions (eg ones meant to help
	  while debugging)
	  Add guard defines to headers which were missing them.
	* command.c: (install_node) add const qualifier, still doesnt shut
	  up the warning though, because of the double pointer.
	  (cmp_node) ditto
	* keychain.c: (key_str2time) Add GET_LONG_RANGE() macro, derived
	  fromn vty.h ones to fix some of the (long) < 0 warnings.
	* thread.c: (various) use thread_empty
	  (cpu_record_hash_key) should cast to uintptr_t, a stdint.h type
	* vty.h: Add VTY_GET_IPV4_ADDRESS and VTY_GET_IPV4_PREFIX so they
	  removed from ospfd/ospf_vty.h
	* zebra.h: Move definition of ZEBRA_PORT to here, to remove
	  dependence of lib on zebra/zserv.h
2005-05-06 21:25:49 +00:00
hasso
e7fe8c88c3 * sockunion.c: Fix warning message. 2005-05-06 19:33:35 +00:00
ajs
6099b3b569 2004-11-19 Andrew J. Schorr <ajschorr@alumni.princeton.edu>
* global: Replace strerror with safe_strerror.  And vtysh/vtysh.c
	  needs to include "log.h" to pick up the declaration.
2004-11-20 02:06:59 +00:00
paul
42d498658d 2004-10-13 Paul Jakma <paul@dishone.st>
* (global) more const'ification.
	* sockunion.c: (sockunion_su2str) buffer should be sized
          SU_ADDRSTRLEN.
          (sockunion_log) do not return stack variables, strdup buf before
          return.
        * vty.h: Fix up the VTY_GET_INTEGER macros. Testing caller supplied
          values against ULONG_MAX is daft, when caller probably has passed
          a type that can not hold ULONG_MAX. use a temporary long instead.
          Add VTY_GET_LONG, make VTY_GET_INTEGER_RANGE use it, make
	  VTY_GET_INTEGER a define for VTY_GET_INTEGER_RANGE.
2004-10-13 05:22:18 +00:00
hasso
a149411b85 Some more const string fixes. 2004-10-11 12:53:17 +00:00
hasso
8c328f1106 Number of warnings is down to 3 again in lib directory. A lot of const's
added to strings and a lot of int -> unsigned int changes.
2004-10-05 21:01:23 +00:00
paul
225282994d 2004-05-08 Sowmini Varadhan <sowmini.varadhan@sun.com>
* command.c: (sockunion_getsockname) use socklen_t for len.
          (sockunion_getpeername) ditto.
2004-05-08 05:10:38 +00:00
hasso
726f9b2bbd Last fixes from 6Wind patch. 2003-05-25 21:04:54 +00:00
paul
239a6718ba Fix incorrect buffer bounds.
Reported by Anil Madhavapeddy to bug-zebra.
2003-05-24 11:50:50 +00:00
paul
718e374419 Initial revision 2002-12-13 20:15:29 +00:00