RE: [PATCH]setup.exe mklink2.cc some function arguments need to be pointers
> -Original Message- > From: Gerrit P. Haase [mailto:[EMAIL PROTECTED]] > Sent: Monday, April 22, 2002 4:34 PM > To: Robert Collins > Cc: [EMAIL PROTECTED] > Subject: Re: [PATCH]setup.exe mklink2.cc some function > arguments need to be pointers > > > Hallo Robert, > > >> It looks like you are building in a branch. The version of > >> mklink2.cc I have from the main branch is > > > No, I've realised that I haven't committed it... I've some > > smei-invasive changes I've been mulling over in HEAD, and I'd > > forgotten about that. > > > I will commit my patch to HEAD along with a couple of other > fixes from > > setup200202 shortly - hopefully this weekend. > > > Until then, simply use the mklink2.cc from the setup200202 branch. > > Is it in now? > I cannot build because mklink2.cc fails... Use this: cvs -z3 update -Pdrsetup200202 mklink2.cc to get a copy that will build. Rob
Re: [PATCH]setup.exe mklink2.cc some function arguments need to be pointers
Hallo Robert, >> It looks like you are building in a branch. The version of >> mklink2.cc I have from the main branch is > No, I've realised that I haven't committed it... I've some smei-invasive > changes I've been mulling over in HEAD, and I'd forgotten about that. > I will commit my patch to HEAD along with a couple of other fixes from > setup200202 shortly - hopefully this weekend. > Until then, simply use the mklink2.cc from the setup200202 branch. Is it in now? I cannot build because mklink2.cc fails... Gerrit -- =^..^=
RE: [PATCH]setup.exe mklink2.cc some function arguments need to be pointers
> -Original Message- > From: Michael A Chase [mailto:[EMAIL PROTECTED]] > Sent: Friday, April 19, 2002 11:19 AM > To: Robert Collins; [EMAIL PROTECTED]; > [EMAIL PROTECTED] > Subject: Re: [PATCH]setup.exe mklink2.cc some function > arguments need to be pointers > > > It looks like you are building in a branch. The version of > mklink2.cc I have from the main branch is No, I've realised that I haven't committed it... I've some smei-invasive changes I've been mulling over in HEAD, and I'd forgotten about that. I will commit my patch to HEAD along with a couple of other fixes from setup200202 shortly - hopefully this weekend. Until then, simply use the mklink2.cc from the setup200202 branch. Sorry about the confusion. Rob
Re: [PATCH]setup.exe mklink2.cc some function arguments need to be pointers
It looks like you are building in a branch. The version of mklink2.cc I have from the main branch is static const char *cvsid = "\n%%% $Id: mklink2.cc,v 2.1 2002/03/26 00:25:15 rbcollins Exp $\n"; The most recent patch you applied to mklink2.cc (announcement attached) is identical to my proposed patch, but it was applied in static const char *cvsid = "\n%%% $Id: mklink2.cc,v 2.1.2.2 2002/04/12 06:21:27 rbcollins Exp $\n"; The changelog for that is 2002-04-12 Robert Collins <[EMAIL PROTECTED]> * mklink2.cc (make_link_2): Tweak to work with current w32api headers. -- Mac :}) ** I normally forward private questions to the appropriate mail list. ** Ask Smarter: http://www.tuxedo.org/~esr/faqs/smart-questions.html Give a hobbit a fish and he eats fish for a day. Give a hobbit a ring and he eats fish for an age. - Original Message - From: "Robert Collins" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Thursday, April 18, 2002 15:45 Subject: RE: [PATCH]setup.exe mklink2.cc some function arguments need to be pointers Well if you recall I had the opposite code in place (as far as I can tell without an actual patch), and that didn't compile for a different set of users. I completely rebuild my OS the other day, and after that I've needed the patch. That seemed a strong indication that the w32api was the culprit.. Rob > -Original Message- > From: Brian Keener [mailto:[EMAIL PROTECTED]] > Sent: Friday, April 19, 2002 8:46 AM > To: [EMAIL PROTECTED] > Subject: Re: [PATCH]setup.exe mklink2.cc some function > arguments need to be pointers > > > Not to be a pain about this - but this have been reported > several times in the > past and I am running Win2000 and have the W32api-1.3-2 > installed. I haven't > seen any other w32api come down the pike so that appears to > be the most recent. > I have the patch - just took it out and no compile - put it > back and it does > compile. > > Not sure what Mike's OS or yours Robert or if it even makes a > difference but I > thought I would point out mine is Win2k. I also have my just > updated my CVS > for cinstall so it is current. > > I know this is a me2 but I thought I would add what I could. > > Bk > > > --- Begin Message --- CVSROOT:/cvs/src Module name:src Branch: setup200202 Changes by: [EMAIL PROTECTED]2002-04-11 23:21:28 Modified files: winsup/cinstall: ChangeLog mklink2.cc Log message: 2002-04-12 Robert Collins <[EMAIL PROTECTED]> * mklink2.cc (make_link_2): Tweak to work with current w32api headers. Patches: http://sources.redhat.com/cgi-bin/cvsweb.cgi/src/winsup/cinstall/ChangeLog.diff?cvsroot=src&only_with_tag=setup200202&r1=2.194.2.23&r2=2.194.2.24 http://sources.redhat.com/cgi-bin/cvsweb.cgi/src/winsup/cinstall/mklink2.cc.diff?cvsroot=src&only_with_tag=setup200202&r1=2.1.2.1&r2=2.1.2.2 --- End Message ---
Re: [PATCH]setup.exe mklink2.cc some function arguments need to be pointers
From: "Robert Collins" <[EMAIL PROTECTED]> To: "Michael A Chase" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Thursday, April 18, 2002 14:59 Subject: RE: [PATCH]setup.exe mklink2.cc some function arguments need to be pointers > Update your win32api - And it should not need the patch, I ran a complete CVS update for the Cygwin source, deleted all .o, .a, and .d files in the obj/ tree, and ran configure for the entire tree just before I attempted to make everything including setup.exe. The only compile that fails is mklink2.cc. Both functions in mklink2.cc are extern "C" so the automatic referencing done by C++ to function call parameters doesn't occur. # first make attempt: c++ -L/cygwin-build/obj/i686-pc-cygwin/winsup -L/cygwin-build/obj/i686-pc-cy gwin/winsup/cygwin -L/cygwin-build/obj/i686-pc-cygwin/winsup/w32api/lib -isy stem /cygwin-build/src/winsup/include -isystem /cygwin-build/src/winsup/cygwin/include -isystem /cygwin-build/src/winsup/w32api/include -isystem /cygwin-build/src/newlib/libc/sys/cygwin -isystem /cygwin-build/src/newlib/libc/sys/cygwin32 -B/cygwin-build/obj/i686-pc-cygwi n/newlib/ -isystem /cygwin-build/obj/i686-pc-cygwin/newlib/targ-include -isystem /cygwin-build/src/newlib/libc/include -MMD -g -O2 -mno-cygwin -I. -I/cygwin- build/src/winsup/cinstall -I/cygwin-build/src/winsup/mingw/include -I/cygwi n-build/src/winsup/bz2lib -mwindows -c -o mklink2.o /cygwin-build/src/winsup/cinstall/mklink2.cc /cygwin-build/src/winsup/cinstall/mklink2.cc: In function `void make_link_2(const char *, const char *, const char *, const char *)': /cygwin-build/src/winsup/cinstall/mklink2.cc:24: cannot convert `CLSID_ShellLink' from type `const GUID' to type `const CLSID *' /cygwin-build/src/winsup/cinstall/mklink2.cc:25: cannot convert `IID_IPersistFile' from type `_GUID' to type `const IID *' # second make attempt after first two arguments &ed c++ -L/cygwin-build/obj/i686-pc-cygwin/winsup -L/cygwin-build/obj/i686-pc-cy gwin/winsup/cygwin -L/cygwin-build/obj/i686-pc-cygwin/winsup/w32api/lib -isy stem /cygwin-build/src/winsup/include -isystem /cygwin-build/src/winsup/cygwin/include -isystem /cygwin-build/src/winsup/w32api/include -isystem /cygwin-build/src/newlib/libc/sys/cygwin -isystem /cygwin-build/src/newlib/libc/sys/cygwin32 -B/cygwin-build/obj/i686-pc-cygwi n/newlib/ -isystem /cygwin-build/obj/i686-pc-cygwin/newlib/targ-include -isystem /cygwin-build/src/newlib/libc/include -MMD -g -O2 -mno-cygwin -I. -I/cygwin- build/src/winsup/cinstall -I/cygwin-build/src/winsup/mingw/include -I/cygwi n-build/src/winsup/bz2lib -mwindows -c -o mklink2.o /cygwin-build/src/winsup/cinstall/mklink2.cc /cygwin-build/src/winsup/cinstall/mklink2.cc: In function `void make_link_2(const char *, const char *, const char *, const char *)': /cygwin-build/src/winsup/cinstall/mklink2.cc:24: cannot convert `IID_IShellLinkA' from type `const GUID' to type `const IID *' -- Mac :}) ** I normally forward private questions to the appropriate mail list. ** Ask Smarter: http://www.tuxedo.org/~esr/faqs/smart-questions.html Give a hobbit a fish and he eats fish for a day. Give a hobbit a ring and he eats fish for an age.
RE: [PATCH]setup.exe mklink2.cc some function arguments need to be pointers
Well if you recall I had the opposite code in place (as far as I can tell without an actual patch), and that didn't compile for a different set of users. I completely rebuild my OS the other day, and after that I've needed the patch. That seemed a strong indication that the w32api was the culprit.. Rob > -Original Message- > From: Brian Keener [mailto:[EMAIL PROTECTED]] > Sent: Friday, April 19, 2002 8:46 AM > To: [EMAIL PROTECTED] > Subject: Re: [PATCH]setup.exe mklink2.cc some function > arguments need to be pointers > > > Not to be a pain about this - but this have been reported > several times in the > past and I am running Win2000 and have the W32api-1.3-2 > installed. I haven't > seen any other w32api come down the pike so that appears to > be the most recent. > I have the patch - just took it out and no compile - put it > back and it does > compile. > > Not sure what Mike's OS or yours Robert or if it even makes a > difference but I > thought I would point out mine is Win2k. I also have my just > updated my CVS > for cinstall so it is current. > > I know this is a me2 but I thought I would add what I could. > > Bk > > >
Re: [PATCH]setup.exe mklink2.cc some function arguments need to be pointers
Not to be a pain about this - but this have been reported several times in the past and I am running Win2000 and have the W32api-1.3-2 installed. I haven't seen any other w32api come down the pike so that appears to be the most recent. I have the patch - just took it out and no compile - put it back and it does compile. Not sure what Mike's OS or yours Robert or if it even makes a difference but I thought I would point out mine is Win2k. I also have my just updated my CVS for cinstall so it is current. I know this is a me2 but I thought I would add what I could. Bk
RE: [PATCH]setup.exe mklink2.cc some function arguments need to be pointers
Update your win32api - And it should not need the patch, Rob > -Original Message- > From: Michael A Chase [mailto:[EMAIL PROTECTED]] > Sent: Friday, April 19, 2002 7:26 AM > To: [EMAIL PROTECTED] > Subject: [PATCH]setup.exe mklink2.cc some function arguments > need to be pointers > > > I couldn't get mklink2.cc to compile until I made the > attached changes. > > It appears that CoCreateInstance() and > sl->lpVtbl->QueryInterface() are looking for pointers to > values in certain arguments instead of the values. Almost the > exact same code is used in src/winsup/cygwin/shortcut.c > except for the '&'s and it compiles cleanly. Both functions > defined in mklink2.cc are declared extern "C" so the function > calls should work the same. > > Here are the relevant pieces of code. > > src/winsup/cinstall/mklink2.cc (make_link_2): > 23: CoCreateInstance (CLSID_ShellLink, NULL, > 24: CLSCTX_INPROC_SERVER, IID_IShellLink, (LPVOID > *) & sl); > 25: sl->lpVtbl->QueryInterface (sl, IID_IPersistFile, (void > **) &pf); > > src/winsup/cygwin/shortcut.c (check_shortcut): > 85: hres = CoCreateInstance (&CLSID_ShellLink, NULL, > CLSCTX_INPROC_SERVER, > 86:&IID_IShellLink, (void **)&psl); > 87: if (FAILED (hres)) > 88: goto close_it; > 89: /* Get a pointer to the IPersistFile interface. */ > 90: hres = psl->lpVtbl->QueryInterface (psl, > &IID_IPersistFile, (void > **)&ppf); > > src/winsup/w32api/include/objidl.h: > 640: EXTERN_C const IID IID_IPersistFile; > > src/winsup/w32api/include/olectlid.h: > 76: extern const GUID IID_IPersistFile; > > src/winsup/w32api/include/shlguid.h: > 13: extern const GUID CLSID_ShellLink; > 28: extern const GUID IID_IShellLinkA; > 68: #define IID_IShellLink IID_IShellLinkA > > src/winsup/w32api/lib/shell32.c: > 6: DEFINE_SHLGUID(CLSID_ShellLink,0x00021401L,0,0); > 21: DEFINE_SHLGUID(IID_IShellLinkA,0x000214EEL,0,0); > > src/winsup/w32api/lib/uuid.c: > 226: DEFINE_GUID(IID_IPersistFile,0x10b,0,0,0xc0,0,0,0,0,0,0,0x46); > > -- > Mac :}) > ** I normally forward private questions to the appropriate > mail list. ** Ask Smarter: > http://www.tuxedo.org/~esr/faqs/smart-> questions.html > Give a > hobbit a fish and he eats fish for a > day. > Give a hobbit a ring and he eats fish for an age. > > ChangeLog: > > 2002-04-18 Michael A Chase <[EMAIL PROTECTED]> > > * mklink2.cc (check_shortcut): Change arguments from > values to pointers. >
[PATCH]setup.exe mklink2.cc some function arguments need to be pointers
I couldn't get mklink2.cc to compile until I made the attached changes. It appears that CoCreateInstance() and sl->lpVtbl->QueryInterface() are looking for pointers to values in certain arguments instead of the values. Almost the exact same code is used in src/winsup/cygwin/shortcut.c except for the '&'s and it compiles cleanly. Both functions defined in mklink2.cc are declared extern "C" so the function calls should work the same. Here are the relevant pieces of code. src/winsup/cinstall/mklink2.cc (make_link_2): 23: CoCreateInstance (CLSID_ShellLink, NULL, 24: CLSCTX_INPROC_SERVER, IID_IShellLink, (LPVOID *) & sl); 25: sl->lpVtbl->QueryInterface (sl, IID_IPersistFile, (void **) &pf); src/winsup/cygwin/shortcut.c (check_shortcut): 85: hres = CoCreateInstance (&CLSID_ShellLink, NULL, CLSCTX_INPROC_SERVER, 86:&IID_IShellLink, (void **)&psl); 87: if (FAILED (hres)) 88: goto close_it; 89: /* Get a pointer to the IPersistFile interface. */ 90: hres = psl->lpVtbl->QueryInterface (psl, &IID_IPersistFile, (void **)&ppf); src/winsup/w32api/include/objidl.h: 640: EXTERN_C const IID IID_IPersistFile; src/winsup/w32api/include/olectlid.h: 76: extern const GUID IID_IPersistFile; src/winsup/w32api/include/shlguid.h: 13: extern const GUID CLSID_ShellLink; 28: extern const GUID IID_IShellLinkA; 68: #define IID_IShellLink IID_IShellLinkA src/winsup/w32api/lib/shell32.c: 6: DEFINE_SHLGUID(CLSID_ShellLink,0x00021401L,0,0); 21: DEFINE_SHLGUID(IID_IShellLinkA,0x000214EEL,0,0); src/winsup/w32api/lib/uuid.c: 226: DEFINE_GUID(IID_IPersistFile,0x10b,0,0,0xc0,0,0,0,0,0,0,0x46); -- Mac :}) ** I normally forward private questions to the appropriate mail list. ** Ask Smarter: http://www.tuxedo.org/~esr/faqs/smart-questions.html Give a hobbit a fish and he eats fish for a day. Give a hobbit a ring and he eats fish for an age. ChangeLog: 2002-04-18 Michael A Chase <[EMAIL PROTECTED]> * mklink2.cc (check_shortcut): Change arguments from values to pointers. cinstall-mac-020418-1.patch Description: Binary data