bug-gnulib
[Top][All Lists]
Advanced

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

Re: Os2


From: Simon Josefsson
Subject: Re: Os2
Date: Sun, 13 Apr 2008 15:38:36 +0200
User-agent: Gnus/5.110007 (No Gnus v0.7) Emacs/22.1 (gnu/linux)

Simon Josefsson <address@hidden> writes:

> Bruno Haible <address@hidden> writes:
>
>> Elbert Pol wrote:
>>
>>> test-sys_socket.c:27: error: `SHUT_RD' undeclared here (not in a function)
>>> test-sys_socket.c:27: error: initializer element is not constant
>>> test-sys_socket.c:27: error: (near initialization for `a[0]')
>>> test-sys_socket.c:27: error: `SHUT_WR' undeclared here (not in a function)
>>> test-sys_socket.c:27: error: initializer element is not constant
>>> test-sys_socket.c:27: error: (near initialization for `a[1]')
>>> test-sys_socket.c:27: error: `SHUT_RDWR' undeclared here (not in a function)
>>> test-sys_socket.c:27: error: initializer element is not constant
>>> test-sys_socket.c:27: error: (near initialization for `a[2]')
>>
>> Fixing it like this. Simon, do you agree?
>
> Yes.  We have similar workarounds elsewhere in GnuTLS already, but with
> this patch I can remove them and just rely on sys/socket.h.

On second thought; Elbert, does your platform have SD_RECEIVE etc?
There is code in sys_socket.h that does:

/* For shutdown(). */
# if !defined SHUT_RD && defined SD_RECEIVE
#  define SHUT_RD SD_RECEIVE
# endif
# if !defined SHUT_WR && defined SD_SEND
#  define SHUT_WR SD_SEND
# endif
# if !defined SHUT_RDWR && defined SD_BOTH
#  define SHUT_RDWR SD_BOTH
# endif

Using something like that may be cleaner than hard coding the values,
although it is debatable.

/Simon




reply via email to

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