* autoload.cc (wsock_init): Reorganize slightly to accomodate a new compiler.

This commit is contained in:
Christopher Faylor 2001-10-13 01:35:15 +00:00
parent cb1826572c
commit bc6ed54986
12 changed files with 19 additions and 14 deletions

View File

@ -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

View File

@ -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;

View File

@ -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) },

View File

@ -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"}},

View File

@ -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

View File

@ -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;
}

View File

@ -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 */

View File

@ -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},

View File

@ -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;
}

View File

@ -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;

View File

@ -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)

View File

@ -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. */