Date: Thu, 05 Feb 2009 07:21:58 +0100 From: Alexander Leidinger <Alexander@Leidinger.net> To: "M. Warner Losh" <imp@bsdimp.com> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, christoph.mallon@gmx.de, src-committers@freebsd.org, brde@optusnet.com.au Subject: Re: svn commit: r188098 - head/lib/libc/string Message-ID: <20090205072158.23811u1p5tpfkakk@webmail.leidinger.net> In-Reply-To: <20090204.103220.1763804960.imp@bsdimp.com> References: <4988AB83.2050203@gmx.de> <20090204212854.F51932@delplex.bde.org> <20090204154414.1949765y56lfhi80@webmail.leidinger.net> <20090204.103220.1763804960.imp@bsdimp.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Quoting "M. Warner Losh" <imp@bsdimp.com> (from Wed, 04 Feb 2009 =20 10:32:20 -0700 (MST)): > In message: <20090204154414.1949765y56lfhi80@webmail.leidinger.net> > Alexander Leidinger <Alexander@leidinger.net> writes: > : Quoting Bruce Evans <brde@optusnet.com.au> (from Wed, 4 Feb 2009 > : 22:27:59 +1100 (EST)): > : > : > On Tue, 3 Feb 2009, Christoph Mallon wrote: > : > > : >> Warner Losh schrieb: > : >>> Modified: head/lib/libc/string/strmode.c > : >>> =20 > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > : >>> --- head/lib/libc/string/strmode.c=09Tue Feb 3 20:01:51 2009 (r1880= 97) > : >>> +++ head/lib/libc/string/strmode.c=09Tue Feb 3 20:25:36 2009 (r1880= 98) > : >>> @@ -38,7 +38,7 @@ __FBSDID("$FreeBSD$"); > : >>> #include <string.h> > : >>> void > : >>> -strmode(mode_t mode, char *p) > : >>> +strmode(/* mode_t */ int mode, char *p) > : >>> { > : >>> =09 /* print type */ > : >>> =09switch (mode & S_IFMT) { > : >> > : >> The manpage states that the first parameter of strmode() is a > : >> mode_t. What's wrong - the implementation (both in header and > : >> definition) or the documentation? > : > > : > The man page is wrong. strtomode() should take an int arg (actually > : > the default (unary) promotion of a mode_t) for the the same reasons > : > that memchr() does -- because these interfaces should be usable by K&R > : > compilers and/or by standard C compilers without a protoype in scope. > : > Even if this is no longer required, binary compatibily requires the > : > interfaces to be the same as the ones that used to be required. The > : > requirement for binary compatibility also prevents "fixing" interfaces > : > to be "ANSI" in headers (if you "fix" prototypes there then you will > : > get obscure runtime errors instead of tinderbox errors). > : > : Is this also true for the current use of symbol versioning in our > : libc? I thought this is supposed to "fix" this problem (assuming we > : add an UPDATING entry that users have to make sure that they to a full > : installworld to habe the includes and the lib in sync)? > > Maybe, but it is a problem worth fixing? What we have now is correct It depends if this is seen as a broken window =20 (http://www.pragprog.com/the-pragmatic-programmer/extracts/software-entropy)= =20 or not... At least we should not talk a lot against fixing it. If someone wants =20 to fix it, he should be welcome. Bye, Alexander. --=20 Phosflink, v: =09To flick a bulb on and off when it burns out (as if, somehow, =09that will bring it back to life). =09=09-- Rich Hall & Friends, "Sniglets" http://www.Leidinger.net Alexander @ Leidinger.net: PGP ID =3D B0063FE7 http://www.FreeBSD.org netchild @ FreeBSD.org : PGP ID =3D 72077137
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20090205072158.23811u1p5tpfkakk>