Overview
Comment: | Check for more socket-related headers / functions. |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
896084c3406258123cbdfb56d00606c6 |
User & Date: | js on 2013-05-22 18:42:46 |
Other Links: | manifest | tags |
Context
2013-05-22
| ||
18:45 | Import OFThread.h unconditionally. check-in: d7365be372 user: js tags: trunk | |
18:42 | Check for more socket-related headers / functions. check-in: 896084c340 user: js tags: trunk | |
2013-05-13
| ||
16:46 | Get rid of a strange ObjC++ + Win32 warning. check-in: 482454bc43 user: js tags: trunk | |
Changes
Modified configure.ac from [6ce483001a] to [b23f940e4b].
︙ | |||
593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 | 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 | + + + + + + + + + + | ]) AC_CHECK_FUNC(link, [ AC_DEFINE(OF_HAVE_LINK, 1, [Whether we have link()]) ]) AC_CHECK_FUNC(symlink, [ AC_DEFINE(OF_HAVE_SYMLINK, 1, [Whether we have symlink()]) ]) AC_CHECK_FUNC(pipe, [ AC_DEFINE(OF_HAVE_PIPE, 1, [Whether we have pipe()]) ]) AC_ARG_ENABLE(sockets, AS_HELP_STRING([--disable-sockets], [disable socket support])) AS_IF([test x"$enable_sockets" != x"no"], [ AC_DEFINE(OF_HAVE_SOCKETS, 1, [Whether we have sockets]) AC_SUBST(USE_SRCS_SOCKETS, '${SRCS_SOCKETS}') AC_CHECK_LIB(socket, socket, LIBS="$LIBS -lsocket") AC_CHECK_LIB(network, socket, LIBS="$LIBS -lnetwork") AC_CHECK_LIB(ws2_32, main, LIBS="$LIBS -lws2_32") AC_CHECK_HEADER(sys/socket.h, [ AC_DEFINE(OF_HAVE_SYS_SOCKET_H, 1, [Whether we have sys/socket.h]) ]) AC_CHECK_HEADERS([netinet/in.h arpa/inet.h netdb.h]) AC_CHECK_FUNC(kqueue, [ AC_DEFINE(HAVE_KQUEUE, 1, [Whether we have kqueue]) AC_SUBST(OFSTREAMOBSERVER_KQUEUE_M, "OFStreamObserver_kqueue.m") ]) AC_CHECK_HEADER(poll.h, [ AC_DEFINE(HAVE_POLL_H, 1, [Whether we have poll.h]) AC_SUBST(OFSTREAMOBSERVER_POLL_M, "OFStreamObserver_poll.m") ]) AC_CHECK_HEADER(sys/select.h, [ AC_DEFINE(HAVE_SYS_SELECT_H, 1, [Whether we have sys/select.h]) AC_SUBST(OFSTREAMOBSERVER_SELECT_M, "OFStreamObserver_select.m") ]) case "$host_os" in mingw*) AC_SUBST(OFSTREAMOBSERVER_SELECT_M, "OFStreamObserver_select.m") ;; esac |
︙ | |||
697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 | 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 | + + + - + | have_threadsafe_getaddrinfo="no" ]) ]) AS_IF([test x"$have_threadsafe_getaddrinfo" = x"yes"], [ AC_DEFINE(HAVE_THREADSAFE_GETADDRINFO, 1, [Whether getaddrinfo is thread-safe]) ], [ AC_CHECK_FUNCS([h_errno hstrerror]) ]) AC_MSG_RESULT($have_threadsafe_getaddrinfo) ]) ], [ AC_MSG_RESULT(no) AC_CHECK_FUNCS([h_errno hstrerror]) ]) ]) AS_IF([test x"$enable_sockets" != x"no" -a x"$enable_threads" != x"no"], [ AC_SUBST(OFHTTPCLIENTTESTS_M, "OFHTTPClientTests.m") ]) case "$host" in *-*-mingw*) have_processes="yes" ;; *) |
︙ |
Modified src/OFStreamObserver.h from [968a82ac04] to [9d097b3bbf].
︙ | |||
15 16 17 18 19 20 21 22 23 24 25 26 27 28 | 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | + + + + | */ #import "OFObject.h" #ifndef OF_HAVE_SOCKETS # error No sockets available! #endif #ifdef OF_HAVE_SYS_SOCKET_H # include <sys/socket.h> #endif #ifdef _WIN32 # include <winsock2.h> #endif @class OFStream; @class OFMutableArray; |
︙ | |||
82 83 84 85 86 87 88 | 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 | - + | OFMutableArray *_writeStreams; __unsafe_unretained OFStream **_FDToStream; size_t _maxFD; OFMutableArray *_queue; OFDataArray *_queueInfo, *_queueFDs; id <OFStreamObserverDelegate> _delegate; int _cancelFD[2]; |
︙ |
Modified src/OFStreamObserver.m from [4b5320c792] to [acce8334f0].
︙ | |||
25 26 27 28 29 30 31 | 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 | - - + + | #include <assert.h> #import "OFStreamObserver.h" #import "OFArray.h" #import "OFDictionary.h" #import "OFStream.h" #import "OFDataArray.h" |
︙ | |||
94 95 96 97 98 99 100 | 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 | - + - + - - + + | #endif - init { self = [super init]; @try { |
︙ | |||
134 135 136 137 138 139 140 | 134 135 136 137 138 139 140 141 142 143 144 145 146 147 | - | if (bind(_cancelFD[0], (struct sockaddr*)&_cancelAddr, sizeof(_cancelAddr)) || bind(_cancelFD[1], (struct sockaddr*)&cancelAddr2, sizeof(cancelAddr2))) @throw [OFInitializationFailedException exceptionWithClass: [self class]]; cancelAddrLen = sizeof(_cancelAddr); |
︙ | |||
383 384 385 386 387 388 389 | 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 | - + | - (bool)observeUntilDate: (OFDate*)date { return [self observeForTimeInterval: [date timeIntervalSinceNow]]; } - (void)cancel { |
︙ |
Modified src/OFStreamObserver_poll.m from [da5230bc72] to [047427a85c].
︙ | |||
15 16 17 18 19 20 21 | 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | + + - + + | */ #include "config.h" #define __NO_EXT_QNX #include <unistd.h> #ifdef HAVE_POLL_H |
︙ |
Modified src/OFStreamSocket.m from [f99014d0c7] to [05982c597a].
︙ | |||
20 21 22 23 24 25 26 | 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 | - - + + - - - - | #include <string.h> #include <unistd.h> #include <errno.h> |
︙ |
Modified src/OFTCPSocket.h from [63a39507d8] to [720d96e946].
︙ | |||
17 18 19 20 21 22 23 | 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | - + - - | #ifndef __STDC_LIMIT_MACROS # define __STDC_LIMIT_MACROS #endif #ifndef __STDC_CONSTANT_MACROS # define __STDC_CONSTANT_MACROS #endif |
︙ |
Modified src/OFTCPSocket.m from [2065e219ce] to [f93320b4b5].
︙ | |||
23 24 25 26 27 28 29 | 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 | - + + + + + | #include <stdlib.h> #include <string.h> #include <unistd.h> #include <assert.h> |
︙ | |||
64 65 66 67 68 69 70 71 72 73 74 75 76 77 | 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 | + + + + | # ifndef AI_NUMERICSERV # define AI_NUMERICSERV 0 # endif # ifndef AI_NUMERICHOST # define AI_NUMERICHOST 0 # endif #endif #ifndef SOMAXCONN # define SOMAXCONN 32 #endif #if defined(OF_HAVE_THREADS) && !defined(HAVE_THREADSAFE_GETADDRINFO) # import "OFMutex.h" # import "OFDataArray.h" static OFMutex *mutex = nil; #endif |
︙ |
Modified src/exceptions/common.h from [19aae6e6f7] to [082aeff5c0].
︙ | |||
11 12 13 14 15 16 17 18 19 20 | 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 | + - + - - - - + + + + - + - + | * Alternatively, it may be distributed under the terms of the GNU General * 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 <string.h> #include <errno.h> #import "macros.h" |
︙ |
Modified src/objfw-defs.h.in from [3af4f4e1ad] to [226b05630f].
1 2 3 4 5 6 7 8 9 10 11 12 13 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | - + + + | #undef OF_APPLE_RUNTIME #undef OF_BIG_ENDIAN #undef OF_FLOAT_BIG_ENDIAN #undef OF_HAVE_ASPRINTF #undef OF_HAVE_ATOMIC_OPS #undef OF_HAVE_CHMOD #undef OF_HAVE_CHOWN #undef OF_HAVE_COMPILER_TLS #undef OF_HAVE_FORWARDING_TARGET_FOR_SELECTOR #undef OF_HAVE_GCC_ATOMIC_OPS #undef OF_HAVE_LINK #undef OF_HAVE_OSATOMIC #undef OF_HAVE_OSATOMIC_64 |