aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2001-10-13 01:35:15 +0000
committerChristopher Faylor <me@cgf.cx>2001-10-13 01:35:15 +0000
commitbc6ed5498655ea0e2cc4f0748ad8311e803d5b71 (patch)
treed5aa1cd43a0d4af104f86cdfeeef6d21d8c291ae
parentcb1826572ce94eabfa1e4b5e8737fad188a55048 (diff)
downloadnewlib-bc6ed5498655ea0e2cc4f0748ad8311e803d5b71.zip
newlib-bc6ed5498655ea0e2cc4f0748ad8311e803d5b71.tar.gz
newlib-bc6ed5498655ea0e2cc4f0748ad8311e803d5b71.tar.bz2
* autoload.cc (wsock_init): Reorganize slightly to accomodate a new compiler.
-rw-r--r--winsup/cygwin/ChangeLog5
-rw-r--r--winsup/cygwin/autoload.cc2
-rw-r--r--winsup/cygwin/exceptions.cc4
-rw-r--r--winsup/cygwin/fhandler_console.cc2
-rw-r--r--winsup/cygwin/fhandler_socket.cc2
-rw-r--r--winsup/cygwin/grp.cc2
-rw-r--r--winsup/cygwin/localtime.cc2
-rw-r--r--winsup/cygwin/net.cc2
-rw-r--r--winsup/cygwin/passwd.cc2
-rw-r--r--winsup/cygwin/strace.cc2
-rw-r--r--winsup/cygwin/uinfo.cc6
-rw-r--r--winsup/cygwin/window.cc2
12 files changed, 19 insertions, 14 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index fa782b7..91562c3 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,3 +1,8 @@
+2001-10-12 Christopher Faylor <cgf@redhat.com>
+
+ * autoload.cc (wsock_init): Reorganize slightly to accomodate a new
+ compiler.
+
2001-10-11 Egor Duda <deo@logos-m.ru>
* net.cc (cygwin_sendto): Use correct socket address when sending
diff --git a/winsup/cygwin/autoload.cc b/winsup/cygwin/autoload.cc
index d1cbd59..5ae8e1c 100644
--- a/winsup/cygwin/autoload.cc
+++ b/winsup/cygwin/autoload.cc
@@ -244,7 +244,6 @@ wsock_init ()
extern WSADATA wsadata;
struct func_info *func = (struct func_info *) __builtin_return_address (0);
struct dll_info *dll = func->dll;
- retchain ret;
__asm__ (" \n\
.section .ws2_32_info \n\
@@ -293,6 +292,7 @@ wsock_init ()
movl $dll_chain1,4(%ebp) \n\
");
+ volatile retchain ret;
/* Set "arguments for dll_chain1. */
ret.low = (long) dll_func_load;
ret.high = (long) func;
diff --git a/winsup/cygwin/exceptions.cc b/winsup/cygwin/exceptions.cc
index e3d3c45..9fd018e 100644
--- a/winsup/cygwin/exceptions.cc
+++ b/winsup/cygwin/exceptions.cc
@@ -49,11 +49,11 @@ static NO_COPY muto *mask_sync = NULL;
HMODULE NO_COPY cygwin_hmodule;
-static const struct
+NO_COPY static struct
{
unsigned int code;
const char *name;
-} status_info[] NO_COPY =
+} status_info[] =
{
#define X(s) s, #s
{ X (STATUS_ABANDONED_WAIT_0) },
diff --git a/winsup/cygwin/fhandler_console.cc b/winsup/cygwin/fhandler_console.cc
index 3756ad2..d9f8cac 100644
--- a/winsup/cygwin/fhandler_console.cc
+++ b/winsup/cygwin/fhandler_console.cc
@@ -1647,7 +1647,7 @@ fhandler_console::write (const void *vsrc, size_t len)
static struct {
int vk;
const char *val[4];
-} const keytable[] NO_COPY = {
+} keytable[] NO_COPY = {
/* NORMAL */ /* SHIFT */ /* CTRL */ /* ALT */
{VK_LEFT, {"\033[D", "\033[D", "\033[D", "\033\033[D"}},
{VK_RIGHT, {"\033[C", "\033[C", "\033[C", "\033\033[C"}},
diff --git a/winsup/cygwin/fhandler_socket.cc b/winsup/cygwin/fhandler_socket.cc
index 01feff3..4711189 100644
--- a/winsup/cygwin/fhandler_socket.cc
+++ b/winsup/cygwin/fhandler_socket.cc
@@ -198,7 +198,7 @@ fhandler_socket::fixup_after_fork (HANDLE parent)
}
if (new_sock != INVALID_SOCKET && ws2_32_handle)
{
- debug_printf ("WSASocket went fine");
+ debug_printf ("WSASocket went fine %p", new_sock);
set_io_handle ((HANDLE) new_sock);
}
else
diff --git a/winsup/cygwin/grp.cc b/winsup/cygwin/grp.cc
index 87cc4b4..e2b0648 100644
--- a/winsup/cygwin/grp.cc
+++ b/winsup/cygwin/grp.cc
@@ -198,7 +198,7 @@ read_etc_group ()
debug_printf ("Failed to get local admins group name. %E");
}
- snprintf (linebuf, sizeof (linebuf), "%s::%u:\n", group_name, DEFAULT_GID);
+ snprintf (linebuf, sizeof (linebuf), "%s::%u:\n", group_name, (unsigned) DEFAULT_GID);
add_grp_line (linebuf);
group_state = emulated;
}
diff --git a/winsup/cygwin/localtime.cc b/winsup/cygwin/localtime.cc
index 43c64ce..4f4e54e 100644
--- a/winsup/cygwin/localtime.cc
+++ b/winsup/cygwin/localtime.cc
@@ -501,7 +501,7 @@ struct tzhead {
static char wildabbr[] NO_COPY = WILDABBR;
-static const char gmt[] NO_COPY = "GMT";
+static char gmt[] NO_COPY = "GMT";
struct ttinfo { /* time type information */
long tt_gmtoff; /* UTC offset in seconds */
diff --git a/winsup/cygwin/net.cc b/winsup/cygwin/net.cc
index d32cfc1..94b37c3 100644
--- a/winsup/cygwin/net.cc
+++ b/winsup/cygwin/net.cc
@@ -356,7 +356,7 @@ __set_winsock_errno (const char *fn, int ln)
* Since the member `s' isn't used for debug output we can use it
* for the error text returned by herror and hstrerror.
*/
-const static NO_COPY struct tl host_errmap[] =
+static NO_COPY struct tl host_errmap[] =
{
{WSAHOST_NOT_FOUND, "Unknown host", HOST_NOT_FOUND},
{WSATRY_AGAIN, "Host name lookup failure", TRY_AGAIN},
diff --git a/winsup/cygwin/passwd.cc b/winsup/cygwin/passwd.cc
index 2f52473..833964a 100644
--- a/winsup/cygwin/passwd.cc
+++ b/winsup/cygwin/passwd.cc
@@ -170,7 +170,7 @@ read_etc_passwd ()
{
debug_printf ("Emulating /etc/passwd");
snprintf (linebuf, sizeof (linebuf), "%s::%u:%u::%s:/bin/sh", cygheap->user.name (),
- DEFAULT_UID, DEFAULT_GID, getenv ("HOME") ?: "/");
+ (unsigned) DEFAULT_UID, (unsigned) DEFAULT_GID, getenv ("HOME") ?: "/");
add_pwd_line (linebuf);
passwd_state = emulated;
}
diff --git a/winsup/cygwin/strace.cc b/winsup/cygwin/strace.cc
index 7ffea85..b7e0a2a 100644
--- a/winsup/cygwin/strace.cc
+++ b/winsup/cygwin/strace.cc
@@ -229,7 +229,7 @@ strace_printf (unsigned category, const char *func, const char *fmt, ...)
}
}
-static NO_COPY const struct tab
+static NO_COPY struct tab
{
int v;
const char *n;
diff --git a/winsup/cygwin/uinfo.cc b/winsup/cygwin/uinfo.cc
index bed8ba9..d12d254 100644
--- a/winsup/cygwin/uinfo.cc
+++ b/winsup/cygwin/uinfo.cc
@@ -59,7 +59,7 @@ internal_getlogin (cygheap_user &user)
if (user.name () && user.domain ())
debug_printf ("User: %s, Domain: %s, Logon Server: %s",
user.name (), user.domain (), user.logsrv ());
- else if (!(ret = NetWkstaUserGetInfo (NULL, 1, (LPBYTE *)&wui)))
+ else if (!(ret = NetWkstaUserGetInfo (NULL, 1, (LPBYTE *) &wui)))
{
sys_wcstombs (buf, wui->wkui1_username, UNLEN + 1);
user.set_name (buf);
@@ -78,17 +78,17 @@ internal_getlogin (cygheap_user &user)
}
LPUSER_INFO_3 ui = NULL;
WCHAR wuser[UNLEN + 1];
- WCHAR wlogsrv[INTERNET_MAX_HOST_NAME_LENGTH + 3];
/* HOMEDRIVE and HOMEPATH are wrong most of the time, too,
after changing user context! */
sys_mbstowcs (wuser, user.name (), UNLEN + 1);
if (NetUserGetInfo (NULL, wuser, 3, (LPBYTE *) &ui) && user.logsrv ())
{
+ WCHAR wlogsrv[INTERNET_MAX_HOST_NAME_LENGTH + 3];
strcat (strcpy (buf, "\\\\"), user.logsrv ());
sys_mbstowcs (wlogsrv, buf, INTERNET_MAX_HOST_NAME_LENGTH + 3);
ui = NULL;
- if (NetUserGetInfo (wlogsrv, wuser, 3,(LPBYTE *) &ui))
+ if (NetUserGetInfo (wlogsrv, wuser, 3, (LPBYTE *) &ui))
ui = NULL;
}
if (ui)
diff --git a/winsup/cygwin/window.cc b/winsup/cygwin/window.cc
index 4567da6..0554f37 100644
--- a/winsup/cygwin/window.cc
+++ b/winsup/cygwin/window.cc
@@ -74,7 +74,7 @@ Winmain (VOID *)
{
MSG msg;
WNDCLASS wc;
- static const NO_COPY char classname[] = "CygwinWndClass";
+ static NO_COPY char classname[] = "CygwinWndClass";
/* Register the window class for the main window. */