Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'winsup/cygwin/lib')
-rw-r--r--winsup/cygwin/lib/_cygwin_S_IEXEC.cc21
-rw-r--r--winsup/cygwin/lib/cygwin_crt0.c3
-rw-r--r--winsup/cygwin/lib/dll_main.cc2
-rw-r--r--winsup/cygwin/lib/getopt.c14
4 files changed, 9 insertions, 31 deletions
diff --git a/winsup/cygwin/lib/_cygwin_S_IEXEC.cc b/winsup/cygwin/lib/_cygwin_S_IEXEC.cc
deleted file mode 100644
index 371126073..000000000
--- a/winsup/cygwin/lib/_cygwin_S_IEXEC.cc
+++ /dev/null
@@ -1,21 +0,0 @@
-/* _cygwin_S_IEXEC.cc: stat helper stuff
-
- Copyright 2001 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-extern "C" {
-#include "winsup.h"
-#include <sys/stat.h>
-#include <sys/unistd.h>
-
-unsigned _cygwin_S_IEXEC = S_IEXEC;
-unsigned _cygwin_S_IXUSR = S_IXUSR;
-unsigned _cygwin_S_IXGRP = S_IXGRP;
-unsigned _cygwin_S_IXOTH = S_IXOTH;
-unsigned _cygwin_X_OK = X_OK;
-};
diff --git a/winsup/cygwin/lib/cygwin_crt0.c b/winsup/cygwin/lib/cygwin_crt0.c
index d8f781746..fb2a84b18 100644
--- a/winsup/cygwin/lib/cygwin_crt0.c
+++ b/winsup/cygwin/lib/cygwin_crt0.c
@@ -11,10 +11,9 @@ details. */
#undef __INSIDE_CYGWIN__
#include <windows.h>
#include <sys/cygwin.h>
+#include <stdlib.h>
#include "crt0.h"
-#define alloca __builtin_alloca
-
extern void dll_crt0__FP11per_process (struct per_process *) __declspec (dllimport) __attribute ((noreturn));
/* for main module */
diff --git a/winsup/cygwin/lib/dll_main.cc b/winsup/cygwin/lib/dll_main.cc
index e4486a3d8..a224a0a2f 100644
--- a/winsup/cygwin/lib/dll_main.cc
+++ b/winsup/cygwin/lib/dll_main.cc
@@ -15,7 +15,7 @@ details. */
extern "C"
BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason,
- LPVOID reserved /* Not used. */);
+ LPVOID reserved /* Not used. */);
BOOL APIENTRY
DllMain (
diff --git a/winsup/cygwin/lib/getopt.c b/winsup/cygwin/lib/getopt.c
index 12763ea9b..effa5d774 100644
--- a/winsup/cygwin/lib/getopt.c
+++ b/winsup/cygwin/lib/getopt.c
@@ -147,7 +147,7 @@ gcd(a, b)
b = c;
c = a % b;
}
-
+
return b;
}
@@ -214,7 +214,7 @@ getopt_internal(int nargc, char *const * nargv, const char *options)
* XXX re-initialize optind to 0 and have getopt_long(3)
* XXX properly function again. Work around this braindamage.
*/
- if (optind == 0)
+ if (optind == 0 && optreset == 0)
optind = 1;
if (optreset)
@@ -245,7 +245,7 @@ start:
place = EMSG;
if (IN_ORDER) {
/*
- * GNU extension:
+ * GNU extension:
* return non-option as argument to option 1
*/
optarg = nargv[optind++];
@@ -291,7 +291,7 @@ start:
}
if (optchar == 'W' && oli[1] == ';') { /* -W long-option */
/* XXX: what if no long options provided (called by getopt)? */
- if (*place)
+ if (*place)
return -2;
if (++optind >= nargc) { /* no arg */
@@ -411,7 +411,7 @@ getopt_long(int nargc, char * const *nargv, const char *options,
has_equal++;
} else
current_argv_len = strlen(current_argv);
-
+
for (i = 0; long_options[i].name; i++) {
/* find matching long option */
if (strncmp(current_argv, long_options[i].name,
@@ -436,7 +436,7 @@ getopt_long(int nargc, char * const *nargv, const char *options,
}
}
if (match != -1) { /* option found */
- if (long_options[match].has_arg == no_argument
+ if (long_options[match].has_arg == no_argument
&& has_equal) {
if (PRINT_ERROR)
warnx(noarg, (int)current_argv_len,
@@ -492,7 +492,7 @@ getopt_long(int nargc, char * const *nargv, const char *options,
if (long_options[match].flag) {
*long_options[match].flag = long_options[match].val;
retval = 0;
- } else
+ } else
retval = long_options[match].val;
if (idx)
*idx = match;