* the research papers on the package. Check out http://www.gromacs.org.
*/
-/*! \libinternal \file
+/*! \internal \file
*
* \brief
* Implements functions of imdsocket.h.
*
* \author Martin Hoefling, Carsten Kutzner <ckutzne@gwdg.de>
*
- * \inlibraryapi
* \ingroup module_imd
*/
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
+#include "gmxpre.h"
+
+#include "imdsocket.h"
+#include "config.h"
+#include <errno.h>
#include <string.h>
-#include "smalloc.h"
-#include "gmx_fatal.h"
-#include "imdsocket.h"
-#include "imd.h"
+#include "gromacs/imd/imd.h"
+#include "gromacs/utility/fatalerror.h"
+#include "gromacs/utility/smalloc.h"
#ifdef GMX_NATIVE_WINDOWS
#ifdef GMX_HAVE_WINSOCK
#endif
#else
/* On UNIX, we can use nice errors from errno.h */
-#include <errno.h>
#include <unistd.h>
#endif
extern int imdsock_bind(IMDSocket *sock, int port)
{
- int ret = -1;
+ int ret;
#ifdef GMX_IMD
/* Try to bind to address and port ...*/
ret = bind(sock->sockfd, (struct sockaddr *) &sock->address, sizeof(sock->address));
+#else
+ ret = -1;
#endif
if (ret)
extern int imd_sock_listen(IMDSocket *sock)
{
- int ret = -1;
+ int ret;
#ifdef GMX_IMD
/* Try to set to listening state */
ret = listen(sock->sockfd, MAXIMDCONNECTIONS);
+#else
+ ret = -1;
#endif
if (ret)
extern IMDSocket* imdsock_accept(IMDSocket *sock)
{
- int ret = -1;
+ int ret;
#ifdef GMX_IMD
socklen_t length;
extern int imdsock_getport(IMDSocket *sock, int *port)
{
- int ret = -1;
+ int ret;
#ifdef GMX_IMD
struct sockaddr_in sin;
socklen_t len;