aboutsummaryrefslogtreecommitdiff
path: root/lib/cpluff/Issues.txt
blob: 458983f1bb20efa3f80823b0c170411c205415e0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
KNOWN ISSUES
============


cpfile does not rezognize directories when compiled with MinGW
--------------------------------------------------------------

(Thu,  5 Apr 2007 06:58:32 +0300)

MinGW cross-compiled version of cpfile example application does not
recognize special files (directories) although the support is in place.
Reason for the problem is not known. The related source code is in
examples/cpfile/plugins/special/special.c. The following test code
works fine when cross-compiled with MinGW.

- clip -
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include <stdio.h>
#include <windows.h>

int main(int argc, char *argv[]) {
    int i;

    for (i = 1; i < argc; i++) {
        struct stat s;

        printf("%s: ", argv[i]);
        if (stat(argv[i], &s)) {
            fflush(stdout);
            perror("stat failed");
        } else {
            if (S_ISDIR(s.st_mode)) {
                fputs("is directory\n", stdout);
            } else {
                fputs("is not directory\n", stdout);
            }
        }
    }
    return 0;
}
- clip -