Mail Archives: cygwin/2002/06/18/19:22:31.1
------------11D2A92E4F706A
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Hello Robert,
Tuesday, June 18, 2002, 9:48:24 PM, you wrote:
RLO> I also have determined that three packages that are in
RLO> /etc/setup/installed.db
RLO> are missing from /etc/setup:
[snip]
Thanks to the hints Corey and you have provided I was able to pinpoint
the problem :)
Attached is a patch to fix the problem.
The rest is possibly only of interest to setup developers...
This was pretty nasty one... The String class was added a new
constructor accepting an 'int' at some point. This conflicts with
methods returning String objects which use the following construct
to indicate an error:
if (FALSE)
return 0;
The intent here was to return an empty string by calling the String
constructor which accepts 'const char *', but with the introduction of
the new constructor a String object with size of 1 is actually
returned - it contains the string "0" :)
I haven't checked the source for other occurences of such methods, but I
guess there may be more of them. I'll try to do this when I get some
more time (the weekend maybe).
Changelog:
It's somewhat lenghty, so you can tweak it to your likes :)
2002-06-18 Pavel Tsekov <ptsekov AT gmx DOT net>
* cygpackage.cc (cygpackage::getfirstfile): Return a pointer
to an empty C string, instead of int, so that the proper
String constructor will be called.
(cygpackage::getnextfile): Ditto.
------------11D2A92E4F706A
Content-Type: application/octet-stream; name="cygpackage.cc.diff"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="cygpackage.cc.diff"
LS0tIGN5Z3BhY2thZ2UuY2MJMjAwMi0wNi0xOCAyMjowNTo0Mi4wMDAwMDAwMDAgKzAyMDAKKysr
IGN5Z3BhY2thZ2UuY2MucGF0Y2hlZAkyMDAyLTA2LTE4IDIyOjA1OjUyLjAwMDAwMDAwMCArMDIw
MApAQCAtMTIwLDcgKzEyMCw3IEBAIGN5Z3BhY2thZ2U6OmdldGZpcnN0ZmlsZSAoKQogICAgIGlv
X3N0cmVhbTo6b3BlbiAoU3RyaW5nICgiY3lnZmlsZTovLy9ldGMvc2V0dXAvIikgKyBuYW1lICsg
Ii5sc3QuZ3oiLCAicmIiKTsKICAgbGlzdGRhdGEgPSBjb21wcmVzczo6ZGVjb21wcmVzcyAobGlz
dGZpbGUpOwogICBpZiAoIWxpc3RkYXRhKQotICAgIHJldHVybiAwOworICAgIHJldHVybiAiIjsK
ICAgcmV0dXJuIGxpc3RkYXRhLT5nZXRzIChnZXRmaWxlbmFtZWJ1ZmZlciwgc2l6ZW9mIChnZXRm
aWxlbmFtZWJ1ZmZlcikpOwogfQogCkBAIC0xMjksNyArMTI5LDcgQEAgY3lncGFja2FnZTo6Z2V0
bmV4dGZpbGUgKCkKIHsKICAgaWYgKGxpc3RkYXRhKQogICAgIHJldHVybiBsaXN0ZGF0YS0+Z2V0
cyAoZ2V0ZmlsZW5hbWVidWZmZXIsIHNpemVvZiAoZ2V0ZmlsZW5hbWVidWZmZXIpKTsKLSAgcmV0
dXJuIDA7CisgIHJldHVybiAiIjsKIH0KIAogdm9pZAo=
------------11D2A92E4F706A
Content-Type: text/plain; charset=us-ascii
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
------------11D2A92E4F706A--
- Raw text -