Overview
Comment: | Fix compilation with GCC |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
f97084d9c3ef48e76438ff0ffb0468d2 |
User & Date: | js on 2017-10-01 21:06:34 |
Other Links: | manifest | tags |
Context
2017-10-01
| ||
21:12 | Fix testing the wrong OFKernelEventObserver check-in: 28078de81b user: js tags: trunk | |
21:06 | Fix compilation with GCC check-in: f97084d9c3 user: js tags: trunk | |
18:09 | OFTarArchive: Support for star numbers check-in: 6b6856298d user: js tags: trunk | |
Changes
Modified src/OFHTTPClient.m from [6841c42cc1] to [dadb6a38d3].
︙ | |||
57 58 59 60 61 62 63 64 65 66 67 68 69 70 | 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 | + | } - initWithClient: (OFHTTPClient *)client request: (OFHTTPRequest *)request redirects: (unsigned int)redirects context: (id)context; - (void)start; - (void)closeAndReconnect; @end @interface OFHTTPClientResponse: OFHTTPResponse { OFTCPSocket *_socket; bool _hasContentLength, _chunked, _keepAlive, _atEndOfStream; size_t _toRead; |
︙ | |||
233 234 235 236 237 238 239 | 234 235 236 237 238 239 240 241 242 243 244 245 246 247 | - - - - - - - - - - - - - - - - - - - - - - - - - | [_context release]; [_version release]; [_serverHeaders release]; [super dealloc]; } |
︙ | |||
712 713 714 715 716 717 718 719 720 721 722 723 724 725 | 688 689 690 691 692 693 694 695 696 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 722 723 724 725 726 | + + + + + + + + + + + + + + + + + + + + + + + + + | [self performSelector: @selector(handleSocket:) withObject: socket afterDelay: 0]; } } else [self closeAndReconnect]; } - (void)closeAndReconnect { OFURL *URL = [_request URL]; OFTCPSocket *socket; [_client close]; if ([[URL scheme] isEqual: @"https"]) { if (of_tls_socket_class == Nil) @throw [OFUnsupportedProtocolException exceptionWithURL: URL]; socket = [[[of_tls_socket_class alloc] init] autorelease]; } else socket = [OFTCPSocket socket]; [socket asyncConnectToHost: [URL host] port: [URL port] target: self selector: @selector(socketDidConnect:context: exception:) context: nil]; } @end @implementation OFHTTPClientResponse @synthesize of_keepAlive = _keepAlive; - initWithSocket: (OFTCPSocket *)socket { |
︙ |
Modified src/OFTarArchiveEntry.m from [aa9fa8f2dc] to [7043b6c404].
︙ | |||
49 50 51 52 53 54 55 | 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 | - + | for (size_t i = UTF8StringLength; i < length; i++) buffer[i] = '\0'; } static uintmax_t octalValueFromBuffer(const unsigned char *buffer, size_t length, uintmax_t max) { |
︙ |
Modified src/OFXMLParser.m from [913f851c54] to [c940e346a8].
︙ | |||
35 36 37 38 39 40 41 42 43 44 45 46 47 48 | 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 | + + + + + + + + + + + + + + + + + + + + + + + | #import "OFMalformedXMLException.h" #import "OFOutOfRangeException.h" #import "OFUnboundPrefixException.h" typedef void (*state_function_t)(id, SEL); static SEL selectors[OF_XMLPARSER_NUM_STATES]; static state_function_t lookupTable[OF_XMLPARSER_NUM_STATES]; @interface OFXMLParser () - (void)of_inByteOrderMarkState; - (void)of_outsideTagState; - (void)of_tagOpenedState; - (void)of_inProcessingInstructionsState; - (void)of_inTagNameState; - (void)of_inCloseTagNameState; - (void)of_inTagState; - (void)of_inAttributeNameState; - (void)of_expectAttributeEqualSignState; - (void)of_expectAttributeDelimiterState; - (void)of_inAttributeValueState; - (void)of_expectTagCloseState; - (void)of_expectSpaceOrTagCloseState; - (void)of_inExclamationMarkState; - (void)of_inCDATAOpeningState; - (void)of_inCDATAState; - (void)of_inCommentOpeningState; - (void)of_inCommentState1; - (void)of_inCommentState2; - (void)of_inDOCTYPEState; @end static OF_INLINE void appendToBuffer(OFMutableData *buffer, const char *string, of_string_encoding_t encoding, size_t length) { if (OF_LIKELY(encoding == OF_STRING_ENCODING_UTF_8)) [buffer addItems: string |
︙ |
Modified src/runtime/ObjFW-RT.h from [576d1fa9d6] to [52b471a404].
︙ | |||
39 40 41 42 43 44 45 46 47 48 49 50 51 52 | 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 | + + + | #if !__has_feature(nullability) # ifndef _Nonnull # define _Nonnull # endif # ifndef _Nullable # define _Nullable # endif # ifndef _Null_unspecified # define _Null_unspecified # endif #endif #if !__has_feature(objc_arc) && !defined(__unsafe_unretained) # define __unsafe_unretained #endif #define Nil (Class _Null_unspecified)0 |
︙ |
Modified utils/ofhttp/OFHTTP.m from [e7a88133ce] to [94fff99697].
︙ | |||
65 66 67 68 69 70 71 72 73 74 75 76 77 78 | 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 | + + | OFMutableDictionary *_clientHeaders; OFHTTPClient *_HTTPClient; char *_buffer; OFStream *_output; intmax_t _received, _length, _resumedFrom; ProgressBar *_progressBar; } - (void)downloadNextURL; @end OF_APPLICATION_DELEGATE(OFHTTP) static void help(OFStream *stream, bool full, int status) { |
︙ | |||
623 624 625 626 627 628 629 630 631 632 633 634 635 636 | 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + | @"url", [[request URL] string])]; } else @throw e; [self performSelector: @selector(downloadNextURL) afterDelay: 0]; } - (bool)stream: (OFHTTPResponse *)response didReadIntoBuffer: (void *)buffer length: (size_t)length context: (id)context exception: (OFException *)e { if (e != nil) { OFString *URL; [_progressBar stop]; [_progressBar draw]; [_progressBar release]; _progressBar = nil; if (!_quiet) [of_stdout writeString: @"\n Error!\n"]; URL = [_URLs objectAtIndex: _URLIndex - 1]; [of_stderr writeLine: OF_LOCALIZED(@"download_failed_exception", @"%[prog]: Failed to download <%[url]>: %[exception]", @"prog", [OFApplication programName], @"url", URL, @"exception", e)]; _errorCode = 1; goto next; } _received += length; [_output writeBuffer: buffer length: length]; [_progressBar setReceived: _received]; if ([response isAtEndOfStream] || (_length >= 0 && _received >= _length)) { [_progressBar stop]; [_progressBar draw]; [_progressBar release]; _progressBar = nil; if (!_quiet) { [of_stdout writeString: @"\n "]; [of_stdout writeLine: OF_LOCALIZED(@"download_done", @"Done!")]; } goto next; } return true; next: [self performSelector: @selector(downloadNextURL) afterDelay: 0]; return false; } - (void)client: (OFHTTPClient *)client didPerformRequest: (OFHTTPRequest *)request response: (OFHTTPResponse *)response context: (id)context { OFDictionary OF_GENERIC(OFString *, OFString *) *headers; |
︙ | |||
793 794 795 796 797 798 799 | 855 856 857 858 859 860 861 862 863 864 865 866 867 868 | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | [_currentFileName release]; _currentFileName = nil; [self performSelector: @selector(downloadNextURL) afterDelay: 0]; } |
︙ |