[Bug 15679] cygwin symlinks not working in wine

wine-bugs at winehq.org wine-bugs at winehq.org
Thu Aug 27 23:47:09 CDT 2009


http://bugs.winehq.org/show_bug.cgi?id=15679





--- Comment #5 from Dan Kegel <dank at kegel.com>  2009-08-27 23:47:03 ---
Or maybe cygwin could always use .lnk symlinks on wine.

Looking at path.cc, I see there is already a special case
for one odd filesystem that doesn't support the system
attribute:

  /* MVFS doesn't handle the SYSTEM DOS attribute, but it handles the R/O
     attribute.  Therefore we create symlinks on MVFS always as shortcuts. */
  mk_winsym |= win32_newpath.fs_is_mvfs ();

How 'bout extending that special case to handle wine, too, a la

  /* MVFS doesn't handle the SYSTEM DOS attribute, but it handles the R/O
     attribute.  Therefore we create symlinks on MVFS always as shortcuts. 
     Same thing for Wine... it lies about its filesystem, so just detect Wine
in general.
   */
  mk_winsym |= win32_newpath.fs_is_mvfs () || is_wine ();

where is_wine() is something like

bool is_wine()
{
  static bool iswine = false;
  static bool checked = false;
  if (!checked) {
    HMODULE h = GetModuleHandle("ntdll.dll");
    if (h && GetProcAddress(hntdll, "wine_get_version"))
        iswine = true;
    checked = true;
  }
  return iswine;
}

?  Or is that too gross?

(BTW I tried exporting CYGWIN=winsymlinks before running
cygwin's setup when installing from scratch, but it didn't
see to work; I would have expected /bin/cc to be installed
when I selected the 'gcc' package, but it wasn't, nor were there
any .lnk files in /bin.)

-- 
Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email
Do not reply to this email, post in Bugzilla using the
above URL to reply.
------- You are receiving this mail because: -------
You are watching all bug changes.



More information about the wine-bugs mailing list