ObjFW  Check-in [1833194867]

Overview
Comment:Define _HPUX_ALT_XOPEN_SOCKET_API where necessary

There is a nasty bug in HP-UX: When using the proper socket APIs that
take a socklen_t (which is 64 bit in LP64 mode), it still calls into
methods that expect an int - so there is a type mismatch between the
headers and the compiled system libraries. This leads to all socklen_t
being interpreted as 0 (due to big endian). Defining
_HPUX_ALT_XOPEN_SOCKET_API makes it use the correct symbols in the
system libraries instead.

Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 1833194867ae08236479b9d53456338757aedb671972cbb42f25877cf703a34e
User & Date: js on 2021-01-14 02:29:31
Other Links: manifest | tags
Context
2021-01-14
02:52
PLATFORMS.md: Add HP-UX check-in: 6b2578b0eb user: js tags: trunk
02:29
Define _HPUX_ALT_XOPEN_SOCKET_API where necessary check-in: 1833194867 user: js tags: trunk
01:45
Fix fallback asprintf implementation for length 0 check-in: 99862df65a user: js tags: trunk
Changes

Modified src/OFDatagramSocket.m from [4b050b9816] to [e03ee47321].

14
15
16
17
18
19
20

21
22
23
24
25
26
27
 */

#include "config.h"

#ifndef _XOPEN_SOURCE_EXTENDED
# define _XOPEN_SOURCE_EXTENDED
#endif


#include <errno.h>

#ifdef HAVE_FCNTL_H
# include <fcntl.h>
#endif








>







14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
 */

#include "config.h"

#ifndef _XOPEN_SOURCE_EXTENDED
# define _XOPEN_SOURCE_EXTENDED
#endif
#define _HPUX_ALT_XOPEN_SOCKET_API

#include <errno.h>

#ifdef HAVE_FCNTL_H
# include <fcntl.h>
#endif

Modified src/OFSequencedPacketSocket.m from [6704d2c5d3] to [b27451c5d4].

14
15
16
17
18
19
20

21
22
23
24
25
26
27
 */

#include "config.h"

#ifndef _XOPEN_SOURCE_EXTENDED
# define _XOPEN_SOURCE_EXTENDED
#endif


#include <assert.h>
#include <errno.h>

#ifdef HAVE_FCNTL_H
# include <fcntl.h>
#endif







>







14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
 */

#include "config.h"

#ifndef _XOPEN_SOURCE_EXTENDED
# define _XOPEN_SOURCE_EXTENDED
#endif
#define _HPUX_ALT_XOPEN_SOCKET_API

#include <assert.h>
#include <errno.h>

#ifdef HAVE_FCNTL_H
# include <fcntl.h>
#endif

Modified src/OFStreamSocket.m from [731a6e9d3a] to [791405f855].

15
16
17
18
19
20
21

22
23
24
25
26
27
28

#include "config.h"

#ifndef _XOPEN_SOURCE_EXTENDED
# define _XOPEN_SOURCE_EXTENDED
#endif
#define __NO_EXT_QNX


#include <assert.h>
#include <errno.h>
#include <string.h>

#import "OFStreamSocket.h"
#import "OFStreamSocket+Private.h"







>







15
16
17
18
19
20
21
22
23
24
25
26
27
28
29

#include "config.h"

#ifndef _XOPEN_SOURCE_EXTENDED
# define _XOPEN_SOURCE_EXTENDED
#endif
#define __NO_EXT_QNX
#define _HPUX_ALT_XOPEN_SOCKET_API

#include <assert.h>
#include <errno.h>
#include <string.h>

#import "OFStreamSocket.h"
#import "OFStreamSocket+Private.h"

Modified src/OFTCPSocket.m from [7803db3fba] to [49e1470816].

15
16
17
18
19
20
21

22
23
24
25
26
27
28

#include "config.h"

#ifndef _XOPEN_SOURCE_EXTENDED
# define _XOPEN_SOURCE_EXTENDED
#endif
#define __NO_EXT_QNX


#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

#ifdef HAVE_FCNTL_H







>







15
16
17
18
19
20
21
22
23
24
25
26
27
28
29

#include "config.h"

#ifndef _XOPEN_SOURCE_EXTENDED
# define _XOPEN_SOURCE_EXTENDED
#endif
#define __NO_EXT_QNX
#define _HPUX_ALT_XOPEN_SOCKET_API

#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

#ifdef HAVE_FCNTL_H

Modified src/OFUDPSocket.m from [284e645ef0] to [26835c8d41].

11
12
13
14
15
16
17





18
19
20
21
22
23
24
 * Public License, either version 2 or 3, which can be found in the file
 * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
 * file.
 */

#include "config.h"






#include <errno.h>

#ifdef HAVE_FCNTL_H
# include <fcntl.h>
#endif

#import "OFUDPSocket.h"







>
>
>
>
>







11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
 * Public License, either version 2 or 3, which can be found in the file
 * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
 * file.
 */

#include "config.h"

#ifndef _XOPEN_SOURCE_EXTENDED
# define _XOPEN_SOURCE_EXTENDED
#endif
#define _HPUX_ALT_XOPEN_SOCKET_API

#include <errno.h>

#ifdef HAVE_FCNTL_H
# include <fcntl.h>
#endif

#import "OFUDPSocket.h"

Modified src/socket.m from [12ec02f9d9] to [21df00d3c4].

14
15
16
17
18
19
20

21
22
23
24
25
26
27
 */

#include "config.h"

#ifndef _XOPEN_SOURCE_EXTENDED
# define _XOPEN_SOURCE_EXTENDED
#endif


#ifdef OF_NINTENDO_3DS
# include <malloc.h>  /* For memalign() */
#endif

#include <errno.h>








>







14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
 */

#include "config.h"

#ifndef _XOPEN_SOURCE_EXTENDED
# define _XOPEN_SOURCE_EXTENDED
#endif
#define _HPUX_ALT_XOPEN_SOCKET_API

#ifdef OF_NINTENDO_3DS
# include <malloc.h>  /* For memalign() */
#endif

#include <errno.h>