unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* MS-Windows build broken in Fmake_network_process
@ 2010-03-26 15:22 Eli Zaretskii
  2010-03-26 15:48 ` Helmut Eller
  2010-03-27  0:51 ` YAMAMOTO Mitsuharu
  0 siblings, 2 replies; 81+ messages in thread
From: Eli Zaretskii @ 2010-03-26 15:22 UTC (permalink / raw)
  To: Helmut Eller; +Cc: emacs-devel

This change:

    revno: 99750
    author: Helmut Eller <eller.helmut@gmail.com>
    committer: YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
    branch nick: trunk
    timestamp: Thu 2010-03-25 17:48:52 +0900
    message:
      Call `select' for interrupted `connect' rather than creating new socket (Bug#5173).

breaks the MS-Windows build:

The compiler emits a warning, and the linker errors out:

  gcc -I. -c -gdwarf-2 -g3  -mtune=pentium4 -O2     -Demacs=1 -DHAVE_CONFIG_H -I../nt/inc -DHAVE_NTGUI=1 -DUSE_CRT_DLL=1 -o oo-spd/i386/process.o process.c
  process.c: In function `Fmake_network_process':
  process.c:3663: warning: passing arg 4 of `getsockopt' from incompatible pointer type

  oo-spd/i386/temacs1.a(process.o)(.text+0x3297): In function `Fmake_network_process':
  D:\gnu\bzr\emacs\trunk\src/process.c:3663: undefined reference to `getsockopt@20'

The compiler warning is because the prototype on Windows is:

  int getsockopt(SOCKET, int, int, char*, int*);

The linker error is because we would need to link against yet another
library to get this function.  But I don't think we should do that.
I'm actually bewildered why this code:

	    int len = sizeof xerrno;
	    eassert (FD_ISSET (s, &fdset));
	    if (getsockopt (s, SOL_SOCKET, SO_ERROR, &xerrno, &len) == -1)
	      report_file_error ("getsockopt failed", Qnil);

was used unconditionally when a very similar code in
wait_reading_process_output is clearly marked with a comment saying
not to use it except on GNU/Linux:

  #ifdef GNU_LINUX
		/* getsockopt(,,SO_ERROR,,) is said to hang on some systems.
		   So only use it on systems where it is known to work.  */
		{
		  int xlen = sizeof(xerrno);
		  if (getsockopt(channel, SOL_SOCKET, SO_ERROR, &xerrno, &xlen))
		    xerrno = errno;
		}
  #else

