standalone-ruby 1.3 → 1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +27 -19
- data/bin/standalone-ruby +3 -3
- data/lib/data/exe_template/launcher_stub.c +35 -0
- data/lib/data/exe_template/launcher_stub.cpp +9 -0
- data/lib/data/tcc/include/_mingw.h +54 -0
- data/lib/data/tcc/include/assert.h +71 -0
- data/lib/data/tcc/include/conio.h +159 -0
- data/lib/data/tcc/include/ctype.h +232 -0
- data/lib/data/tcc/include/dir.h +26 -0
- data/lib/data/tcc/include/direct.h +95 -0
- data/lib/data/tcc/include/dirent.h +96 -0
- data/lib/data/tcc/include/dos.h +110 -0
- data/lib/data/tcc/include/errno.h +117 -0
- data/lib/data/tcc/include/excpt.h +20 -0
- data/lib/data/tcc/include/fcntl.h +135 -0
- data/lib/data/tcc/include/fenv.h +85 -0
- data/lib/data/tcc/include/float.h +224 -0
- data/lib/data/tcc/include/inttypes.h +275 -0
- data/lib/data/tcc/include/io.h +296 -0
- data/lib/data/tcc/include/limits.h +115 -0
- data/lib/data/tcc/include/locale.h +100 -0
- data/lib/data/tcc/include/malloc.h +87 -0
- data/lib/data/tcc/include/math.h +438 -0
- data/lib/data/tcc/include/mem.h +8 -0
- data/lib/data/tcc/include/memory.h +9 -0
- data/lib/data/tcc/include/process.h +158 -0
- data/lib/data/tcc/include/setjmp.h +72 -0
- data/lib/data/tcc/include/share.h +44 -0
- data/lib/data/tcc/include/signal.h +111 -0
- data/lib/data/tcc/include/stdarg.h +16 -0
- data/lib/data/tcc/include/stdbool.h +10 -0
- data/lib/data/tcc/include/stddef.h +26 -0
- data/lib/data/tcc/include/stdint.h +184 -0
- data/lib/data/tcc/include/stdio.h +413 -0
- data/lib/data/tcc/include/stdlib.h +482 -0
- data/lib/data/tcc/include/string.h +206 -0
- data/lib/data/tcc/include/sys/fcntl.h +8 -0
- data/lib/data/tcc/include/sys/file.h +9 -0
- data/lib/data/tcc/include/sys/locking.h +52 -0
- data/lib/data/tcc/include/sys/stat.h +190 -0
- data/lib/data/tcc/include/sys/time.h +3 -0
- data/lib/data/tcc/include/sys/timeb.h +82 -0
- data/lib/data/tcc/include/sys/types.h +118 -0
- data/lib/data/tcc/include/sys/unistd.h +9 -0
- data/lib/data/tcc/include/sys/utime.h +89 -0
- data/lib/data/tcc/include/tchar.h +367 -0
- data/lib/data/tcc/include/time.h +219 -0
- data/lib/data/tcc/include/unistd.h +10 -0
- data/lib/data/tcc/include/values.h +4 -0
- data/lib/data/tcc/include/varargs.h +11 -0
- data/lib/data/tcc/include/wchar.h +318 -0
- data/lib/data/tcc/include/wctype.h +127 -0
- data/lib/data/tcc/include/winapi/basetsd.h +119 -0
- data/lib/data/tcc/include/winapi/basetyps.h +144 -0
- data/lib/data/tcc/include/winapi/winbase.h +1852 -0
- data/lib/data/tcc/include/winapi/wincon.h +207 -0
- data/lib/data/tcc/include/winapi/windef.h +240 -0
- data/lib/data/tcc/include/winapi/windows.h +176 -0
- data/lib/data/tcc/include/winapi/winerror.h +1054 -0
- data/lib/data/tcc/include/winapi/wingdi.h +2843 -0
- data/lib/data/tcc/include/winapi/winnetwk.h +346 -0
- data/lib/data/tcc/include/winapi/winnls.h +651 -0
- data/lib/data/tcc/include/winapi/winnt.h +2667 -0
- data/lib/data/tcc/include/winapi/winreg.h +159 -0
- data/lib/data/tcc/include/winapi/winsvc.h +309 -0
- data/lib/data/tcc/include/winapi/winuser.h +3472 -0
- data/lib/data/tcc/include/winapi/winver.h +133 -0
- data/lib/data/tcc/lib/gdi32.def +337 -0
- data/lib/data/tcc/lib/kernel32.def +763 -0
- data/lib/data/tcc/lib/libtcc1.a +0 -0
- data/lib/data/tcc/lib/msvcrt.def +782 -0
- data/lib/data/tcc/lib/user32.def +654 -0
- data/lib/data/tcc/tcc.exe +0 -0
- data/lib/data/tcc/tiny_impdef.exe +0 -0
- data/lib/data/tcc/tiny_libmaker.exe +0 -0
- data/lib/data/vbs/default_vbs.txt +1 -1
- data/lib/data/vbs/vbs_gui.txt +1 -1
- data/lib/standalone_ruby.rb +6 -6
- data/lib/utils/config_generator.rb +5 -0
- data/lib/utils/displayer.rb +61 -56
- data/lib/utils/exe_packer.rb +68 -0
- data/lib/utils/launcher.rb +55 -14
- data/lib/utils/launcher_handler.rb +27 -4
- data/lib/utils/logger_helper.rb +24 -22
- data/lib/utils/parameter_parser.rb +206 -189
- data/lib/utils/ruby_copy.rb +26 -20
- metadata +77 -3
- data/lib/data/bat/default_bat.txt +0 -9
@@ -0,0 +1,95 @@
|
|
1
|
+
/*
|
2
|
+
* direct.h
|
3
|
+
*
|
4
|
+
* Functions for manipulating paths and directories (included from io.h)
|
5
|
+
* plus functions for setting the current drive.
|
6
|
+
*
|
7
|
+
* This file is part of the Mingw32 package.
|
8
|
+
*
|
9
|
+
* Contributors:
|
10
|
+
* Created by Colin Peters <colin@bird.fu.is.saga-u.ac.jp>
|
11
|
+
*
|
12
|
+
* THIS SOFTWARE IS NOT COPYRIGHTED
|
13
|
+
*
|
14
|
+
* This source code is offered for use in the public domain. You may
|
15
|
+
* use, modify or distribute it freely.
|
16
|
+
*
|
17
|
+
* This code is distributed in the hope that it will be useful but
|
18
|
+
* WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
|
19
|
+
* DISCLAIMED. This includes but is not limited to warranties of
|
20
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
21
|
+
*
|
22
|
+
* $Revision: 1.2 $
|
23
|
+
* $Author: bellard $
|
24
|
+
* $Date: 2005/04/17 13:14:29 $
|
25
|
+
*
|
26
|
+
*/
|
27
|
+
|
28
|
+
#ifndef __STRICT_ANSI__
|
29
|
+
|
30
|
+
#ifndef _DIRECT_H_
|
31
|
+
#define _DIRECT_H_
|
32
|
+
|
33
|
+
/* All the headers include this file. */
|
34
|
+
#include <_mingw.h>
|
35
|
+
|
36
|
+
#define __need_wchar_t
|
37
|
+
#ifndef RC_INVOKED
|
38
|
+
#include <stddef.h>
|
39
|
+
#endif /* Not RC_INVOKED */
|
40
|
+
|
41
|
+
#include <io.h>
|
42
|
+
|
43
|
+
#ifndef RC_INVOKED
|
44
|
+
|
45
|
+
#ifdef __cplusplus
|
46
|
+
extern "C" {
|
47
|
+
#endif
|
48
|
+
|
49
|
+
#ifndef _DISKFREE_T_DEFINED
|
50
|
+
/* needed by _getdiskfree (also in dos.h) */
|
51
|
+
struct _diskfree_t {
|
52
|
+
unsigned total_clusters;
|
53
|
+
unsigned avail_clusters;
|
54
|
+
unsigned sectors_per_cluster;
|
55
|
+
unsigned bytes_per_sector;
|
56
|
+
};
|
57
|
+
#define _DISKFREE_T_DEFINED
|
58
|
+
#endif
|
59
|
+
|
60
|
+
/*
|
61
|
+
* You really shouldn't be using these. Use the Win32 API functions instead.
|
62
|
+
* However, it does make it easier to port older code.
|
63
|
+
*/
|
64
|
+
int _getdrive (void);
|
65
|
+
unsigned long _getdrives(void);
|
66
|
+
int _chdrive (int);
|
67
|
+
char* _getdcwd (int, char*, int);
|
68
|
+
unsigned _getdiskfree (unsigned, struct _diskfree_t *);
|
69
|
+
|
70
|
+
#ifndef _NO_OLDNAMES
|
71
|
+
# define diskfree_t _diskfree_t
|
72
|
+
#endif
|
73
|
+
|
74
|
+
#ifndef _WDIRECT_DEFINED
|
75
|
+
/* wide character versions. Also in wchar.h */
|
76
|
+
#ifdef __MSVCRT__
|
77
|
+
int _wchdir(const wchar_t*);
|
78
|
+
wchar_t* _wgetcwd(wchar_t*, int);
|
79
|
+
wchar_t* _wgetdcwd(int, wchar_t*, int);
|
80
|
+
int _wmkdir(const wchar_t*);
|
81
|
+
int _wrmdir(const wchar_t*);
|
82
|
+
#endif /* __MSVCRT__ */
|
83
|
+
#define _WDIRECT_DEFINED
|
84
|
+
#endif
|
85
|
+
|
86
|
+
#ifdef __cplusplus
|
87
|
+
}
|
88
|
+
#endif
|
89
|
+
|
90
|
+
#endif /* Not RC_INVOKED */
|
91
|
+
|
92
|
+
#endif /* Not _DIRECT_H_ */
|
93
|
+
|
94
|
+
#endif /* Not __STRICT_ANSI__ */
|
95
|
+
|
@@ -0,0 +1,96 @@
|
|
1
|
+
/*
|
2
|
+
* DIRENT.H (formerly DIRLIB.H)
|
3
|
+
*
|
4
|
+
* by M. J. Weinstein Released to public domain 1-Jan-89
|
5
|
+
*
|
6
|
+
* Because I have heard that this feature (opendir, readdir, closedir)
|
7
|
+
* it so useful for programmers coming from UNIX or attempting to port
|
8
|
+
* UNIX code, and because it is reasonably light weight, I have included
|
9
|
+
* it in the Mingw32 package. I have also added an implementation of
|
10
|
+
* rewinddir, seekdir and telldir.
|
11
|
+
* - Colin Peters <colin@bird.fu.is.saga-u.ac.jp>
|
12
|
+
*
|
13
|
+
* This code is distributed in the hope that is will be useful but
|
14
|
+
* WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
|
15
|
+
* DISCLAIMED. This includeds but is not limited to warranties of
|
16
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
17
|
+
*
|
18
|
+
* $Revision: 1.2 $
|
19
|
+
* $Author: bellard $
|
20
|
+
* $Date: 2005/04/17 13:14:29 $
|
21
|
+
*
|
22
|
+
*/
|
23
|
+
|
24
|
+
#ifndef __STRICT_ANSI__
|
25
|
+
|
26
|
+
#ifndef _DIRENT_H_
|
27
|
+
#define _DIRENT_H_
|
28
|
+
|
29
|
+
/* All the headers include this file. */
|
30
|
+
#include <_mingw.h>
|
31
|
+
|
32
|
+
#include <io.h>
|
33
|
+
|
34
|
+
#ifndef RC_INVOKED
|
35
|
+
|
36
|
+
#ifdef __cplusplus
|
37
|
+
extern "C" {
|
38
|
+
#endif
|
39
|
+
|
40
|
+
struct dirent
|
41
|
+
{
|
42
|
+
long d_ino; /* Always zero. */
|
43
|
+
unsigned short d_reclen; /* Always zero. */
|
44
|
+
unsigned short d_namlen; /* Length of name in d_name. */
|
45
|
+
char* d_name; /* File name. */
|
46
|
+
/* NOTE: The name in the dirent structure points to the name in the
|
47
|
+
* finddata_t structure in the DIR. */
|
48
|
+
};
|
49
|
+
|
50
|
+
/*
|
51
|
+
* This is an internal data structure. Good programmers will not use it
|
52
|
+
* except as an argument to one of the functions below.
|
53
|
+
*/
|
54
|
+
typedef struct
|
55
|
+
{
|
56
|
+
/* disk transfer area for this dir */
|
57
|
+
struct _finddata_t dd_dta;
|
58
|
+
|
59
|
+
/* dirent struct to return from dir (NOTE: this makes this thread
|
60
|
+
* safe as long as only one thread uses a particular DIR struct at
|
61
|
+
* a time) */
|
62
|
+
struct dirent dd_dir;
|
63
|
+
|
64
|
+
/* _findnext handle */
|
65
|
+
long dd_handle;
|
66
|
+
|
67
|
+
/*
|
68
|
+
* Status of search:
|
69
|
+
* 0 = not started yet (next entry to read is first entry)
|
70
|
+
* -1 = off the end
|
71
|
+
* positive = 0 based index of next entry
|
72
|
+
*/
|
73
|
+
short dd_stat;
|
74
|
+
|
75
|
+
/* given path for dir with search pattern (struct is extended) */
|
76
|
+
char dd_name[1];
|
77
|
+
} DIR;
|
78
|
+
|
79
|
+
|
80
|
+
DIR* opendir (const char*);
|
81
|
+
struct dirent* readdir (DIR*);
|
82
|
+
int closedir (DIR*);
|
83
|
+
void rewinddir (DIR*);
|
84
|
+
long telldir (DIR*);
|
85
|
+
void seekdir (DIR*, long);
|
86
|
+
|
87
|
+
#ifdef __cplusplus
|
88
|
+
}
|
89
|
+
#endif
|
90
|
+
|
91
|
+
#endif /* Not RC_INVOKED */
|
92
|
+
|
93
|
+
#endif /* Not _DIRENT_H_ */
|
94
|
+
|
95
|
+
#endif /* Not __STRICT_ANSI__ */
|
96
|
+
|
@@ -0,0 +1,110 @@
|
|
1
|
+
/*
|
2
|
+
* dos.h
|
3
|
+
*
|
4
|
+
* DOS-specific functions and structures.
|
5
|
+
*
|
6
|
+
* This file is part of the Mingw32 package.
|
7
|
+
*
|
8
|
+
* Contributors:
|
9
|
+
* Created by J.J. van der Heijden <J.J.vanderHeijden@student.utwente.nl>
|
10
|
+
*
|
11
|
+
* THIS SOFTWARE IS NOT COPYRIGHTED
|
12
|
+
*
|
13
|
+
* This source code is offered for use in the public domain. You may
|
14
|
+
* use, modify or distribute it freely.
|
15
|
+
*
|
16
|
+
* This code is distributed in the hope that it will be useful but
|
17
|
+
* WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
|
18
|
+
* DISCLAIMED. This includes but is not limited to warranties of
|
19
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
20
|
+
*
|
21
|
+
* $Revision: 1.2 $
|
22
|
+
* $Author: bellard $
|
23
|
+
* $Date: 2005/04/17 13:14:29 $
|
24
|
+
*
|
25
|
+
*/
|
26
|
+
|
27
|
+
#ifndef __STRICT_ANSI__
|
28
|
+
|
29
|
+
#ifndef _DOS_H_
|
30
|
+
#define _DOS_H_
|
31
|
+
|
32
|
+
/* All the headers include this file. */
|
33
|
+
#include <_mingw.h>
|
34
|
+
|
35
|
+
#define __need_wchar_t
|
36
|
+
#ifndef RC_INVOKED
|
37
|
+
#include <stddef.h>
|
38
|
+
#endif /* Not RC_INVOKED */
|
39
|
+
|
40
|
+
/* For DOS file attributes */
|
41
|
+
#include <io.h>
|
42
|
+
|
43
|
+
#ifndef RC_INVOKED
|
44
|
+
|
45
|
+
#ifdef __cplusplus
|
46
|
+
extern "C" {
|
47
|
+
#endif
|
48
|
+
|
49
|
+
#ifndef __MSVCRT__ /* these are in CRTDLL, but not MSVCRT */
|
50
|
+
#ifndef __DECLSPEC_SUPPORTED
|
51
|
+
extern unsigned int *__imp__basemajor_dll;
|
52
|
+
extern unsigned int *__imp__baseminor_dll;
|
53
|
+
extern unsigned int *__imp__baseversion_dll;
|
54
|
+
extern unsigned int *__imp__osmajor_dll;
|
55
|
+
extern unsigned int *__imp__osminor_dll;
|
56
|
+
extern unsigned int *__imp__osmode_dll;
|
57
|
+
|
58
|
+
#define _basemajor (*__imp__basemajor_dll)
|
59
|
+
#define _baseminor (*__imp__baseminor_dll)
|
60
|
+
#define _baseversion (*__imp__baseversion_dll)
|
61
|
+
#define _osmajor (*__imp__osmajor_dll)
|
62
|
+
#define _osminor (*__imp__osminor_dll)
|
63
|
+
#define _osmode (*__imp__osmode_dll)
|
64
|
+
|
65
|
+
#else /* __DECLSPEC_SUPPORTED */
|
66
|
+
|
67
|
+
__MINGW_IMPORT unsigned int _basemajor_dll;
|
68
|
+
__MINGW_IMPORT unsigned int _baseminor_dll;
|
69
|
+
__MINGW_IMPORT unsigned int _baseversion_dll;
|
70
|
+
__MINGW_IMPORT unsigned int _osmajor_dll;
|
71
|
+
__MINGW_IMPORT unsigned int _osminor_dll;
|
72
|
+
__MINGW_IMPORT unsigned int _osmode_dll;
|
73
|
+
|
74
|
+
#define _basemajor _basemajor_dll
|
75
|
+
#define _baseminor _baseminor_dll
|
76
|
+
#define _baseversion _baseversion_dll
|
77
|
+
#define _osmajor _osmajor_dll
|
78
|
+
#define _osminor _osminor_dll
|
79
|
+
#define _osmode _osmode_dll
|
80
|
+
|
81
|
+
#endif /* __DECLSPEC_SUPPORTED */
|
82
|
+
#endif /* ! __MSVCRT__ */
|
83
|
+
|
84
|
+
#ifndef _DISKFREE_T_DEFINED
|
85
|
+
/* needed by _getdiskfree (also in direct.h) */
|
86
|
+
struct _diskfree_t {
|
87
|
+
unsigned total_clusters;
|
88
|
+
unsigned avail_clusters;
|
89
|
+
unsigned sectors_per_cluster;
|
90
|
+
unsigned bytes_per_sector;
|
91
|
+
};
|
92
|
+
#define _DISKFREE_T_DEFINED
|
93
|
+
#endif
|
94
|
+
|
95
|
+
unsigned _getdiskfree (unsigned, struct _diskfree_t *);
|
96
|
+
|
97
|
+
#ifndef _NO_OLDNAMES
|
98
|
+
# define diskfree_t _diskfree_t
|
99
|
+
#endif
|
100
|
+
|
101
|
+
#ifdef __cplusplus
|
102
|
+
}
|
103
|
+
#endif
|
104
|
+
|
105
|
+
#endif /* Not RC_INVOKED */
|
106
|
+
|
107
|
+
#endif /* Not _DOS_H_ */
|
108
|
+
|
109
|
+
#endif /* Not __STRICT_ANSI__ */
|
110
|
+
|
@@ -0,0 +1,117 @@
|
|
1
|
+
/*
|
2
|
+
* errno.h
|
3
|
+
*
|
4
|
+
* Error numbers and access to error reporting.
|
5
|
+
*
|
6
|
+
* This file is part of the Mingw32 package.
|
7
|
+
*
|
8
|
+
* Contributors:
|
9
|
+
* Created by Colin Peters <colin@bird.fu.is.saga-u.ac.jp>
|
10
|
+
*
|
11
|
+
* THIS SOFTWARE IS NOT COPYRIGHTED
|
12
|
+
*
|
13
|
+
* This source code is offered for use in the public domain. You may
|
14
|
+
* use, modify or distribute it freely.
|
15
|
+
*
|
16
|
+
* This code is distributed in the hope that it will be useful but
|
17
|
+
* WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
|
18
|
+
* DISCLAIMED. This includes but is not limited to warranties of
|
19
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
20
|
+
*
|
21
|
+
* $Revision: 1.2 $
|
22
|
+
* $Author: bellard $
|
23
|
+
* $Date: 2005/04/17 13:14:29 $
|
24
|
+
*
|
25
|
+
*/
|
26
|
+
|
27
|
+
#ifndef _ERRNO_H_
|
28
|
+
#define _ERRNO_H_
|
29
|
+
|
30
|
+
/* All the headers include this file. */
|
31
|
+
#include <_mingw.h>
|
32
|
+
|
33
|
+
/*
|
34
|
+
* Error numbers.
|
35
|
+
* TODO: Can't be sure of some of these assignments, I guessed from the
|
36
|
+
* names given by strerror and the defines in the Cygnus errno.h. A lot
|
37
|
+
* of the names from the Cygnus errno.h are not represented, and a few
|
38
|
+
* of the descriptions returned by strerror do not obviously match
|
39
|
+
* their error naming.
|
40
|
+
*/
|
41
|
+
#define EPERM 1 /* Operation not permitted */
|
42
|
+
#define ENOFILE 2 /* No such file or directory */
|
43
|
+
#define ENOENT 2
|
44
|
+
#define ESRCH 3 /* No such process */
|
45
|
+
#define EINTR 4 /* Interrupted function call */
|
46
|
+
#define EIO 5 /* Input/output error */
|
47
|
+
#define ENXIO 6 /* No such device or address */
|
48
|
+
#define E2BIG 7 /* Arg list too long */
|
49
|
+
#define ENOEXEC 8 /* Exec format error */
|
50
|
+
#define EBADF 9 /* Bad file descriptor */
|
51
|
+
#define ECHILD 10 /* No child processes */
|
52
|
+
#define EAGAIN 11 /* Resource temporarily unavailable */
|
53
|
+
#define ENOMEM 12 /* Not enough space */
|
54
|
+
#define EACCES 13 /* Permission denied */
|
55
|
+
#define EFAULT 14 /* Bad address */
|
56
|
+
/* 15 - Unknown Error */
|
57
|
+
#define EBUSY 16 /* strerror reports "Resource device" */
|
58
|
+
#define EEXIST 17 /* File exists */
|
59
|
+
#define EXDEV 18 /* Improper link (cross-device link?) */
|
60
|
+
#define ENODEV 19 /* No such device */
|
61
|
+
#define ENOTDIR 20 /* Not a directory */
|
62
|
+
#define EISDIR 21 /* Is a directory */
|
63
|
+
#define EINVAL 22 /* Invalid argument */
|
64
|
+
#define ENFILE 23 /* Too many open files in system */
|
65
|
+
#define EMFILE 24 /* Too many open files */
|
66
|
+
#define ENOTTY 25 /* Inappropriate I/O control operation */
|
67
|
+
/* 26 - Unknown Error */
|
68
|
+
#define EFBIG 27 /* File too large */
|
69
|
+
#define ENOSPC 28 /* No space left on device */
|
70
|
+
#define ESPIPE 29 /* Invalid seek (seek on a pipe?) */
|
71
|
+
#define EROFS 30 /* Read-only file system */
|
72
|
+
#define EMLINK 31 /* Too many links */
|
73
|
+
#define EPIPE 32 /* Broken pipe */
|
74
|
+
#define EDOM 33 /* Domain error (math functions) */
|
75
|
+
#define ERANGE 34 /* Result too large (possibly too small) */
|
76
|
+
/* 35 - Unknown Error */
|
77
|
+
#define EDEADLOCK 36 /* Resource deadlock avoided (non-Cyg) */
|
78
|
+
#define EDEADLK 36
|
79
|
+
/* 37 - Unknown Error */
|
80
|
+
#define ENAMETOOLONG 38 /* Filename too long (91 in Cyg?) */
|
81
|
+
#define ENOLCK 39 /* No locks available (46 in Cyg?) */
|
82
|
+
#define ENOSYS 40 /* Function not implemented (88 in Cyg?) */
|
83
|
+
#define ENOTEMPTY 41 /* Directory not empty (90 in Cyg?) */
|
84
|
+
#define EILSEQ 42 /* Illegal byte sequence */
|
85
|
+
|
86
|
+
/*
|
87
|
+
* NOTE: ENAMETOOLONG and ENOTEMPTY conflict with definitions in the
|
88
|
+
* sockets.h header provided with windows32api-0.1.2.
|
89
|
+
* You should go and put an #if 0 ... #endif around the whole block
|
90
|
+
* of errors (look at the comment above them).
|
91
|
+
*/
|
92
|
+
|
93
|
+
#ifndef RC_INVOKED
|
94
|
+
|
95
|
+
#ifdef __cplusplus
|
96
|
+
extern "C" {
|
97
|
+
#endif
|
98
|
+
|
99
|
+
/*
|
100
|
+
* Definitions of errno. For _doserrno, sys_nerr and * sys_errlist, see
|
101
|
+
* stdlib.h.
|
102
|
+
*/
|
103
|
+
#ifdef _UWIN
|
104
|
+
#undef errno
|
105
|
+
extern int errno;
|
106
|
+
#else
|
107
|
+
int* _errno(void);
|
108
|
+
#define errno (*_errno())
|
109
|
+
#endif
|
110
|
+
|
111
|
+
#ifdef __cplusplus
|
112
|
+
}
|
113
|
+
#endif
|
114
|
+
|
115
|
+
#endif /* Not RC_INVOKED */
|
116
|
+
|
117
|
+
#endif /* Not _ERRNO_H_ */
|
@@ -0,0 +1,20 @@
|
|
1
|
+
#ifndef _EXCPT_H
|
2
|
+
#define _EXCPT_H
|
3
|
+
#if __GNUC__ >=3
|
4
|
+
#pragma GCC system_header
|
5
|
+
#endif
|
6
|
+
|
7
|
+
/* FIXME: This will make some code compile. The programs will most
|
8
|
+
likely crash when an exception is raised, but at least they will
|
9
|
+
compile. */
|
10
|
+
#ifdef __GNUC__
|
11
|
+
#define __try
|
12
|
+
#define __except(x) if (0) /* don't execute handler */
|
13
|
+
#define __finally
|
14
|
+
|
15
|
+
#define _try __try
|
16
|
+
#define _except __except
|
17
|
+
#define _finally __finally
|
18
|
+
#endif
|
19
|
+
|
20
|
+
#endif
|
@@ -0,0 +1,135 @@
|
|
1
|
+
/*
|
2
|
+
* fcntl.h
|
3
|
+
*
|
4
|
+
* Access constants for _open. Note that the permissions constants are
|
5
|
+
* in sys/stat.h (ick).
|
6
|
+
*
|
7
|
+
* This code is part of the Mingw32 package.
|
8
|
+
*
|
9
|
+
* Contributors:
|
10
|
+
* Created by Colin Peters <colin@bird.fu.is.saga-u.ac.jp>
|
11
|
+
*
|
12
|
+
* THIS SOFTWARE IS NOT COPYRIGHTED
|
13
|
+
*
|
14
|
+
* This source code is offered for use in the public domain. You may
|
15
|
+
* use, modify or distribute it freely.
|
16
|
+
*
|
17
|
+
* This code is distributed in the hope that it will be useful but
|
18
|
+
* WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
|
19
|
+
* DISCLAIMED. This includes but is not limited to warranties of
|
20
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
21
|
+
*
|
22
|
+
* $Revision: 1.2 $
|
23
|
+
* $Author: bellard $
|
24
|
+
* $Date: 2005/04/17 13:14:29 $
|
25
|
+
*
|
26
|
+
*/
|
27
|
+
|
28
|
+
#ifndef __STRICT_ANSI__
|
29
|
+
|
30
|
+
#ifndef _FCNTL_H_
|
31
|
+
#define _FCNTL_H_
|
32
|
+
|
33
|
+
/* All the headers include this file. */
|
34
|
+
#include <_mingw.h>
|
35
|
+
|
36
|
+
/*
|
37
|
+
* It appears that fcntl.h should include io.h for compatibility...
|
38
|
+
*/
|
39
|
+
#include <io.h>
|
40
|
+
|
41
|
+
/* Specifiy one of these flags to define the access mode. */
|
42
|
+
#define _O_RDONLY 0
|
43
|
+
#define _O_WRONLY 1
|
44
|
+
#define _O_RDWR 2
|
45
|
+
|
46
|
+
/* Mask for access mode bits in the _open flags. */
|
47
|
+
#define _O_ACCMODE (_O_RDONLY|_O_WRONLY|_O_RDWR)
|
48
|
+
|
49
|
+
#define _O_APPEND 0x0008 /* Writes will add to the end of the file. */
|
50
|
+
|
51
|
+
#define _O_RANDOM 0x0010
|
52
|
+
#define _O_SEQUENTIAL 0x0020
|
53
|
+
#define _O_TEMPORARY 0x0040 /* Make the file dissappear after closing.
|
54
|
+
* WARNING: Even if not created by _open! */
|
55
|
+
#define _O_NOINHERIT 0x0080
|
56
|
+
|
57
|
+
#define _O_CREAT 0x0100 /* Create the file if it does not exist. */
|
58
|
+
#define _O_TRUNC 0x0200 /* Truncate the file if it does exist. */
|
59
|
+
#define _O_EXCL 0x0400 /* Open only if the file does not exist. */
|
60
|
+
|
61
|
+
/* NOTE: Text is the default even if the given _O_TEXT bit is not on. */
|
62
|
+
#define _O_TEXT 0x4000 /* CR-LF in file becomes LF in memory. */
|
63
|
+
#define _O_BINARY 0x8000 /* Input and output is not translated. */
|
64
|
+
#define _O_RAW _O_BINARY
|
65
|
+
|
66
|
+
#ifndef _NO_OLDNAMES
|
67
|
+
|
68
|
+
/* POSIX/Non-ANSI names for increased portability */
|
69
|
+
#define O_RDONLY _O_RDONLY
|
70
|
+
#define O_WRONLY _O_WRONLY
|
71
|
+
#define O_RDWR _O_RDWR
|
72
|
+
#define O_ACCMODE _O_ACCMODE
|
73
|
+
#define O_APPEND _O_APPEND
|
74
|
+
#define O_CREAT _O_CREAT
|
75
|
+
#define O_TRUNC _O_TRUNC
|
76
|
+
#define O_EXCL _O_EXCL
|
77
|
+
#define O_TEXT _O_TEXT
|
78
|
+
#define O_BINARY _O_BINARY
|
79
|
+
#define O_TEMPORARY _O_TEMPORARY
|
80
|
+
#define O_NOINHERIT _O_NOINHERIT
|
81
|
+
#define O_SEQENTIAL _O_SEQUENTIAL
|
82
|
+
#define O_RANDOM _O_RANDOM
|
83
|
+
|
84
|
+
#endif /* Not _NO_OLDNAMES */
|
85
|
+
|
86
|
+
|
87
|
+
#ifndef RC_INVOKED
|
88
|
+
|
89
|
+
/*
|
90
|
+
* This variable determines the default file mode.
|
91
|
+
* TODO: Which flags work?
|
92
|
+
*/
|
93
|
+
#ifndef __DECLSPEC_SUPPORTED
|
94
|
+
|
95
|
+
#ifdef __MSVCRT__
|
96
|
+
extern unsigned int* __imp__fmode;
|
97
|
+
#define _fmode (*__imp__fmode)
|
98
|
+
#else
|
99
|
+
/* CRTDLL */
|
100
|
+
extern unsigned int* __imp__fmode_dll;
|
101
|
+
#define _fmode (*__imp__fmode_dll)
|
102
|
+
#endif
|
103
|
+
|
104
|
+
#else /* __DECLSPEC_SUPPORTED */
|
105
|
+
|
106
|
+
#ifdef __MSVCRT__
|
107
|
+
__MINGW_IMPORT unsigned int _fmode;
|
108
|
+
#else /* ! __MSVCRT__ */
|
109
|
+
__MINGW_IMPORT unsigned int _fmode_dll;
|
110
|
+
#define _fmode _fmode_dll
|
111
|
+
#endif /* ! __MSVCRT__ */
|
112
|
+
|
113
|
+
#endif /* __DECLSPEC_SUPPORTED */
|
114
|
+
|
115
|
+
|
116
|
+
#ifdef __cplusplus
|
117
|
+
extern "C" {
|
118
|
+
#endif
|
119
|
+
|
120
|
+
int _setmode (int, int);
|
121
|
+
|
122
|
+
#ifndef _NO_OLDNAMES
|
123
|
+
int setmode (int, int);
|
124
|
+
#endif /* Not _NO_OLDNAMES */
|
125
|
+
|
126
|
+
#ifdef __cplusplus
|
127
|
+
}
|
128
|
+
#endif
|
129
|
+
|
130
|
+
#endif /* Not RC_INVOKED */
|
131
|
+
|
132
|
+
#endif /* Not _FCNTL_H_ */
|
133
|
+
|
134
|
+
#endif /* Not __STRICT_ANSI__ */
|
135
|
+
|
@@ -0,0 +1,85 @@
|
|
1
|
+
#ifndef _FENV_H
|
2
|
+
#define _FENV_H
|
3
|
+
|
4
|
+
/*
|
5
|
+
For now, support only for the basic abstraction of flags that are
|
6
|
+
either set or clear. fexcept_t could be structure that holds more info
|
7
|
+
about the fp environment.
|
8
|
+
*/
|
9
|
+
typedef unsigned short fexcept_t;
|
10
|
+
|
11
|
+
/* This 28-byte struct represents the entire floating point
|
12
|
+
environment as stored by fnstenv or fstenv */
|
13
|
+
typedef struct
|
14
|
+
{
|
15
|
+
unsigned short __control_word;
|
16
|
+
unsigned short __unused0;
|
17
|
+
unsigned short __status_word;
|
18
|
+
unsigned short __unused1;
|
19
|
+
unsigned short __tag_word;
|
20
|
+
unsigned short __unused2;
|
21
|
+
unsigned int __ip_offset; /* instruction pointer offset */
|
22
|
+
unsigned short __ip_selector;
|
23
|
+
unsigned short __opcode;
|
24
|
+
unsigned int __data_offset;
|
25
|
+
unsigned short __data_selector;
|
26
|
+
unsigned short __unused3;
|
27
|
+
} fenv_t;
|
28
|
+
|
29
|
+
|
30
|
+
/* FPU status word exception flags */
|
31
|
+
#define FE_INVALID 0x01
|
32
|
+
#define FE_DENORMAL 0x02
|
33
|
+
#define FE_DIVBYZERO 0x04
|
34
|
+
#define FE_OVERFLOW 0x08
|
35
|
+
#define FE_UNDERFLOW 0x10
|
36
|
+
#define FE_INEXACT 0x20
|
37
|
+
#define FE_ALL_EXCEPT (FE_INVALID | FE_DENORMAL | FE_DIVBYZERO \
|
38
|
+
| FE_OVERFLOW | FE_UNDERFLOW | FE_INEXACT)
|
39
|
+
|
40
|
+
/* FPU control word rounding flags */
|
41
|
+
#define FE_TONEAREST 0x0000
|
42
|
+
#define FE_DOWNWARD 0x0400
|
43
|
+
#define FE_UPWARD 0x0800
|
44
|
+
#define FE_TOWARDZERO 0x0c00
|
45
|
+
|
46
|
+
|
47
|
+
/* The default floating point environment */
|
48
|
+
#define FE_DFL_ENV ((const fenv_t *)-1)
|
49
|
+
|
50
|
+
|
51
|
+
#ifndef RC_INVOKED
|
52
|
+
#ifdef __cplusplus
|
53
|
+
extern "C" {
|
54
|
+
#endif
|
55
|
+
|
56
|
+
|
57
|
+
/*TODO: Some of these could be inlined */
|
58
|
+
/* 7.6.2 Exception */
|
59
|
+
|
60
|
+
extern int feclearexcept (int);
|
61
|
+
extern int fegetexceptflag (fexcept_t * flagp, int excepts);
|
62
|
+
extern int feraiseexcept (int excepts );
|
63
|
+
extern int fesetexceptflag (const fexcept_t *, int);
|
64
|
+
extern int fetestexcept (int excepts);
|
65
|
+
|
66
|
+
|
67
|
+
/* 7.6.3 Rounding */
|
68
|
+
|
69
|
+
extern int fegetround (void);
|
70
|
+
extern int fesetround (int mode);
|
71
|
+
|
72
|
+
|
73
|
+
/* 7.6.4 Environment */
|
74
|
+
|
75
|
+
extern int fegetenv (fenv_t * envp);
|
76
|
+
extern int fesetenv (const fenv_t * );
|
77
|
+
extern int feupdateenv (const fenv_t *);
|
78
|
+
extern int feholdexcept (fenv_t *);
|
79
|
+
|
80
|
+
#ifdef __cplusplus
|
81
|
+
}
|
82
|
+
#endif
|
83
|
+
#endif /* Not RC_INVOKED */
|
84
|
+
|
85
|
+
#endif /* ndef _FENV_H */
|