Wireshark-dev: Re: [Wireshark-dev] [Wireshark-commits] master 0b2c8b0: AMQP: fix declaration of
From: Guy Harris <guy@xxxxxxxxxxxx>
Date: Mon, 2 Feb 2015 21:50:04 -0800
On Feb 2, 2015, at 1:46 PM, Wireshark code review <code-review-do-not-reply@xxxxxxxxxxxxx> wrote:

> 0b2c8b0 by Alexis La Goutte (alexis.lagoutte@xxxxxxxxx):
> 
>    AMQP: fix declaration of 'index' shadows a global declaration
> 
>    St*** Mac OS X buildbot...

It's probably Ken or Dennis's fault; the original name for The Routine Currently Known As strchr() was index(), perhaps by (weak) analogy to PL/I's index() function (which was more like strstr(), as I remember).  V7 had index() and reindex(), as did the V7-based UNIX/32V and the UNIX/32V-derived 4.x BSD.  The folks in the group that gave us System III and System V renamed them to strchr() and strrchr(), perhaps to avoid collisions; a number of UN*Xes offered them under both names, so that code written using either set of names would compile.  OS X may do so out of its BSD heritage, although I think for most if not all purposes it would suffice to declare them in <strings.h> but not in <string.h> (and not have <string.h> include <strings.h>).