HAVE_UIO_H vs. HAVE_SYS_UIO_H
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:
./erts/emulator/beam/erl_driver.h:
#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
#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):
/usr/include/bit/uio.h:
/* 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:
./erts/autoconf/acconfig.h:
#undef HAVE_UIO_H
./erts/autoconf/config.h.in:
#undef HAVE_SYS_UIO_H
./erts/autoconf/i686-pc-linux-gnu/config.status:
${ac_dA}HAVE_SYS_UIO_H${ac_dB}HAVE_SYS_UIO_H${ac_dC}1${ac_dD}
${ac_uA}HAVE_SYS_UIO_H${ac_uB}HAVE_SYS_UIO_H${ac_uC}1${ac_uD}
${ac_eA}HAVE_SYS_UIO_H${ac_eB}HAVE_SYS_UIO_H${ac_eC}1${ac_eD}
./erts/autoconf/i686-pc-linux-gnu/config.h:
#define HAVE_SYS_UIO_H 1
./erts/emulator/beam/erl_driver.h:
# ifdef HAVE_UIO_H
./erts/emulator/drivers/common/inet_drv.c:
#ifdef HAVE_SYS_UIO_H
./erts/emulator/sys/unix/driver_int.h:
#ifdef HAVE_UIO_H
./lib/kernel/examples/uds_dist/c_src/uds_drv.c:
#define HAVE_UIO_H
-Vance
Vance Shipley
Motivity Telecom Inc.
+1 519 579 5816
More information about the erlang-questions
mailing list