Changes In Branch 0.8 Through [da601d2a8a] Excluding Merge-Ins
This is equivalent to a diff from 6b8b7b6a7e to da601d2a8a
2015-10-04
| ||
11:12 | Special cases for the Wii's weird network stack check-in: 3f87c28a33 user: js tags: 0.8 | |
2015-10-03
| ||
14:24 | Add missing include for Nintendo DS check-in: da601d2a8a user: js tags: 0.8 | |
14:24 | Don't check for -pedantic for Nintendo DS check-in: 8f6ef2c686 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 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 [ac8ececf1f].
| 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/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/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 [768cc854c3].
︙ | |||
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 { |
︙ |
Modified src/OFObject.m from [8a0142f57a] to [920a5b1adb].
︙ | |||
226 227 228 229 230 231 232 233 | 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 | + + - + - - - - + + + + + - - - - + + + + + | objc_setForwardHandler((IMP)&of_forward, (IMP)&of_forward_stret); #endif #ifdef HAVE_OBJC_ENUMERATIONMUTATION objc_setEnumerationMutationHandler(enumerationMutationHandler); #endif of_hash_seed = 0; while (of_hash_seed == 0) { #if defined(HAVE_ARC4RANDOM) |
︙ |
Modified src/OFProcess.m from [30416b7510] to [dc696d6c83].
︙ | |||
564 565 566 567 568 569 570 | 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 | - + | #ifndef _WIN32 if (_readPipe[0] != -1) close(_readPipe[0]); if (_writePipe[1] != -1) close(_writePipe[1]); if (_pid != -1) { |
︙ |
Modified src/OFTCPSocket.h from [6382beb2ce] to [7dabca200d].
︙ | |||
61 62 63 64 65 66 67 68 69 70 71 72 73 74 | 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 | + + + | @interface OFTCPSocket: OFStreamSocket { bool _listening; struct sockaddr *_address; socklen_t _addressLength; OFString *_SOCKS5Host; uint16_t _SOCKS5Port; #ifdef __wii__ bool _keepAliveEnabled, _TCPNoDelayEnabled; #endif } #ifdef OF_HAVE_PROPERTIES @property (readonly, getter=isListening) bool listening; @property OF_NULLABLE_PROPERTY (copy) OFString *SOCKS5Host; @property uint16_t SOCKS5Port; @property (getter=isKeepAliveEnabled) bool keepAliveEnabled; |
︙ |
Modified src/OFTCPSocket.m from [85280ea39a] to [76989391ef].
︙ | |||
590 591 592 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 | 590 591 592 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 640 641 642 643 644 645 646 647 648 649 650 651 652 653 | + + + + + + + + + + + + + + + + | int v = enabled; if (setsockopt(_socket, SOL_SOCKET, SO_KEEPALIVE, (char*)&v, (socklen_t)sizeof(v)) != 0) @throw [OFSetOptionFailedException exceptionWithStream: self errNo: of_socket_errno()]; #ifdef __wii__ _keepAliveEnabled = enabled; #endif } - (bool)isKeepAliveEnabled { #ifndef __wii__ int v; socklen_t len = sizeof(v); if (getsockopt(_socket, SOL_SOCKET, SO_KEEPALIVE, (char*)&v, &len) != 0 || len != sizeof(v)) @throw [OFGetOptionFailedException exceptionWithStream: self errNo: of_socket_errno()]; return v; #else return _keepAliveEnabled; #endif } - (void)setTCPNoDelayEnabled: (bool)enabled { int v = enabled; if (setsockopt(_socket, IPPROTO_TCP, TCP_NODELAY, (char*)&v, (socklen_t)sizeof(v)) != 0) @throw [OFSetOptionFailedException exceptionWithStream: self errNo: of_socket_errno()]; #ifdef __wii__ _TCPNoDelayEnabled = enabled; #endif } - (bool)isTCPNoDelayEnabled { #ifndef __wii__ int v; socklen_t len = sizeof(v); if (getsockopt(_socket, IPPROTO_TCP, TCP_NODELAY, (char*)&v, &len) != 0 || len != sizeof(v)) @throw [OFGetOptionFailedException exceptionWithStream: self errNo: of_socket_errno()]; return v; #else return _TCPNoDelayEnabled; #endif } @end |
Modified src/OFThread.m from [785aa7fe26] to [8a7b628ccd].
︙ | |||
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 | 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 47 48 49 50 51 52 53 | + + + + + + + + + | * 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. */ #define OF_THREAD_M #define _POSIX_TIMERS #define __NO_EXT_QNX #include "config.h" #include <stdlib.h> #include <math.h> #include <time.h> /* Work around __block being used by glibc */ #ifdef __GLIBC__ # undef __USE_XOPEN #endif #ifndef _WIN32 # include <unistd.h> #endif #ifdef OF_HAVE_SCHED_YIELD # include <sched.h> #endif #ifdef __wii__ # define BOOL OGC_BOOL # define nanosleep ogc_nanosleep # include <ogcsys.h> # undef BOOL # undef nanosleep #endif #import "OFThread.h" #import "OFThread+Private.h" #import "OFRunLoop.h" #import "OFList.h" #import "OFDate.h" #import "OFDictionary.h" |
︙ |
Modified src/OFUDPSocket.h from [fa09b98560] to [322e298c3d].
︙ | |||
235 236 237 238 239 240 241 | 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 | - + | * @param buffer The buffer to send as a datagram * @param length The length of the buffer * @param receiver A pointer to an @ref of_udp_socket_address_t to which the * datagram should be sent */ - (void)sendBuffer: (const void*)buffer length: (size_t)length |
︙ |
Modified src/OFUDPSocket.m from [c798b7ff61] to [b3ff5858a7].
︙ | |||
521 522 523 524 525 526 527 | 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 | - + | length: length block: block]; } #endif - (void)sendBuffer: (const void*)buffer length: (size_t)length |
︙ |
Modified src/OFZIPArchive.m from [da28dbf09c] to [a813c350e7].
︙ | |||
115 116 117 118 119 120 121 | 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 | - + + + + + + + + + + + + + + + + | *data += 8; *size -= 8; return field; } static uint32_t |
︙ | |||
201 202 203 204 205 206 207 | 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 | - - - - - - - + - - | { void *pool = objc_autoreleasePoolPush(); uint16_t commentLength; of_offset_t offset = -22; bool valid = false; do { |
︙ | |||
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 | - + - + - + - | _centralDirectoryDisk == 0xFFFF || _centralDirectoryEntriesInDisk == 0xFFFF || _centralDirectoryEntries == 0xFFFF || _centralDirectorySize == 0xFFFFFFFF || _centralDirectoryOffset == 0xFFFFFFFF) { uint64_t offset64, size; |
︙ | |||
297 298 299 300 301 302 303 | 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 | + - + - | { void *pool = objc_autoreleasePoolPush(); size_t i; if ((of_offset_t)_centralDirectoryOffset != _centralDirectoryOffset) @throw [OFOutOfRangeException exception]; seekOrThrowInvalidFormat(_stream, |
︙ | |||
351 352 353 354 355 356 357 | 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 | - + - | [_lastReturnedStream release]; _lastReturnedStream = nil; offset64 = [entry OF_localFileHeaderOffset]; if ((of_offset_t)offset64 != offset64) @throw [OFOutOfRangeException exception]; |
︙ | |||
564 565 566 567 568 569 570 | 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 | - + | min = (length < _size ? length : (size_t)_size); ret = [_decompressedStream readIntoBuffer: buffer length: min]; _size -= ret; } |
Modified src/macros.h from [1619f8ecc0] to [a5359bc24a].
︙ | |||
173 174 175 176 177 178 179 | 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 | - - + + | #else # define OF_GENERIC(...) #endif #if __has_feature(nullability) # define OF_ASSUME_NONNULL_BEGIN _Pragma("clang assume_nonnull begin") # define OF_ASSUME_NONNULL_END _Pragma("clang assume_nonnull end") |
︙ |
Modified src/of_asprintf.m from [e5f48e3c7d] to [7771a499a7].
︙ | |||
24 25 26 27 28 29 30 31 32 33 34 35 36 37 | 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 | + + + + + + + + + + | #include <wchar.h> #include <sys/types.h> #import "OFString.h" #define MAX_SUBFORMAT_LEN 64 #ifndef HAVE_ASPRINTF /* * (v)asprintf might be declared, but HAVE_ASPRINTF not defined because * configure determined it is broken. In this case, we must make sure there is * no name clash. */ # define asprintf asprintf_ # define vasprintf vasprintf_ #endif struct context { const char *format; size_t formatLen; char subformat[MAX_SUBFORMAT_LEN + 1]; size_t subformatLen; va_list arguments; |
︙ |
Modified src/socket_helpers.h from [6beb9110b2] to [c6d03fb540].
︙ | |||
23 24 25 26 27 28 29 30 31 32 33 34 35 36 | 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 | + + | #ifdef HAVE_ARPA_INET_H # include <arpa/inet.h> #endif #ifdef HAVE_NETDB_H # include <netdb.h> #endif #include "socket.h" #ifndef INVALID_SOCKET # define INVALID_SOCKET -1 #endif #ifdef HAVE_GETADDRINFO # ifndef AI_NUMERICSERV |
︙ | |||
64 65 66 67 68 69 70 71 72 73 74 75 76 77 | 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 | + + | #ifdef __wii__ # define accept(sock, addr, addrlen) net_accept(sock, addr, addrlen) # define bind(sock, addr, addrlen) net_bind(sock, addr, addrlen) # define close(sock) net_close(sock) # define connect(sock, addr, addrlen) net_connect(sock, addr, addrlen) # define gethostbyname(name) net_gethostbyname(name) # define h_errno 0 # define hstrerror(err) "unknown (no hstrerror)" # define listen(sock, backlog) net_listen(sock, backlog) # define poll(fds, nfds, timeout) net_poll(fds, nfds, timeout) # define recv(sock, buf, len, flags) net_recv(sock, buf, len, flags) # define recvfrom(sock, buf, len, flags, addr, addrlen) \ net_recvfrom(sock, buf, len, flags, addr, addrlen) # define send(sock, buf, len, flags) net_send(sock, buf, len, flags) # define sendto(sock, buf, len, flags, addr, addrlen) \ |
︙ |
Modified utils/ofhttp/ProgressBar.m from [e84b0f1e4e] to [ea91008bdd].
︙ | |||
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 | + + + + + | * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this * file. */ #include "config.h" #include <math.h> #include <unistd.h> #ifdef HAVE_SYS_IOCTL_H # include <sys/ioctl.h> #endif #ifdef HAVE_SYS_TERMIOS_H # include <sys/termios.h> #endif #import "OFDate.h" #import "OFStdIOStream.h" #import "OFTimer.h" #import "ProgressBar.h" |
︙ |