summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/include
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2003-09-10 19:13:05 +0000
committerCorinna Vinschen <corinna@vinschen.de>2003-09-10 19:13:05 +0000
commit932a40e86b8472fb8881a71ef8f139a6ba9d0e42 (patch)
treec2e9b265e2faab499e00d5a71c453dfecab22f6e /winsup/cygwin/include
parent6d2d2bce720d5c455b77f1139d623ccca8a924e8 (diff)
downloadcygnal-932a40e86b8472fb8881a71ef8f139a6ba9d0e42.tar.gz
cygnal-932a40e86b8472fb8881a71ef8f139a6ba9d0e42.tar.bz2
cygnal-932a40e86b8472fb8881a71ef8f139a6ba9d0e42.zip
* Makefile.in (DLL_OFILES): Add getopt.o and iruserok.o.
* cygwin.din: Export __check_rhosts_file, __rcmd_errstr, optarg, opterr, optind, optopt, optreset, getopt, getopt_long, iruserok and ruserok. * getopt.c: Moved from lib to here. Define opt* variables as dllexport. * iruserok.c: Moved from lib to here. Rearrange function order. Prefer using 64/32 bit functions. * syscalls.cc (shell_fp): Define as struct __sFILE64. (getusershell): Use fopen64 instead of fopen. * winsup.h: Add declarations for seteuid32, fopen64, cygwin_gethostbyname and cygwin_inet_addr. * include/getopt.h: Declare opt* variables dllimport. * include/cygwin/version.h: Bump API minor number.
Diffstat (limited to 'winsup/cygwin/include')
-rw-r--r--winsup/cygwin/include/cygwin/version.h4
-rw-r--r--winsup/cygwin/include/getopt.h12
2 files changed, 10 insertions, 6 deletions
diff --git a/winsup/cygwin/include/cygwin/version.h b/winsup/cygwin/include/cygwin/version.h
index c37f52910..1c92343d9 100644
--- a/winsup/cygwin/include/cygwin/version.h
+++ b/winsup/cygwin/include/cygwin/version.h
@@ -217,13 +217,15 @@ details. */
92: Export getusershell, setusershell, endusershell
93: Export daemon, forkpty, openpty, iruserok, ruserok, login_tty,
openpty, forkpty, revoke, logwtmp, updwtmp
+ 94: Export getopt, getopt_long, optarg, opterr, optind, optopt,
+ optreset, __check_rhosts_file, __rcmd_errstr.
*/
/* Note that we forgot to bump the api for ualarm, strtoll, strtoull */
#define CYGWIN_VERSION_API_MAJOR 0
-#define CYGWIN_VERSION_API_MINOR 93
+#define CYGWIN_VERSION_API_MINOR 94
/* There is also a compatibity version number associated with the
shared memory regions. It is incremented when incompatible
diff --git a/winsup/cygwin/include/getopt.h b/winsup/cygwin/include/getopt.h
index 6b6f643b7..ba095ba2f 100644
--- a/winsup/cygwin/include/getopt.h
+++ b/winsup/cygwin/include/getopt.h
@@ -38,11 +38,13 @@
extern "C" {
#endif
-extern int opterr; /* if error message should be printed */
-extern int optind; /* index into parent argv vector */
-extern int optopt; /* character checked for validity */
-extern int optreset; /* reset getopt */
-extern char *optarg; /* argument associated with option */
+#ifndef __INSIDE_CYGWIN__
+extern int __declspec(dllimport) opterr; /* if error message should be printed */
+extern int __declspec(dllimport) optind; /* index into parent argv vector */
+extern int __declspec(dllimport) optopt; /* character checked for validity */
+extern int __declspec(dllimport) optreset; /* reset getopt */
+extern char __declspec(dllimport) *optarg; /* argument associated with option */
+#endif
int getopt (int, char * const *, const char *);