emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

EWOULDBLOCK and EINPROGRESS in process.c


From: Eli Zaretskii
Subject: EWOULDBLOCK and EINPROGRESS in process.c
Date: Tue, 24 Mar 2015 20:09:19 +0200

process.c has this fragment after it calls 'connect':

  #ifdef NON_BLOCKING_CONNECT
  #ifdef EINPROGRESS
        if (is_non_blocking_client && xerrno == EINPROGRESS)
          break;
  #else  <<<<<<<<<<<<<<<<<<<<<<<<<<<<
  #ifdef EWOULDBLOCK
        if (is_non_blocking_client && xerrno == EWOULDBLOCK)
          break;
  #endif
  #endif
  #endif

Can someone tell why we need that "#else" there?  Suppose there's a
platform that has both values defined, but only returns EWOULDBLOCK
when a non-blocking 'connect' is called -- that platform will fall
through the cracks here.

Is there any problem to replace #else with #endif here?



reply via email to

[Prev in Thread] Current Thread [Next in Thread]