Mail Archives: cygwin/2003/10/13/16:26:35
This was posted to me privately (possibly by mistake). Looks
as though it could help with the setup hanging investigation.
[It's been quite a day for replying to sender instead of list.]
-- Cliff
chris <caj AT cs DOT york DOT ac DOT uk> wrote:
> I've got to pop off now, but I thought I would express some inital
> experiments...
>
> The problem doesn't seem to be specifically relating to cygpath.exe. I
> get the same problem with the program I list at the end of the email.
> The problem goes away if I remove the function dowin (note that I never
> actually call the program, I just exit immediatly)
>
> I shall try to continue to cut down my minimal case later, but I thought
> this added an interesting twist to the problem :)
>
>
> -- Program follows --
>
> #define NOCOMATTRIBUTE
>
> #include <shlobj.h>
> #include <stdio.h>
> #include <string.h>
> #include <stdlib.h>
> #include <limits.h>
> #include <getopt.h>
> #include <windows.h>
> #include <io.h>
> #include <sys/fcntl.h>
> #include <sys/cygwin.h>
> #include <ctype.h>
>
>
> static int allusers_flag;
>
> static void
> dowin (char option)
> {
> char *buf;
> DWORD len = MAX_PATH;
> WIN32_FIND_DATA w32_fd;
> LPITEMIDLIST id;
> HINSTANCE k32;
> BOOL (*GetProfilesDirectoryAPtr) (LPSTR, LPDWORD) = 0;
>
>
> SHGetSpecialFolderLocation (NULL, allusers_flag ?
> CSIDL_COMMON_PROGRAMS : CSIDL_PROGRAMS, &id);
> SHGetPathFromIDList (id, buf);
> /* This if clause is a Fix for Win95 without any "All Users" */
> if (strlen (buf) == 0)
> {
> SHGetSpecialFolderLocation (NULL, CSIDL_PROGRAMS, &id);
> SHGetPathFromIDList (id, buf);
> }
> }
>
>
>
> int
> main (int argc, char **argv)
> {
> int c, o = 0;
> int options_from_file_flag;
> char *filename;
> return 0;}
>
>
>
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
- Raw text -