This is the mail archive of the cygwin-apps mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[maybe-ITP] gamin


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Lapo,

Thanks for the patch.  Please test 0.1.7:

ftp://sunsite.dk/projects/cygwinports/release/gamin/gamin-0.1.7-1-src.tar.bz2
ftp://sunsite.dk/projects/cygwinports/release/gamin/gamin-0.1.7-1.tar.bz2
ftp://sunsite.dk/projects/cygwinports/release/gamin/gamin-devel/gamin-devel-0.1.7-1.tar.bz2
ftp://sunsite.dk/projects/cygwinports/release/gamin/gamin-devel/setup.hint
ftp://sunsite.dk/projects/cygwinports/release/gamin/pygamin/pygamin-0.1.7-1.tar.bz2
ftp://sunsite.dk/projects/cygwinports/release/gamin/pygamin/setup.hint
ftp://sunsite.dk/projects/cygwinports/release/gamin/setup.hint

I've changed gamin_check_not_fat to handle the lack of GetVolumePathName
on some versions (I hope); but I'm not sure how to handle NT4 on FAT.

#ifdef __CYGWIN__

#include <sys/cygwin.h>
/* FIXME: #define WIN32_LEAN_AND_MEAN ?? */
#define _WIN32_WINNT 0x0500
#include <windows.h>

#endif  /* __CYGWIN__ */

/**
 * gamin_check_not_fat:
 *
 * On Cygwin, check if socket dir is on not a FAT drive.  This is
 * necessary because gamin_check_secure_{dir,path} check permissions,
 * and FAT drives do not have a permissions model; everything is 755.
 *
 * On other platforms, we assume that the socket dir is not on FAT.
 *
 * Returns 1 if <b>not</b> on a FAT drive, 0 if on FAT, -1 in case of error.
 */
static int
gamin_check_not_fat (void)
{
#ifdef __CYGWIN__
  OSVERSIONINFO osvi;
  const char *cygpath;
  char winpath[256];
  char rootdir[256];
  char volname[256];
  char fsname[256];
  DWORD sernum = 0;
  DWORD maxlen = 0;
  DWORD flags = 0;

  osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
  GetVersionEx(&osvi);

  if (osvi.dwPlatformId == 1)   /* VER_PLATFORM_WIN32_WINDOWS */
    {
      return 0;      /* Win9x/Me, must be FAT */
    }

  cygpath = gamin_get_socket_dir();

  cygwin_conv_to_full_win32_path (cygpath, winpath);
  if (!GetVolumePathName(winpath, rootdir, 256))
    {
      fprintf (stderr, "GetVolumePathName: %d\n", GetLastError ());
      return -1;
    }
  if (!GetVolumeInformation (rootdir, volname, 256, &sernum,
                             &maxlen, &flags, fsname, 256))
    {
      fprintf (stderr, "GetVolumeInformation: %d\n", GetLastError ());
      return -1;
    }
  if (strncmp(fsname, "FAT", 3) == 0)
    {
      return 0;
    }
#endif  /* __CYGWIN__ */
  return 1;
}


Yaakov

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFD/kzjpiWmPGlmQSMRApKfAJ42267wRhgRRAXNLoD6OFXyZVeWJQCgykY0
ZmxIPEyzVua/Xzy8HdfY9iE=
=87zX
-----END PGP SIGNATURE-----


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]