This is the mail archive of the cygwin 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]

GetDriveType on gnulib

Hi Eric Blake,

this portion of your gnulib code

#ifdef __CYGWIN__
#include <windows.h>
#define ME_REMOTE me_remote
/* All cygwin mount points include `:' or start with `//'; so it
   requires a native Windows call to determine remote disks.  */
static int
me_remote (char const *fs_name, char const *fs_type _GL_UNUSED)
    if (fs_name[0] && fs_name[1] == ':')
        char drive[4];
        sprintf (drive, "%c:\\", fs_name[0]);
        switch (GetDriveType (drive))
        case DRIVE_REMOVABLE:
        case DRIVE_FIXED:
        case DRIVE_CDROM:
        case DRIVE_RAMDISK:
            return 0;
    return 1;

has been reused on midnight commander 4.8.x , but on cygwin-1.7.11,
the  #include <windows.h> is causing:

CC libmcfilemanager_la-mountlist.lo
In file included from /usr/lib/gcc/i686-pc-cygwin/4.5.3/../../../../include/w32api/objbase.h:73:0,
from /usr/lib/gcc/i686-pc-cygwin/4.5.3/../../../../include/w32api/ole2.h:9,
from /usr/lib/gcc/i686-pc-cygwin/4.5.3/../../../../include/w32api/windows.h:114,
from /pub/devel/mc/mc-
/usr/lib/gcc/i686-pc-cygwin/4.5.3/../../../../include/w32api/objidl.h:95:3: error: expected identifier or '(' before string constant
/pub/devel/mc/mc- error: expected ';', ',' or ')' before '_GL_UNUSED'
/pub/devel/mc/mc- In function 'read_file_system_list':

idea about the possible culprit ?


-- Problem reports: FAQ: Documentation: Unsubscribe info:

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