diff options
Diffstat (limited to 'scripts/basic')
-rw-r--r-- | scripts/basic/docproc.c | 15 | ||||
-rw-r--r-- | scripts/basic/split-include.c | 13 |
2 files changed, 25 insertions, 3 deletions
diff --git a/scripts/basic/docproc.c b/scripts/basic/docproc.c index 720098a23..bfc1a9844 100644 --- a/scripts/basic/docproc.c +++ b/scripts/basic/docproc.c | |||
@@ -38,7 +38,9 @@ | |||
38 | #include <unistd.h> | 38 | #include <unistd.h> |
39 | #include <limits.h> | 39 | #include <limits.h> |
40 | #include <sys/types.h> | 40 | #include <sys/types.h> |
41 | #ifndef __MINGW32__ | ||
41 | #include <sys/wait.h> | 42 | #include <sys/wait.h> |
43 | #endif | ||
42 | //bbox disabled: #include <alloca.h> | 44 | //bbox disabled: #include <alloca.h> |
43 | 45 | ||
44 | /* exitstatus is used to keep track of any failing calls to kernel-doc, | 46 | /* exitstatus is used to keep track of any failing calls to kernel-doc, |
@@ -78,12 +80,24 @@ void usage (void) | |||
78 | */ | 80 | */ |
79 | void exec_kernel_doc(char **svec) | 81 | void exec_kernel_doc(char **svec) |
80 | { | 82 | { |
83 | #ifndef __MINGW32__ | ||
81 | pid_t pid; | 84 | pid_t pid; |
82 | int ret; | 85 | int ret; |
86 | #endif | ||
83 | char *real_filename; | 87 | char *real_filename; |
84 | int rflen; | 88 | int rflen; |
85 | 89 | ||
86 | /* Make sure output generated so far are flushed */ | 90 | /* Make sure output generated so far are flushed */ |
91 | #ifdef __MINGW32__ | ||
92 | fflush(stdout); | ||
93 | rflen = strlen(getenv("SRCTREE")); | ||
94 | rflen += strlen(KERNELDOCPATH KERNELDOC); | ||
95 | real_filename = alloca(rflen + 1); | ||
96 | strcpy(real_filename, getenv("SRCTREE")); | ||
97 | strcat(real_filename, KERNELDOCPATH KERNELDOC); | ||
98 | fprintf(stderr, "NOTIMPL: exec %s\n", real_filename); | ||
99 | exit(1); | ||
100 | #else | ||
87 | fflush(stdout); | 101 | fflush(stdout); |
88 | switch(pid=fork()) { | 102 | switch(pid=fork()) { |
89 | case -1: | 103 | case -1: |
@@ -106,6 +120,7 @@ void exec_kernel_doc(char **svec) | |||
106 | exitstatus |= WEXITSTATUS(ret); | 120 | exitstatus |= WEXITSTATUS(ret); |
107 | else | 121 | else |
108 | exitstatus = 0xff; | 122 | exitstatus = 0xff; |
123 | #endif | ||
109 | } | 124 | } |
110 | 125 | ||
111 | /* Types used to create list of all exported symbols in a number of files */ | 126 | /* Types used to create list of all exported symbols in a number of files */ |
diff --git a/scripts/basic/split-include.c b/scripts/basic/split-include.c index e328788e2..8127fe261 100644 --- a/scripts/basic/split-include.c +++ b/scripts/basic/split-include.c | |||
@@ -39,8 +39,6 @@ | |||
39 | exit(1); \ | 39 | exit(1); \ |
40 | } | 40 | } |
41 | 41 | ||
42 | |||
43 | |||
44 | int main(int argc, const char * argv []) | 42 | int main(int argc, const char * argv []) |
45 | { | 43 | { |
46 | const char * str_my_name; | 44 | const char * str_my_name; |
@@ -89,7 +87,11 @@ int main(int argc, const char * argv []) | |||
89 | /* Make output directory if needed. */ | 87 | /* Make output directory if needed. */ |
90 | if (stat(str_dir_config, &stat_buf) != 0) | 88 | if (stat(str_dir_config, &stat_buf) != 0) |
91 | { | 89 | { |
90 | #ifdef __MINGW32__ | ||
91 | if (mkdir(str_dir_config) != 0) | ||
92 | #else | ||
92 | if (mkdir(str_dir_config, 0755) != 0) | 93 | if (mkdir(str_dir_config, 0755) != 0) |
94 | #endif | ||
93 | ERROR_EXIT(str_dir_config); | 95 | ERROR_EXIT(str_dir_config); |
94 | } | 96 | } |
95 | 97 | ||
@@ -148,7 +150,12 @@ int main(int argc, const char * argv []) | |||
148 | { | 150 | { |
149 | ptarget[islash] = '\0'; | 151 | ptarget[islash] = '\0'; |
150 | if (stat(ptarget, &stat_buf) != 0 | 152 | if (stat(ptarget, &stat_buf) != 0 |
151 | && mkdir(ptarget, 0755) != 0) | 153 | #ifdef __MINGW32__ |
154 | && mkdir(ptarget) != 0 | ||
155 | #else | ||
156 | && mkdir(ptarget, 0755) != 0 | ||
157 | #endif | ||
158 | ) | ||
152 | ERROR_EXIT( ptarget ); | 159 | ERROR_EXIT( ptarget ); |
153 | ptarget[islash] = '/'; | 160 | ptarget[islash] = '/'; |
154 | } | 161 | } |