Would you please provide an alternative code (similar to what the
#else branch does in wait_reading_process_output) that will not use
getsockopt?




^ permalink raw reply	[flat|nested] 81+ messages in thread

end of thread, other threads:[~2010-04-07  7:59 UTC | newest]

Thread overview: 81+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-26 15:22 MS-Windows build broken in Fmake_network_process Eli Zaretskii
2010-03-26 15:48 ` Helmut Eller
2010-03-26 17:56   ` Eli Zaretskii
2010-03-26 18:05     ` Helmut Eller
2010-03-26 18:09       ` Eli Zaretskii
2010-03-26 18:17         ` Helmut Eller
2010-03-26 20:05           ` Eli Zaretskii
2010-03-26 21:14             ` Helmut Eller
2010-03-27  8:50               ` Eli Zaretskii
2010-03-27 10:09                 ` Helmut Eller
2010-03-27 11:11                   ` Eli Zaretskii
2010-03-27 13:56                     ` Helmut Eller
2010-03-27  0:48             ` Chong Yidong
2010-03-27  7:42               ` Eli Zaretskii
2010-03-27 16:49                 ` Jason Rumney
2010-03-27 16:55                   ` Eli Zaretskii
2010-03-27 22:28                     ` Christoph
2010-03-28  0:12                       ` Florian Beck
2010-03-28  0:37                         ` Óscar Fuentes
2010-03-28  7:26                           ` Eli Zaretskii
2010-03-28 18:55                             ` Chong Yidong
2010-03-28 20:10                               ` Eli Zaretskii
2010-03-28 23:23                                 ` Jason Rumney
2010-03-29 23:39                           ` Richard Stallman
2010-03-31  4:57                             ` Stephen J. Turnbull
2010-03-31  8:38                               ` Eli Zaretskii
2010-03-31 10:38                                 ` Juanma Barranquero
2010-03-31 11:19                                   ` Eli Zaretskii
2010-03-31 15:39                                   ` Stephen J. Turnbull
2010-03-31 16:39                                     ` Juanma Barranquero
2010-03-31 17:30                                       ` Stephen J. Turnbull
2010-03-31 17:36                                         ` Juanma Barranquero
2010-03-31 18:05                                         ` OT: (was: MS-Windows build broken in Fmake_network_process) Stefan Monnier
2010-03-31 15:28                                 ` MS-Windows build broken in Fmake_network_process Stephen J. Turnbull
2010-03-31 16:12                                   ` Eli Zaretskii
2010-03-31 16:59                                     ` Stephen J. Turnbull
2010-03-31 17:27                                       ` Eli Zaretskii
2010-03-31 18:08                                         ` Stephen J. Turnbull
2010-04-06  7:50                             ` David Kastrup
2010-04-07  3:21                               ` Richard Stallman
2010-04-07  7:59                                 ` David Kastrup
2010-03-28  0:39                         ` Christoph
2010-03-28  7:21                           ` Windows 9X compatibility Eli Zaretskii
2010-03-28 14:59                             ` Óscar Fuentes
2010-03-28 15:24                               ` Lennart Borgman
2010-03-28 15:56                               ` Eli Zaretskii
2010-03-28 16:09                                 ` Juanma Barranquero
2010-03-28 18:03                                   ` joakim
2010-03-29 23:39                                     ` Richard Stallman
2010-03-28 19:57                                 ` Óscar Fuentes
2010-03-28 20:32                                   ` Eli Zaretskii
2010-03-28 22:26                                     ` Juanma Barranquero
2010-03-28 19:27                             ` Christoph
2010-03-28 20:18                               ` Eli Zaretskii
2010-03-28 21:04                                 ` Christoph
2010-03-28  7:17                       ` Windows 9X compatibility (was: MS-Windows build broken in Fmake_network_process) Eli Zaretskii
2010-03-28  7:33                     ` MS-Windows build broken in Fmake_network_process Jason Rumney
2010-03-28  8:12                       ` Eli Zaretskii
2010-03-29 23:39                         ` Richard Stallman
2010-03-28  9:11                   ` Serious performance problem with process output on Mac OSX Christian Lynbech
2010-03-28 14:41                     ` Adrian Robert
2010-03-29 21:58                       ` Adrian Robert
2010-03-29 23:26                         ` David Reitter
2010-03-29 23:54                         ` Chong Yidong
2010-03-30  7:43                           ` Adrian Robert
2010-03-30 13:05                             ` David Reitter
2010-03-30 17:39                               ` Jimmy Yuen Ho Wong
2010-03-30 17:47                                 ` Chong Yidong
2010-03-31  2:38                                   ` Jimmy Yuen Ho Wong
2010-03-31  4:00                                     ` Chong Yidong
2010-03-31 13:41                                       ` Jimmy Yuen Ho Wong
2010-03-31 14:28                                         ` Chong Yidong
2010-03-31 14:29                                         ` Adrian Robert
2010-03-29 23:48                   ` MS-Windows build broken in Fmake_network_process Davis Herring
2010-03-30  5:41                     ` Jason Rumney
2010-03-26 23:03           ` Juanma Barranquero
2010-03-27  0:51 ` YAMAMOTO Mitsuharu
2010-03-27  8:44   ` Eli Zaretskii
2010-03-27 13:01     ` Óscar Fuentes
2010-03-27 13:18       ` Juanma Barranquero
2010-03-28 17:29     ` Kim F. Storm

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).