1 ?RCS: $Id: d_htonl.U,v 3.0.1.2 1994/08/29 16:09:25 ram Exp $
3 ?RCS: Copyright (c) 1991-1993, Raphael Manfredi
5 ?RCS: You may redistribute only under the terms of the Artistic Licence,
6 ?RCS: as specified in the README file that comes with the distribution.
7 ?RCS: You may reuse parts of this distribution only within the terms of
8 ?RCS: that same Artistic Licence; a copy of which may be found at the root
9 ?RCS: of the source tree for dist 3.0.
11 ?RCS: $Log: d_htonl.U,v $
12 ?RCS: Revision 3.0.1.2 1994/08/29 16:09:25 ram
13 ?RCS: patch32: now properly handles htonl() and friends when macros (ADO)
15 ?RCS: Revision 3.0.1.1 1994/05/06 14:45:00 ram
16 ?RCS: patch23: now also check for htonl() macro (ADO)
18 ?RCS: Revision 3.0 1993/08/18 12:06:22 ram
19 ?RCS: Baseline for dist 3.0 netwide release.
21 ?MAKE:d_htonl: Inlibc Setvar i_niin i_sysin i_arpainet cat rm contains \
22 cppstdin cppflags cppminus
23 ?MAKE: -pick add $@ %<
25 ?S: This variable conditionally defines HAS_HTONL if htonl() and its
26 ?S: friends are available to do network order byte swapping.
29 ?C: This symbol, if defined, indicates that the htonl() routine (and
30 ?C: friends htons() ntohl() ntohs()) are available to do network
31 ?C: order byte swapping.
34 ?C: This symbol, if defined, indicates that the htons() routine (and
35 ?C: friends htonl() ntohl() ntohs()) are available to do network
36 ?C: order byte swapping.
39 ?C: This symbol, if defined, indicates that the ntohl() routine (and
40 ?C: friends htonl() htons() ntohs()) are available to do network
41 ?C: order byte swapping.
44 ?C: This symbol, if defined, indicates that the ntohs() routine (and
45 ?C: friends htonl() htons() ntohl()) are available to do network
46 ?C: order byte swapping.
48 ?H:#$d_htonl HAS_HTONL /**/
49 ?H:#$d_htonl HAS_HTONS /**/
50 ?H:#$d_htonl HAS_NTOHL /**/
51 ?H:#$d_htonl HAS_NTOHS /**/
54 : see if htonl --and friends-- exists
59 : Maybe they are macros.
64 #include <sys/types.h>
67 #$i_arpainet I_ARPA_INET
69 #include <netinet/in.h>
75 #include <arpa/inet.h>
78 printf("Defined as a macro.");
81 $cppstdin $cppflags $cppminus < htonl.c >htonl.E 2>/dev/null
82 if $contains 'Defined as a macro' htonl.E >/dev/null 2>&1; then
84 echo "But it seems to be defined as a macro." >&4