Complete.Org: Mailing Lists: Archives: freeciv-dev: August 2000:
[Freeciv-Dev] [PATCH] buglets in common/support.c (PR#493)
Home

[Freeciv-Dev] [PATCH] buglets in common/support.c (PR#493)

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-dev@xxxxxxxxxxx
Cc: bugs@xxxxxxxxxxxxxxxxxxx
Subject: [Freeciv-Dev] [PATCH] buglets in common/support.c (PR#493)
From: gs234@xxxxxxxxx (Gaute (B) Strokkenes)
Date: Sat, 5 Aug 2000 12:19:14 -0700 (PDT)

This patch does the following:

* Adds a configure check for strcasecmp() and strncasecmp() and makes
  Freeciv use them if available.

* The glibc manual states that strcmp() and friends may return "the
  difference between the first differing pair of characters
  (interpreted as `unsigned char' objects, then promoted to `int')".
  Added explicit casts to make sure that it's really done this way.

* Fixed a typo: stncmp() -> strncmp().

* Updated a comment concerning the return value of vsnprintf() and
  friends.

* Added explanatory comments for all functions that did not already
  have one.

There's a small catch, though.  It seems like configure checks for
strcasecmp() even without an explicit test, somewhere after it checks
for headers.  I'm not an autoconf/automake wizard and so I just left
the check where it is.

Attachment: native_strfoocmp.diff
Description: patch against cvs 5 Aug

Attachment: native_strfoocmp_configure.diff
Description: patch against cvs 5 Aug

-- 
Big Gaute (not to be confused with LG)
BARRY..  That was the most HEART-WARMING rendition of
``I DID IT MY WAY'' I've ever heard!!

[Prev in Thread] Current Thread [Next in Thread]