Changes In Branch 0.8 Through [c5f0c5f9ba] Excluding Merge-Ins
This is equivalent to a diff from 6b8b7b6a7e to c5f0c5f9ba
2016-01-03
| ||
00:36 | Fix a regression from the previous refactorization check-in: d1c4c46706 user: js tags: 0.8 | |
2015-12-29
| ||
21:42 | Refactor OFKernelEventObserver check-in: c5f0c5f9ba user: js tags: 0.8 | |
2015-11-02
| ||
15:10 | OFDate: Use wcsftime on Windows check-in: f585645c21 user: js tags: 0.8 | |
2015-08-21
| ||
17:51 | Set version to 0.9-dev check-in: 9d505a482a user: js tags: trunk | |
2015-08-14
| ||
16:43 | Branch for 0.8 check-in: e63c7f6f7d user: js tags: 0.8, 0.8-release | |
16:41 | Update ChangeLog for 0.8 check-in: 6b8b7b6a7e user: js tags: trunk | |
09:44 | ChangeLog: Remove trailing dots check-in: bebee54bff user: js tags: trunk | |
Modified ChangeLog from [4a3a662173] to [22a812d84f].
1 2 3 4 | 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 | + + + + + + + + + + + + + + - + | Legend: * Changes of existing features or bugfixes + New features ObjFW 0.8 -> ObjFW 0.8.1, 04.10.2015 * Adjust to __nullable / __nonnull being changed to _Nullable / _Nonnull in Clang 3.7 (this fixes compilation with Clang 3.7) * Blocks: Proper handling when called from a byref handler * Fix compilation on Solaris * Fix compilation for Wii, PSP and Nintendo DS * OFProcess: Send SIGTERM on close instead of SIGKILL * OFZIPArchive: Throw invalid format exception on failed seeks * Make sure of_hash_seed is never initialized to 0 * Special cases for the Wii's weird network stack (fixes the tests) * Better length checks for write / send calls * Don't use -pedantic on platforms where it's broken by the system headers * Documentation fixes |
︙ |
Modified README-WINDOWS.md from [ca2228e45c] to [7d07c02105].
︙ | |||
60 61 62 63 64 65 66 | 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 | + - + | $ pacman -S autoconf automake git make Getting, building and installing ObjFW -------------------------------------- Start the MinGW-w64 Win32 or Win64 Shell (depening on what version you want to build - do *not* use the MSYS2 Shell shortcut, but use the MinGW-w64 Win32 |
Modified configure.ac from [f7868ab464] to [60acc996be].
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | - + + + + |
|
︙ | |||
27 28 29 30 31 32 33 34 35 36 37 38 39 40 | 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 | + | LIBS="$LIBS -L$DEVKITPSP/psp/sdk/lib -lpspdebug -lpspdisplay" LIBS="$LIBS -lpspge -lpspctrl -lpspsdk -lc -lpspnet" LIBS="$LIBS -lpspnet_inet -lpspnet_apctl -lpspnet_resolver" LIBS="$LIBS -lpsputility -lpspuser -lpspkernel" enable_shared="no" enable_threads="no" # TODO enable_sockets="no" # TODO check_pedantic="no" AC_SUBST(MAP_LDFLAGS, ['-Wl,-Map,$@.map']) ;; esac AC_LANG([Objective C]) AC_PROG_OBJC([clang gcc]) |
︙ | |||
72 73 74 75 76 77 78 79 80 81 82 83 84 85 | 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 | + | OBJCFLAGS="$OBJCFLAGS -mthumb -mthumb-interwork" CPPFLAGS="$CPPFLAGS -DARM9 -I$DEVKITPRO/libnds/include" LDFLAGS="$LDFLAGS -specs=ds_arm9.specs" LIBS="$LIBS -L$DEVKITPRO/libnds/lib -lfilesystem -lfat -lnds9" enable_shared="no" enable_threads="no" # TODO enable_sockets="no" # TODO check_pedantic="no" AC_DEFINE(OF_NINTENDO_DS, 1, [Whether we are compiling for the Nintendo DS]) AC_SUBST(MAP_LDFLAGS, ['-Wl,-Map,$@.map']) ]) CPP="$OBJCPP" |
︙ | |||
514 515 516 517 518 519 520 | 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 | - + | ]) test x"$have_asprintf" != x"yes" -a x"$ac_cv_snprintf_useful_ret" != x"yes" && \ AC_MSG_ERROR(No asprintf and no snprintf returning required space!) AC_CHECK_FUNCS([arc4random random], break) AC_CHECK_LIB(dl, dlopen, LIBS="$LIBS -ldl") |
︙ | |||
591 592 593 594 595 596 597 | 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 | - + | AC_DEFINE(OF_HAVE_THREADS, 1, [Whether we have threads]) AC_SUBST(USE_SRCS_THREADS, '${SRCS_THREADS}') AC_ARG_ENABLE(compiler-tls, AS_HELP_STRING([--disable-compiler-tls], [disable compiler thread local storage])) AS_IF([test x"$enable_compiler_tls" != x"no"], [ |
︙ | |||
763 764 765 766 767 768 769 | 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 | - + - + | 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]) ]) |
︙ | |||
960 961 962 963 964 965 966 | 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 | - + | ;; esac AS_IF([test x"$have_processes" = x"yes"], [ AC_SUBST(OFPROCESS_M, "OFProcess.m") AC_DEFINE(OF_HAVE_PROCESSES, 1, [Whether we have processes]) ]) |
︙ | |||
1077 1078 1079 1080 1081 1082 1083 | 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 | + - - - - - + + + + + - - - - - - - - - - + + + + + + + + + + - - - - - - - + + + + + + + + | ], [ AC_MSG_RESULT(yes) ], [ AC_MSG_RESULT(no) OBJCFLAGS="$old_OBJCFLAGS" ]) AS_IF([test x"$check_pedantic" = x"yes"], [ |
︙ |
Modified src/Makefile from [413693eb52] to [8b4eefe1a4].
︙ | |||
86 87 88 89 90 91 92 | 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 | - - - - - - - - - + + + + + + + + + + | SRCS_FILES = OFFile.m \ OFINICategory.m \ OFINIFile.m \ OFSettings.m \ OFZIPArchive.m \ OFZIPArchiveEntry.m SRCS_PLUGINS = OFPlugin.m |
︙ |
Modified src/OFApplication.m from [65102b7290] to [0ce2c00df2].
︙ | |||
158 159 160 161 162 163 164 165 166 167 168 169 170 171 | 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 | + | exit(0); } + (void)terminateWithStatus: (int)status { #ifdef _PSP sceKernelExitGame(); abort(); /* sceKernelExitGame() is not marked noreturn */ #else exit(status); #endif } - init { |
︙ |
Modified src/OFBlock.m from [c478213743] to [536f7c35b9].
︙ | |||
237 238 239 240 241 242 243 | 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 | - - - + - + - + - - - + - + - + | { int flags = flags_ & (OF_BLOCK_FIELD_IS_BLOCK | OF_BLOCK_FIELD_IS_OBJECT | OF_BLOCK_FIELD_IS_BYREF); if (src_ == NULL) return; |
︙ |
Modified src/OFDate.m from [d311cf12a2] to [a9bad35577].
︙ | |||
506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 | 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 | + + + + | - (OFString*)dateStringWithFormat: (OFConstantString*)format { OFString *ret; time_t seconds = (time_t)_seconds; struct tm tm; size_t pageSize; #ifndef _WIN32 char *buffer; #else wchar_t *buffer; #endif if (seconds != floor(_seconds)) @throw [OFOutOfRangeException exception]; #ifdef HAVE_GMTIME_R if (gmtime_r(&seconds, &tm) == NULL) @throw [OFOutOfRangeException exception]; |
︙ | |||
537 538 539 540 541 542 543 | 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 | + - + + + + + + + + + + + + | # endif #endif pageSize = [OFSystemInfo pageSize]; buffer = [self allocMemoryWithSize: pageSize]; @try { #ifndef _WIN32 |
︙ | |||
585 586 587 588 589 590 591 | 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 | + - + + + + + + + + | # endif #endif pageSize = [OFSystemInfo pageSize]; buffer = [self allocMemoryWithSize: pageSize]; @try { #ifndef _WIN32 |
︙ |
Modified src/OFFile.h from [03d8a7c1d4] to [26137313b3].
︙ | |||
149 150 151 152 153 154 155 156 157 158 159 160 | 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 | + + - + + + - + - + + + + - + - + + + + - + | * @param path The new directory to change to */ + (void)changeCurrentDirectoryPath: (OFString*)path; /*! * @brief Returns the size of the specified file. * * @param path The path to the file whose path should be returned * * @return The size of the specified file */ + (of_offset_t)sizeOfFileAtPath: (OFString*)path; /*! |
︙ | |||
280 281 282 283 284 285 286 287 288 289 290 291 292 293 | 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 | + | + (void)createSymbolicLinkAtPath: (OFString*)destination withDestinationPath: (OFString*)source; /*! * @brief Returns the destination of the symbolic link at the specified path. * * @param path The path to the symbolic link * * @return The destination of the symbolic link at the specified path */ + (OFString*)destinationOfSymbolicLinkAtPath: (OFString*)path; #endif /*! * @brief Initializes an already allocated OFFile. |
︙ |
Modified src/OFFile.m from [2c4c5b7c7a] to [8dedd52409].
︙ | |||
50 51 52 53 54 55 56 57 58 59 60 61 62 63 | 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 | + | #ifdef __wii__ # define BOOL OGC_BOOL # include <fat.h> # undef BOOL #endif #ifdef OF_NINTENDO_DS # include <stdbool.h> # include <filesystem.h> #endif #import "OFFile.h" #import "OFString.h" #import "OFArray.h" #ifdef OF_HAVE_THREADS |
︙ | |||
115 116 117 118 119 120 121 | 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 | - + - + | # define S_IWOTH 0 #endif #define DEFAULT_MODE S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH #define DIR_MODE DEFAULT_MODE | S_IXUSR | S_IXGRP | S_IXOTH #if defined(OF_HAVE_CHOWN) && defined(OF_HAVE_THREADS) |
︙ | |||
203 204 205 206 207 208 209 | 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 | - + - + | @implementation OFFile + (void)initialize { if (self != [OFFile class]) return; #if defined(OF_HAVE_CHOWN) && defined(OF_HAVE_THREADS) |
︙ | |||
395 396 397 398 399 400 401 | 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 | - + | encoding = [OFSystemInfo native8BitEncoding]; if ((dir = opendir([path cStringWithEncoding: encoding])) == NULL) @throw [OFOpenItemFailedException exceptionWithPath: path errNo: errno]; # if !defined(HAVE_READDIR_R) && defined(OF_HAVE_THREADS) |
︙ | |||
444 445 446 447 448 449 450 | 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 | - + | [files addObject: file]; objc_autoreleasePoolPop(pool); } } @finally { closedir(dir); # if !defined(HAVE_READDIR_R) && defined(OF_HAVE_THREADS) |
︙ | |||
606 607 608 609 610 611 612 | 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 | - + | if (path == nil || (owner == nil && group == nil)) @throw [OFInvalidArgumentException exception]; encoding = [OFSystemInfo native8BitEncoding]; # ifdef OF_HAVE_THREADS |
︙ | |||
640 641 642 643 644 645 646 | 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 | - + | group: group errNo: errno]; gid = group_->gr_gid; } # ifdef OF_HAVE_THREADS } @finally { |
︙ | |||
1085 1086 1087 1088 1089 1090 1091 | 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 | + + + - + - + - + | length: (size_t)length { if (_fd == -1 || _atEndOfStream) @throw [OFWriteFailedException exceptionWithObject: self requestedLength: length]; #ifndef _WIN32 if (length > SSIZE_MAX) @throw [OFOutOfRangeException exception]; |
︙ |
Modified src/OFHTTPClient.m from [10e2ede1ff] to [824a74cbab].
︙ | |||
501 502 503 504 505 506 507 | 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 | - + | exceptionWithVersion: version]; status = (int)[[line substringWithRange: of_range(9, 3)] decimalValue]; serverHeaders = [OFMutableDictionary dictionary]; for (;;) { |
︙ | |||
544 545 546 547 548 549 550 551 552 553 554 555 556 557 | 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 | + + + + | do { tmp++; } while (*tmp == ' '); value = [OFString stringWithUTF8String: tmp]; old = [serverHeaders objectForKey: key]; if (old != nil) value = [old stringByAppendingFormat: @",%@", value]; [serverHeaders setObject: value forKey: key]; } [serverHeaders makeImmutable]; if ([_delegate respondsToSelector: |
︙ |
Modified src/OFHTTPServer.m from [0ddfcecf31] to [c9577b3169].
︙ | |||
449 450 451 452 453 454 455 | 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 | - + | _state = PARSING_HEADERS; return true; } - (bool)parseHeaders: (OFString*)line { |
︙ | |||
495 496 497 498 499 500 501 502 503 504 505 506 507 508 | 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 | + + + + | key = [line substringWithRange: of_range(0, pos)]; value = [line substringWithRange: of_range(pos + 1, [line length] - pos - 1)]; key = normalizedKey([key stringByDeletingTrailingWhitespaces]); value = [value stringByDeletingLeadingWhitespaces]; old = [_headers objectForKey: key]; if (old != nil) value = [old stringByAppendingFormat: @",%@", value]; [_headers setObject: value forKey: key]; if ([key isEqual: @"Host"]) { pos = [value rangeOfString: @":" options: OF_STRING_SEARCH_BACKWARDS].location; |
︙ |
Modified src/OFKernelEventObserver+Private.h from [e624333841] to [0581f9845e].
︙ | |||
15 16 17 18 19 20 21 | 15 16 17 18 19 20 21 22 23 24 25 | - - - - - | */ #import "OFKernelEventObserver.h" OF_ASSUME_NONNULL_BEGIN @interface OFKernelEventObserver (OF_PRIVATE_CATEGORY) |
Modified src/OFKernelEventObserver.h from [dd8f6e2345] to [b0b3935794].
︙ | |||
17 18 19 20 21 22 23 | 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | - - - - - | #import "OFObject.h" #import "socket.h" OF_ASSUME_NONNULL_BEGIN @class OFMutableArray OF_GENERIC(ObjectType); |
︙ | |||
110 111 112 113 114 115 116 | 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 | - - - - - | */ @interface OFKernelEventObserver: OFObject { OFMutableArray OF_GENERIC(id <OFReadyForReadingObserving>) *_readObjects; OFMutableArray OF_GENERIC(id <OFReadyForWritingObserving>) *_writeObjects; |
︙ |
Modified src/OFKernelEventObserver.m from [b099b55bf8] to [8054f8aa66].
︙ | |||
14 15 16 17 18 19 20 | 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 | - - - - - - - | * file. */ #define __NO_EXT_QNX #include "config.h" |
︙ | |||
51 52 53 54 55 56 57 | 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 | + + + - + - - - - - - | #import "OFInitializationFailedException.h" #import "OFInvalidArgumentException.h" #import "OFOutOfRangeException.h" #import "socket.h" #import "socket_helpers.h" #ifdef __wii__ /* FIXME: Add a port registry for Wii */ static uint16_t freePort = 65535; |
︙ | |||
104 105 106 107 108 109 110 | 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 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 | - - - + - + - - - - - - - - - - - - - - - + - - - - - - - + - - - - - - - - - + - - - - - - - + - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | @try { #if !defined(OF_HAVE_PIPE) && !defined(__wii__) socklen_t cancelAddrLen; #endif _readObjects = [[OFMutableArray alloc] init]; _writeObjects = [[OFMutableArray alloc] init]; |
︙ | |||
351 352 353 354 355 356 357 | 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 | + - - + + + + + + | } - (void)cancel { #ifdef OF_HAVE_PIPE OF_ENSURE(write(_cancelFD[1], "", 1) > 0); #else # ifndef __wii__ |
︙ |
Added src/OFKernelEventObserver_LockedQueue.h version [e60316af1b].
|
Added src/OFKernelEventObserver_LockedQueue.m version [dc0778aa90].