Mercurial > emacs
comparison src/w32.c @ 90188:01137c1fdbe9
Revision: miles@gnu.org--gnu-2005/emacs--unicode--0--patch-57
Merge from emacs--cvs-trunk--0
Patches applied:
* emacs--cvs-trunk--0 (patch 324-352)
- Merge from gnus--rel--5.10
- Update from CVS
- etc/emacs-buffer.gdb: Remove RCS keywords
* gnus--rel--5.10 (patch 70-79)
- Update from CVS
- Merge from emacs--cvs-trunk--0
author | Miles Bader <miles@gnu.org> |
---|---|
date | Mon, 06 Jun 2005 02:39:45 +0000 |
parents | 7e3f621f1dd4 ac1cd1222417 |
children | bb71c6cf2009 |
comparison
equal
deleted
inserted
replaced
90187:587ea1490d70 | 90188:01137c1fdbe9 |
---|---|
1271 | 1271 |
1272 /* Emulate gettimeofday (Ulrich Leodolter, 1/11/95). */ | 1272 /* Emulate gettimeofday (Ulrich Leodolter, 1/11/95). */ |
1273 void | 1273 void |
1274 gettimeofday (struct timeval *tv, struct timezone *tz) | 1274 gettimeofday (struct timeval *tv, struct timezone *tz) |
1275 { | 1275 { |
1276 struct timeb tb; | 1276 struct _timeb tb; |
1277 _ftime (&tb); | 1277 _ftime (&tb); |
1278 | 1278 |
1279 tv->tv_sec = tb.time; | 1279 tv->tv_sec = tb.time; |
1280 tv->tv_usec = tb.millitm * 1000L; | 1280 tv->tv_usec = tb.millitm * 1000L; |
1281 if (tz) | 1281 if (tz) |
1775 nr.dwScope = RESOURCE_GLOBALNET; | 1775 nr.dwScope = RESOURCE_GLOBALNET; |
1776 nr.dwType = RESOURCETYPE_DISK; | 1776 nr.dwType = RESOURCETYPE_DISK; |
1777 nr.dwDisplayType = RESOURCEDISPLAYTYPE_SERVER; | 1777 nr.dwDisplayType = RESOURCEDISPLAYTYPE_SERVER; |
1778 nr.dwUsage = RESOURCEUSAGE_CONTAINER; | 1778 nr.dwUsage = RESOURCEUSAGE_CONTAINER; |
1779 nr.lpLocalName = NULL; | 1779 nr.lpLocalName = NULL; |
1780 nr.lpRemoteName = map_w32_filename (path, NULL); | 1780 nr.lpRemoteName = (LPSTR)map_w32_filename (path, NULL); |
1781 nr.lpComment = NULL; | 1781 nr.lpComment = NULL; |
1782 nr.lpProvider = NULL; | 1782 nr.lpProvider = NULL; |
1783 | 1783 |
1784 result = WNetOpenEnum(RESOURCE_GLOBALNET, RESOURCETYPE_DISK, | 1784 result = WNetOpenEnum(RESOURCE_GLOBALNET, RESOURCETYPE_DISK, |
1785 RESOURCEUSAGE_CONNECTABLE, &nr, &henum); | 1785 RESOURCEUSAGE_CONNECTABLE, &nr, &henum); |
3205 h_errno = ENOTSOCK; | 3205 h_errno = ENOTSOCK; |
3206 return SOCKET_ERROR; | 3206 return SOCKET_ERROR; |
3207 } | 3207 } |
3208 | 3208 |
3209 int | 3209 int |
3210 sys_setsockopt (int s, int level, int optname, const char * optval, int optlen) | 3210 sys_setsockopt (int s, int level, int optname, const void * optval, int optlen) |
3211 { | 3211 { |
3212 if (winsock_lib == NULL) | 3212 if (winsock_lib == NULL) |
3213 { | 3213 { |
3214 h_errno = ENETDOWN; | 3214 h_errno = ENETDOWN; |
3215 return SOCKET_ERROR; | 3215 return SOCKET_ERROR; |
3217 | 3217 |
3218 check_errno (); | 3218 check_errno (); |
3219 if (fd_info[s].flags & FILE_SOCKET) | 3219 if (fd_info[s].flags & FILE_SOCKET) |
3220 { | 3220 { |
3221 int rc = pfn_setsockopt (SOCK_HANDLE (s), level, optname, | 3221 int rc = pfn_setsockopt (SOCK_HANDLE (s), level, optname, |
3222 optval, optlen); | 3222 (const char *)optval, optlen); |
3223 if (rc == SOCKET_ERROR) | 3223 if (rc == SOCKET_ERROR) |
3224 set_errno (); | 3224 set_errno (); |
3225 return rc; | 3225 return rc; |
3226 } | 3226 } |
3227 h_errno = ENOTSOCK; | 3227 h_errno = ENOTSOCK; |