Vance Shipley vances@REDACTED
Fri May 4 03:56:14 CEST 2001

I believe there is a small problem with the the configuration
defines for the uio.h header.  On my Linux system I have
a <sys/uio.h> and my config.h contains:

	#define HAVE_SYS_UIO_H 1

This is good.  However there seems to be some an old use
of HAVE_UIO_H that remains in the some files.  Specifically
I'm looking at erl_driver.h and I see the following:


	#if defined(VXWORKS)
	#  include <ioLib.h>
	typedef struct iovec SysIOVec;
	#elif defined(__WIN32__)
	 * This structure can be cast to a WSABUF structure.
	typedef struct _SysIOVec {
	    unsigned long iov_len;
	    char* iov_base;
	} SysIOVec;
	#else  /* Unix */
	#  ifdef HAVE_UIO_H
	#  include <sys/uio.h>
	typedef struct iovec SysIOVec;
	#  else
	typedef struct {
	    char* iov_base;
	    int   iov_len;
	} SysIOVec;
	#  endif

So the systems own definition for iovec does not get used as HAVE_UIO_H
is not defined.  I believe this should be changed to:
	#else  /* Unix */
---	#  ifdef HAVE_UIO_H
+++	#  ifdef HAVE_SYS_UIO_H
	#  include <sys/uio.h>

That would have a different definition here as my definition is
(<sys/uio.h> includes <bit/uio.h> to pull in the definition for iovec):

	/* Structure for scatter/gather I/O.  */
	struct iovec
	    void *iov_base;  /* Pointer to data.  */
	    size_t iov_len;  /* Length of data.  */

I see that inet_drv.c already has the updated HAVE_SYS_UIO_H.  Some other
files also have the old version.  The following is what I turned up on my
R7B-1 system:

	#undef HAVE_UIO_H

	#undef HAVE_SYS_UIO_H


	#define HAVE_SYS_UIO_H 1

	#  ifdef HAVE_UIO_H

	#ifdef HAVE_SYS_UIO_H

	#ifdef HAVE_UIO_H

	#define HAVE_UIO_H


	Vance Shipley
	Motivity Telecom Inc.
	+1 519 579 5816

More information about the erlang-questions mailing list