Comment: | Add platform.h & make platform defines consistent |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
1ba08eebc50c52142681374191e2437a |
User & Date: | js on 2015-10-19 22:15:13 |
Other Links: | manifest | tags |
2015-10-24
| ||
20:53 | OFSystemInfo.h: Use OF_X86 rather than OF_X86_ASM check-in: 952af5f0aa user: js tags: trunk | |
2015-10-19
| ||
22:15 | Add platform.h & make platform defines consistent check-in: 1ba08eebc5 user: js tags: trunk | |
2015-10-18
| ||
09:22 | Remove +[OFSystemInfo supports{AltiVec,MXU}] check-in: de7e038127 user: js tags: trunk | |
Modified ObjFW.xcodeproj/project.pbxproj from [0d0a407551] to [f5563b5d2f].
︙ | |||
458 459 460 461 462 463 464 465 466 467 468 469 470 471 | 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 | + | 4BF33B10133807A20059CEF7 /* OFXMLParserTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B6EF67E1235358D0076B512 /* OFXMLParserTests.m */; }; 4BF33B11133807A20059CEF7 /* PropertiesTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B6EF67F1235358D0076B512 /* PropertiesTests.m */; }; 4BF33B12133807A20059CEF7 /* TestsAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B6EF6811235358D0076B512 /* TestsAppDelegate.m */; }; 4BF33B4713380CE20059CEF7 /* testfile.txt in CopyFiles */ = {isa = PBXBuildFile; fileRef = 4BF33B4313380CD40059CEF7 /* testfile.txt */; }; 4BF33B4813380D2D0059CEF7 /* testfile.bin in CopyFiles */ = {isa = PBXBuildFile; fileRef = 4BF33B4213380CD40059CEF7 /* testfile.bin */; }; 4BF48CE118A95F83000E8D04 /* OFBigDataArray.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BF48CDF18A95F83000E8D04 /* OFBigDataArray.h */; settings = {ATTRIBUTES = (Public, ); }; }; 4BF48CE218A95F83000E8D04 /* OFBigDataArray.m in Sources */ = {isa = PBXBuildFile; fileRef = 4BF48CE018A95F83000E8D04 /* OFBigDataArray.m */; }; 4BF69CE61BD44F8B00DFFC1B /* platform.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BF69CE51BD44F8B00DFFC1B /* platform.h */; settings = {ATTRIBUTES = (Public, ); }; }; 4BFF3714177E17C100192782 /* OFRemoveItemFailedException.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BFF3710177E17C100192782 /* OFRemoveItemFailedException.h */; settings = {ATTRIBUTES = (Public, ); }; }; 4BFF3715177E17C100192782 /* OFRemoveItemFailedException.m in Sources */ = {isa = PBXBuildFile; fileRef = 4BFF3711177E17C100192782 /* OFRemoveItemFailedException.m */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ 4B23CA8E133811B20047A1D9 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; |
︙ | |||
981 982 983 984 985 986 987 988 989 990 991 992 993 994 | 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 | + | 4BF1BCCE11C9663F0025511F /* OFXMLAttribute.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OFXMLAttribute.h; path = src/OFXMLAttribute.h; sourceTree = "<group>"; }; 4BF1BCCF11C9663F0025511F /* OFXMLAttribute.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = OFXMLAttribute.m; path = src/OFXMLAttribute.m; sourceTree = "<group>"; }; 4BF33AF0133807310059CEF7 /* Tests */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = Tests; sourceTree = BUILT_PRODUCTS_DIR; }; 4BF33B4213380CD40059CEF7 /* testfile.bin */ = {isa = PBXFileReference; lastKnownFileType = archive.macbinary; name = testfile.bin; path = tests/testfile.bin; sourceTree = "<group>"; }; 4BF33B4313380CD40059CEF7 /* testfile.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = testfile.txt; path = tests/testfile.txt; sourceTree = "<group>"; }; 4BF48CDF18A95F83000E8D04 /* OFBigDataArray.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OFBigDataArray.h; path = src/OFBigDataArray.h; sourceTree = "<group>"; }; 4BF48CE018A95F83000E8D04 /* OFBigDataArray.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = OFBigDataArray.m; path = src/OFBigDataArray.m; sourceTree = "<group>"; }; 4BF69CE51BD44F8B00DFFC1B /* platform.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = platform.h; path = src/platform.h; sourceTree = "<group>"; }; 4BFBDD1610A0724800051AFB /* unicode.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = unicode.m; path = src/unicode.m; sourceTree = "<group>"; }; 4BFF3710177E17C100192782 /* OFRemoveItemFailedException.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OFRemoveItemFailedException.h; path = src/exceptions/OFRemoveItemFailedException.h; sourceTree = "<group>"; }; 4BFF3711177E17C100192782 /* OFRemoveItemFailedException.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = OFRemoveItemFailedException.m; path = src/exceptions/OFRemoveItemFailedException.m; sourceTree = "<group>"; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ 4B187E0A163EA29F0049A832 /* Frameworks */ = { |
︙ | |||
1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 | 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 | + | 4BE17AD812FD744C002CEB0B /* foundation-compat.m */, 4BBA36C511406AB700CBA3AC /* macros.h */, 4BF1BCBF11C9663F0025511F /* objfw-defs.h.in */, 4BB50DCF12F863C700C9393F /* of_asprintf.h */, 4BB50DD012F863C700C9393F /* of_asprintf.m */, 4BA355BC14879BF700442EF4 /* of_strptime.h */, 4BA355B914879BDD00442EF4 /* of_strptime.m */, 4BF69CE51BD44F8B00DFFC1B /* platform.h */, 4B7769EB1895C07D00D12284 /* resolver.h */, 4B7769EC1895C07D00D12284 /* resolver.m */, 4B7DD58718943D4A00990FD6 /* socket.h */, 4B40EC1A189FE2650031E19E /* socket.m */, 4B7DD58118942FE200990FD6 /* socket_helpers.h */, 4B67998B1099E7C50041064A /* threading.h */, 4B3379CE1979326A0088E97E /* threading.m */, |
︙ | |||
1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 | 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 | + | 4B3D23E71337FCB000DD29B8 /* base64.h in Headers */, 4B837D7916829C5F007A3E83 /* block.h in Headers */, 4B837D7A16829C5F007A3E83 /* instance.h in Headers */, 4B3D23E81337FCB000DD29B8 /* macros.h in Headers */, 4BD98C03133814220048DD5B /* objfw-defs.h in Headers */, 4B3D23E91337FCB000DD29B8 /* of_asprintf.h in Headers */, 4BA355BD14879BF700442EF4 /* of_strptime.h in Headers */, 4BF69CE61BD44F8B00DFFC1B /* platform.h in Headers */, 4B7769ED1895C07D00D12284 /* resolver.h in Headers */, 4B7DD58818943D4A00990FD6 /* socket.h in Headers */, 4B3D23EA1337FCB000DD29B8 /* threading.h in Headers */, 4B3D23EB1337FCB000DD29B8 /* unicode.h in Headers */, 4B90B79E133AD87D00BD33CB /* OFAcceptFailedException.h in Headers */, 4B90B7A0133AD87D00BD33CB /* OFAddressTranslationFailedException.h in Headers */, 4B17FF7F133A2D17003E6DCD /* OFAllocFailedException.h in Headers */, |
︙ |
Modified configure.ac from [da2e0c30a4] to [3e1a1d120c].
︙ | |||
1002 1003 1004 1005 1006 1007 1008 | 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 | - - - - - - | AS_IF([test x"$enable_static" = x"yes" \ -o x"$enable_shared" = x"no"], [ AC_SUBST(OBJFW_BRIDGE_STATIC_LIB, "libobjfw-bridge.a") ]) ]) ]) |
︙ |
Modified src/Makefile from [7fcb9cfe27] to [a4f5f66d7c].
︙ | |||
117 118 119 120 121 122 123 | 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 | - + + | OFTLSSocket.h \ ObjFW.h \ autorelease.h \ ${ATOMIC_H} \ block.h \ instance.h \ macros.h \ |
︙ |
Modified src/OFApplication.h from [ed8ed6f607] to [9035033dca].
︙ | |||
59 60 61 62 63 64 65 | 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 | - + | * @warning You are not allowed to send any messages inside this method, as * message dispatching is not signal-safe! You are only allowed to do * signal-safe operations like setting a variable or calling a * signal-safe function! */ - (void)applicationDidReceiveSIGINT; |
︙ | |||
119 120 121 122 123 124 125 | 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 | - + | OFArray OF_GENERIC(OFString*) *_arguments; OFDictionary OF_GENERIC(OFString*, OFString*) *_environment; int *_argc; char ***_argv; @public id <OFApplicationDelegate> _delegate; void (*_SIGINTHandler)(id, SEL); |
︙ |
Modified src/OFApplication.m from [0ce2c00df2] to [dcc6f80f85].
︙ | |||
28 29 30 31 32 33 34 | 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 54 55 56 57 58 59 60 61 62 63 64 65 66 67 | - + - + - + - + | #import "OFDictionary.h" #import "OFSystemInfo.h" #import "OFRunLoop.h" #import "OFRunLoop+Private.h" #import "OFThread.h" #import "OFThread+Private.h" |
︙ | |||
81 82 83 84 85 86 87 | 81 82 83 84 85 86 87 88 89 90 91 92 93 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 | - + - + - + | static void \ handle##sig(int signal) \ { \ app->_##sig##Handler(app->_delegate, \ @selector(applicationDidReceive##sig)); \ } SIGNAL_HANDLER(SIGINT) |
︙ | |||
156 157 158 159 160 161 162 | 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 195 196 197 198 | - + - + - + - + | + (void)terminate { exit(0); } + (void)terminateWithStatus: (int)status { |
︙ | |||
325 326 327 328 329 330 331 | 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 | - + | [super dealloc]; } - (void)OF_setArgumentCount: (int*)argc andArgumentValues: (char***)argv { |
︙ | |||
362 363 364 365 366 367 368 | 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 | - + | objc_autoreleasePoolPop(pool); #else _argc = argc; _argv = argv; #endif } |
︙ | |||
427 428 429 430 431 432 433 | 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 | - + | _##sig##Handler = (void(*)(id, SEL))[(id)delegate \ methodForSelector: \ @selector(applicationDidReceive##sig)]; \ signal(sig, handle##sig); \ } else \ signal(sig, SIG_DFL); REGISTER_SIGNAL(SIGINT) |
︙ |
Modified src/OFBlock.m from [536f7c35b9] to [3d4ae6ee72].
︙ | |||
139 140 141 142 143 144 145 | 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 | - + | const char *ivar_layout; struct class_ext *ext; }; struct class _NSConcreteStackBlock; struct class _NSConcreteGlobalBlock; struct class _NSConcreteMallocBlock; |
︙ | |||
317 318 319 320 321 322 323 | 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 | - + | @throw [OFInitializationFailedException exceptionWithClass: self]; #endif #ifdef OF_APPLE_RUNTIME Class tmp; |
︙ |
Modified src/OFFile.h from [5c6bbab5b7] to [c4caacba67].
︙ | |||
24 25 26 27 28 29 30 | 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 | - + | #include <sys/types.h> #include <sys/stat.h> #import "OFSeekableStream.h" OF_ASSUME_NONNULL_BEGIN |
︙ |
Modified src/OFFile.m from [b4e2a23749] to [1adeb95012].
︙ | |||
17 18 19 20 21 22 23 | 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | + + - + | #include "config.h" #include <errno.h> #include <fcntl.h> #include <unistd.h> #include "platform.h" |
︙ | |||
40 41 42 43 44 45 46 | 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 | - + | #import "OFInvalidArgumentException.h" #import "OFOpenItemFailedException.h" #import "OFOutOfRangeException.h" #import "OFReadFailedException.h" #import "OFSeekFailedException.h" #import "OFWriteFailedException.h" |
︙ | |||
112 113 114 115 116 117 118 | 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 | - + | @implementation OFFile + (void)initialize { if (self != [OFFile class]) return; |
︙ | |||
156 157 158 159 160 161 162 | 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 | - + | int flags; if ((flags = parseMode([mode UTF8String])) == -1) @throw [OFInvalidArgumentException exception]; flags |= O_CLOEXEC; |
︙ | |||
204 205 206 207 208 209 210 | 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 | - + | { ssize_t ret; if (_fd == -1 || _atEndOfStream) @throw [OFReadFailedException exceptionWithObject: self requestedLength: length]; |
︙ | |||
232 233 234 235 236 237 238 | 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 | - + | - (void)lowlevelWriteBuffer: (const void*)buffer length: (size_t)length { if (_fd == -1 || _atEndOfStream) @throw [OFWriteFailedException exceptionWithObject: self requestedLength: length]; |
︙ | |||
254 255 256 257 258 259 260 | 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 | - + | errNo: errno]; #endif } - (of_offset_t)lowlevelSeekToOffset: (of_offset_t)offset whence: (int)whence { |
︙ |
Modified src/OFFileManager.m from [7e257a10c2] to [737527b063].
︙ | |||
53 54 55 56 57 58 59 | 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 | - + | #import "OFOpenItemFailedException.h" #import "OFOutOfMemoryException.h" #import "OFReadFailedException.h" #import "OFRemoveItemFailedException.h" #import "OFStatItemFailedException.h" #import "OFUnlockFailedException.h" |
︙ | |||
79 80 81 82 83 84 85 | 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 | - + - + - + | #define DIR_MODE DEFAULT_MODE | S_IXUSR | S_IXGRP | S_IXOTH static OFFileManager *defaultManager; #if defined(OF_HAVE_CHOWN) && defined(OF_HAVE_THREADS) static of_mutex_t chownMutex; #endif |
︙ | |||
139 140 141 142 143 144 145 | 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 | - + - + - + | #if defined(OF_HAVE_CHOWN) && defined(OF_HAVE_THREADS) if (!of_mutex_new(&chownMutex)) @throw [OFInitializationFailedException exceptionWithClass: self]; #endif |
︙ | |||
232 233 234 235 236 237 238 | 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 | - + | #endif - (void)createDirectoryAtPath: (OFString*)path { if (path == nil) @throw [OFInvalidArgumentException exception]; |
︙ | |||
289 290 291 292 293 294 295 | 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 | - + - + | objc_autoreleasePoolPop(pool); } - (OFArray*)contentsOfDirectoryAtPath: (OFString*)path { OFMutableArray *files; |
︙ | |||
414 415 416 417 418 419 420 | 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 | - + | } - (void)changeCurrentDirectoryPath: (OFString*)path { if (path == nil) @throw [OFInvalidArgumentException exception]; |
︙ | |||
491 492 493 494 495 496 497 | 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 | - + | #ifdef OF_HAVE_CHMOD - (void)changePermissionsOfItemAtPath: (OFString*)path permissions: (mode_t)permissions { if (path == nil) @throw [OFInvalidArgumentException exception]; |
︙ | |||
718 719 720 721 722 723 724 | 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 743 744 745 746 747 | - + - + | } - (void)moveItemAtPath: (OFString*)source toPath: (OFString*)destination { void *pool; of_stat_t s; |
︙ | |||
820 821 822 823 824 825 826 | 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 | - + | [self removeItemAtPath: [path stringByAppendingPathComponent: item]]; objc_autoreleasePoolPop(pool2); } } |
︙ |
Modified src/OFKernelEventObserver.m from [23a24b058b] to [6ae3a0050f].
︙ | |||
37 38 39 40 41 42 43 | 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 | - + - + | #ifdef HAVE_KQUEUE # import "OFKernelEventObserver_kqueue.h" #endif #ifdef HAVE_EPOLL # import "OFKernelEventObserver_epoll.h" #endif |
︙ | |||
82 83 84 85 86 87 88 | 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 | - + - + - + | + alloc { if (self == [OFKernelEventObserver class]) #if defined(HAVE_KQUEUE) return [OFKernelEventObserver_kqueue alloc]; #elif defined(HAVE_EPOLL) return [OFKernelEventObserver_epoll alloc]; |
︙ | |||
123 124 125 126 127 128 129 | 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 | - + - + | @throw [OFInitializationFailedException exceptionWithClass: [self class]]; _cancelAddr.sin_family = AF_INET; _cancelAddr.sin_port = 0; _cancelAddr.sin_addr.s_addr = inet_addr("127.0.0.1"); |
︙ | |||
160 161 162 163 164 165 166 | 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 | - + | - (void)dealloc { close(_cancelFD[0]); if (_cancelFD[1] != _cancelFD[0]) close(_cancelFD[1]); |
︙ | |||
356 357 358 359 360 361 362 | 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 | - + | } - (void)cancel { #ifdef OF_HAVE_PIPE OF_ENSURE(write(_cancelFD[1], "", 1) > 0); #else |
︙ |
Modified src/OFKernelEventObserver_kqueue.m from [306f8337d7] to [80111af3e0].
︙ | |||
93 94 95 96 97 98 99 | 93 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 | - + - + | if ([_changeList count] >= INT_MAX) @throw [OFOutOfRangeException exception]; memset(&event, 0, sizeof(event)); event.ident = [object fileDescriptorForReading]; event.filter = EVFILT_READ; event.flags = EV_ADD; |
︙ |
Modified src/OFKernelEventObserver_poll.m from [85d67fd51b] to [14102c57fc].
︙ | |||
31 32 33 34 35 36 37 | 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 | - + | #import "OFDataArray.h" #import "OFObserveFailedException.h" #import "OFOutOfRangeException.h" #import "socket_helpers.h" |
︙ |
Modified src/OFKernelEventObserver_select.h from [ff27d287c3] to [9b429b52d8].
︙ | |||
9 10 11 12 13 14 15 16 17 18 19 20 21 22 | 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | + + | * the packaging of this file. * * 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 "objfw-defs.h" #ifndef __STDC_LIMIT_MACROS # define __STDC_LIMIT_MACROS #endif #ifndef __STDC_CONSTANT_MACROS # define __STDC_CONSTANT_MACROS #endif |
︙ |
Modified src/OFKernelEventObserver_select.m from [a00b377b97] to [46057c9c67].
︙ | |||
14 15 16 17 18 19 20 | 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | + + - + | * file. */ #define __NO_EXT_QNX #include "config.h" #include "platform.h" |
︙ | |||
41 42 43 44 45 46 47 | 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 | - + | #import "socket_helpers.h" @implementation OFKernelEventObserver_select - init { self = [super init]; |
︙ | |||
65 66 67 68 69 70 71 | 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 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 | - + - + - + - + | - (void)OF_addObjectForReading: (id)object { int fd = [object fileDescriptorForReading]; if (fd < 0 || fd > INT_MAX - 1) @throw [OFOutOfRangeException exception]; |
︙ | |||
157 158 159 160 161 162 163 | 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 | - + | /* * We cast to int before assigning to tv_usec in order to avoid a * warning with Apple GCC on PPC. POSIX defines this as suseconds_t, * however, this is not available on Win32. As an int should always * satisfy the required range, we just cast to int. */ |
︙ |
Modified src/OFObject.h from [43c8c1be65] to [baf6f7542e].
︙ | |||
10 11 12 13 14 15 16 | 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | - + | * * 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. */ |
︙ |
Modified src/OFObject.m from [920a5b1adb] to [fa72960651].
︙ | |||
42 43 44 45 46 47 48 | 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 | - + | #if defined(OF_APPLE_RUNTIME) && __OBJC2__ # import <objc/objc-exception.h> #elif defined(OF_OBJFW_RUNTIME) # import "runtime.h" #endif |
︙ |
Modified src/OFPlugin.h from [d438cd40a3] to [af10612f15].
︙ | |||
14 15 16 17 18 19 20 | 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | - + | * file. */ #import "OFObject.h" @class OFString; |
︙ |
Modified src/OFPlugin.m from [e05c354263] to [ac9fc693b2].
︙ | |||
25 26 27 28 29 30 31 | 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 54 55 56 | - + - + | #import "OFPlugin.h" #import "OFString.h" #import "OFSystemInfo.h" #import "OFInitializationFailedException.h" |
︙ |
Modified src/OFProcess.h from [c6a99c7fe3] to [8a69d4d07e].
︙ | |||
22 23 24 25 26 27 28 | 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 | - + - + | #endif #include <sys/types.h> #import "OFStream.h" #import "OFString.h" |
︙ |
Modified src/OFProcess.m from [09488f3c9c] to [b8e8f16191].
︙ | |||
20 21 22 23 24 25 26 | 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 | + + - + | #include <string.h> /* Work around __block being used by glibc */ #ifdef __GLIBC__ # undef __USE_XOPEN #endif #include "platform.h" |
︙ | |||
42 43 44 45 46 47 48 | 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 | - + - + - + | #import "OFSystemInfo.h" #import "OFInitializationFailedException.h" #import "OFOutOfRangeException.h" #import "OFReadFailedException.h" #import "OFWriteFailedException.h" |
︙ | |||
134 135 136 137 138 139 140 | 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 | - + | programName: (OFString*)programName arguments: (OFArray*)arguments environment: (OFDictionary*)environment { self = [super init]; @try { |
︙ | |||
335 336 337 338 339 340 341 | 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 | - + | - (void)dealloc { [self close]; [super dealloc]; } |
︙ | |||
433 434 435 436 437 438 439 | 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 | - + - + - - - - + + | return [env items]; } #endif - (bool)lowlevelIsAtEndOfStream { |
︙ | |||
489 490 491 492 493 494 495 | 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 | - + | return ret; } - (void)lowlevelWriteBuffer: (const void*)buffer length: (size_t)length { |
︙ | |||
527 528 529 530 531 532 533 | 527 528 529 530 531 532 533 534 535 536 537 538 539 540 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 | - + - + - + - + | errNo: errNo]; } #endif } - (int)fileDescriptorForReading { |
︙ |
Modified src/OFSeekableStream.h from [f5b4d92235] to [b72c69a25c].
︙ | |||
23 24 25 26 27 28 29 | 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 | - + | #include <sys/types.h> #import "OFStream.h" OF_ASSUME_NONNULL_BEGIN |
︙ |
Modified src/OFStdIOStream.m from [8e10193c2f] to [18f864f44a].
︙ | |||
99 100 101 102 103 104 105 | 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 | - + | { ssize_t ret; if (_fd == -1 || _atEndOfStream) @throw [OFReadFailedException exceptionWithObject: self requestedLength: length]; |
︙ | |||
127 128 129 130 131 132 133 | 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 | - + | - (void)lowlevelWriteBuffer: (const void*)buffer length: (size_t)length { if (_fd == -1 || _atEndOfStream) @throw [OFWriteFailedException exceptionWithObject: self requestedLength: length]; |
︙ |
Modified src/OFStream.m from [6ab65dacbe] to [17ac0272c3].
︙ | |||
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 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 | + + - + - + | #include <stdarg.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <fcntl.h> #include "platform.h" |
︙ |
Modified src/OFStreamSocket.m from [5f9b6a238d] to [5d34917197].
︙ | |||
62 63 64 65 66 67 68 | 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 | - + | @throw [OFNotOpenException exceptionWithObject: self]; if (_atEndOfStream) @throw [OFReadFailedException exceptionWithObject: self requestedLength: length errNo: ENOTCONN]; |
︙ | |||
96 97 98 99 100 101 102 | 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 | - + - + - + - + | @throw [OFNotOpenException exceptionWithObject: self]; if (_atEndOfStream) @throw [OFWriteFailedException exceptionWithObject: self requestedLength: length errNo: ENOTCONN]; |
︙ |
Modified src/OFString.m from [2be273de51] to [0176c8e382].
︙ | |||
58 59 60 61 62 63 64 | 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 | - + | #import "of_asprintf.h" #import "unicode.h" /* * It seems strtod is buggy on Win32. * However, the MinGW version __strtod seems to be ok. */ |
︙ |
Modified src/OFSystemInfo.m from [df1cd50578] to [016d812c99].
︙ | |||
30 31 32 33 34 35 36 | 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 | - + - + - + - + | #import "OFString.h" #import "OFArray.h" #import "OFDictionary.h" #import "OFApplication.h" #import "OFNotImplementedException.h" |
︙ | |||
97 98 99 100 101 102 103 | 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 | - + - + | @implementation OFSystemInfo + (void)initialize { if (self != [OFSystemInfo class]) return; |
︙ | |||
142 143 144 145 146 147 148 | 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 | - + | /* FIXME */ return OF_STRING_ENCODING_UTF_8; } + (OFString*)userDataPath { /* TODO: Return something more sensible for iOS */ |
︙ | |||
173 174 175 176 177 178 179 | 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 | - + - + | } [path makeImmutable]; [path retain]; objc_autoreleasePoolPop(pool); return [path autorelease]; |
︙ | |||
222 223 224 225 226 227 228 | 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 | - + | return [var autorelease]; #endif } + (OFString*)userConfigPath { /* TODO: Return something more sensible for iOS */ |
︙ | |||
255 256 257 258 259 260 261 | 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 | - + - + | [path appendString: @"/Preferences"]; [path makeImmutable]; [path retain]; objc_autoreleasePoolPop(pool); return [path autorelease]; |
︙ |
Modified src/OFTCPSocket.h from [55b987fd74] to [8b426328b2].
︙ | |||
61 62 63 64 65 66 67 | 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 | - + | @interface OFTCPSocket: OFStreamSocket { bool _listening; struct sockaddr *_address; socklen_t _addressLength; OFString *_SOCKS5Host; uint16_t _SOCKS5Port; |
︙ |
Modified src/OFTCPSocket.m from [a3e1049524] to [7248d669cd].
︙ | |||
11 12 13 14 15 16 17 | 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | - | * 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_TCP_SOCKET_M |
︙ | |||
236 237 238 239 240 241 242 | 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 | - + | return self; } - (void)close { [super close]; |
︙ | |||
385 386 387 388 389 390 391 | 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 | - + - + - + | #endif - (uint16_t)bindToHost: (OFString*)host port: (uint16_t)port { of_resolver_result_t **results; const int one = 1; |
︙ | |||
457 458 459 460 461 462 463 | 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 | - + - + - + | @throw [OFBindFailedException exceptionWithHost: host port: port socket: self errNo: errNo]; } } @catch (id e) { |
︙ | |||
621 622 623 624 625 626 627 | 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 | - + - + | if (setsockopt(_socket, SOL_SOCKET, SO_KEEPALIVE, (char*)&v, (socklen_t)sizeof(v)) != 0) @throw [OFSetOptionFailedException exceptionWithStream: self errNo: of_socket_errno()]; |
︙ | |||
654 655 656 657 658 659 660 | 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 | - + - + | if (setsockopt(_socket, IPPROTO_TCP, TCP_NODELAY, (char*)&v, (socklen_t)sizeof(v)) != 0) @throw [OFSetOptionFailedException exceptionWithStream: self errNo: of_socket_errno()]; |
︙ |
Modified src/OFThread.m from [8a7b628ccd] to [89cb894f3a].
︙ | |||
25 26 27 28 29 30 31 | 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 54 55 56 57 58 59 60 61 62 63 64 65 66 | + + - + - + - + | #include <time.h> /* Work around __block being used by glibc */ #ifdef __GLIBC__ # undef __USE_XOPEN #endif #include "platform.h" |
︙ | |||
172 173 174 175 176 177 178 | 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 | - + | #endif + (void)sleepForTimeInterval: (of_time_interval_t)timeInterval { if (timeInterval < 0) return; |
︙ |
Modified src/OFUDPSocket.h from [3a06e39684] to [441994c3e5].
︙ | |||
86 87 88 89 90 91 92 | 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 | - + | * than one thread at the same time is not thread-safe, even if copy * was called to create one "instance" for every thread! */ @interface OFUDPSocket: OFObject <OFCopying, OFReadyForReadingObserving, OFReadyForWritingObserving> { of_socket_t _socket; |
︙ |
Modified src/OFUDPSocket.m from [b7f838da94] to [3db951aa5f].
︙ | |||
181 182 183 184 185 186 187 | 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 | - + | #endif if (address1->address.ss_family != address2->address.ss_family) return false; switch (address1->address.ss_family) { case AF_INET: |
︙ | |||
239 240 241 242 243 244 245 | 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 | - + | size_t i; #endif hash += address->address.ss_family; switch (address->address.ss_family) { case AF_INET: |
︙ | |||
382 383 384 385 386 387 388 | 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 | - + - + - + | return [self retain]; } - (uint16_t)bindToHost: (OFString*)host port: (uint16_t)port { of_resolver_result_t **results; |
︙ | |||
444 445 446 447 448 449 450 | 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 | - + - + - + | @throw [OFBindFailedException exceptionWithHost: host port: port socket: self errNo: errNo]; } } @catch (id e) { |
︙ | |||
501 502 503 504 505 506 507 | 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 | - + | ssize_t ret; if (_socket == INVALID_SOCKET) @throw [OFNotOpenException exceptionWithObject: self]; sender->length = (socklen_t)sizeof(sender->address); |
︙ | |||
554 555 556 557 558 559 560 | 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 | - + | - (void)sendBuffer: (const void*)buffer length: (size_t)length receiver: (const of_udp_socket_address_t*)receiver { if (_socket == INVALID_SOCKET) @throw [OFNotOpenException exceptionWithObject: self]; |
︙ | |||
586 587 588 589 590 591 592 | 586 587 588 589 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 | - + - + - + | - (void)cancelAsyncRequests { [OFRunLoop OF_cancelAsyncRequestsForObject: self]; } - (int)fileDescriptorForReading { |
Modified src/ObjFW.h from [4de76fa1b8] to [e6ab3b372e].
︙ | |||
10 11 12 13 14 15 16 | 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | - - | * * 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. */ |
︙ |
Modified src/atomic.h from [cc8d24b757] to [6e95bb1842].
︙ | |||
10 11 12 13 14 15 16 | 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | + + - + - - - - | * * 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 <stdlib.h> |
︙ | |||
56 57 58 59 60 61 62 | 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 | - + | : "r"(i), "m"(*p) ); # endif else abort(); return i; |
︙ | |||
92 93 94 95 96 97 98 | 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 | - + | "xaddl %0, %2\n\t" "addl %1, %0" : "+&r"(i) : "r"(i), "m"(*p) ); return i; |
︙ | |||
138 139 140 141 142 143 144 | 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 | - + | "xaddl %0, %2\n\t" "addl %1, %0" : "+&r"(i) : "r"(i), "m"(*p) ); return (void*)i; |
︙ | |||
193 194 195 196 197 198 199 | 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 | - + | : "r"(i), "m"(*p) ); # endif else abort(); return i; |
︙ | |||
230 231 232 233 234 235 236 | 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 | - + | "xaddl %0, %2\n\t" "subl %1, %0" : "+&r"(i) : "r"(i), "m"(*p) ); return i; |
︙ | |||
278 279 280 281 282 283 284 | 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 | - + | "xaddl %0, %2\n\t" "subl %1, %0" : "+&r"(i) : "r"(i), "m"(*p) ); return (void*)i; |
︙ | |||
337 338 339 340 341 342 343 | 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 | - + | : "m"(*p) ); # endif else abort(); return i; |
︙ | |||
379 380 381 382 383 384 385 | 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 | - + | "xaddl %0, %1\n\t" "incl %0" : "=&r"(i) : "m"(*p) ); return i; |
︙ | |||
436 437 438 439 440 441 442 | 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 | - + | : "m"(*p) ); # endif else abort(); return i; |
︙ | |||
478 479 480 481 482 483 484 | 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 | - + | "xaddl %0, %1\n\t" "decl %0" : "=&r"(i) : "m"(*p) ); return i; |
︙ | |||
539 540 541 542 543 544 545 | 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 | - + | : "rax", "cc" ); # endif else abort(); return i; |
︙ | |||
580 581 582 583 584 585 586 | 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 | - + | "jne 0b" : "=&r"(i) : "r"(i), "m"(*p) : "eax", "cc" ); return i; |
︙ | |||
639 640 641 642 643 644 645 | 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 | - + | : "rax", "cc" ); # endif else abort(); return i; |
︙ | |||
680 681 682 683 684 685 686 | 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 | - + | "jne 0b" : "=&r"(i) : "r"(i), "m"(*p) : "eax", "cc" ); return i; |
︙ | |||
739 740 741 742 743 744 745 | 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 | - + | : "rax", "cc" ); # endif else abort(); return i; |
︙ | |||
780 781 782 783 784 785 786 | 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 | - + | "jne 0b" : "=&r"(i) : "r"(i), "m"(*p) : "eax", "cc" ); return i; |
︙ | |||
825 826 827 828 829 830 831 | 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 | - + | "movzbl %b0, %0" : "=&d"(r), "+a"(o) /* use d instead of r to avoid a gcc bug */ : "r"(n), "m"(*p) : "cc" ); return r; |
︙ | |||
880 881 882 883 884 885 886 | 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 | - + | "movzbl %b0, %0" : "=&d"(r), "+a"(o) /* use d instead of r to avoid a gcc bug */ : "r"(n), "m"(*p) : "cc" ); return r; |
︙ | |||
936 937 938 939 940 941 942 | 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 | - + | "movzbl %b0, %0" : "=&d"(r), "+a"(o) /* use d instead of r to avoid a gcc bug */ : "r"(n), "m"(*p) : "cc" ); return r; |
︙ | |||
973 974 975 976 977 978 979 | 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 | - + | of_memory_barrier(void) { #if !defined(OF_HAVE_THREADS) #elif defined(OF_X86_64_ASM) || defined(OF_X86_ASM) __asm__ __volatile__ ( "mfence" ); |
︙ |
Modified src/base64.h from [3f2eb41d3c] to [7871254245].
︙ | |||
10 11 12 13 14 15 16 | 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | - - | * * 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. */ |
︙ |
Modified src/exceptions/OFAddressTranslationFailedException.m from [94c73dbbc8] to [5232ed313d].
︙ | |||
105 106 107 108 109 110 111 | 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 | - + - + | [super dealloc]; } - (OFString*)description { /* FIXME: Add proper description for Win32 */ |
︙ |
Modified src/exceptions/OFException.h from [27f0d07f48] to [b18e7dc1e3].
︙ | |||
20 21 22 23 24 25 26 | 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 | - + | #ifndef DOXYGEN @class OFArray OF_GENERIC(ObjectType); @class OFMutableArray OF_GENERIC(ObjectType); #endif #define OF_BACKTRACE_SIZE 32 |
︙ |
Modified src/exceptions/OFException.m from [ca1be9d395] to [ef5117f29b].
︙ | |||
34 35 36 37 38 39 40 | 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 | - + | #import "OFLockFailedException.h" #import "OFUnlockFailedException.h" #if !defined(HAVE_STRERROR_R) && defined(OF_HAVE_THREADS) # import "threading.h" #endif |
︙ | |||
70 71 72 73 74 75 76 | 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 | - + | struct backtrace_ctx { void **backtrace; uint_fast8_t i; }; extern _Unwind_Reason_Code _Unwind_Backtrace( _Unwind_Reason_Code(*)(struct _Unwind_Context*, void*), void*); |
︙ | |||
96 97 98 99 100 101 102 | 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 | - + | of_strerror(int errNo) { OFString *ret; #ifdef HAVE_STRERROR_R char buffer[256]; #endif |
︙ | |||
211 212 213 214 215 216 217 | 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 | - + | #ifdef HAVE_DWARF_EXCEPTIONS static _Unwind_Reason_Code backtrace_callback(struct _Unwind_Context *ctx, void *data) { struct backtrace_ctx *bt = data; if (bt->i < OF_BACKTRACE_SIZE) { |
︙ |
Modified src/forwarding/Makefile from [fde13c9caa] to [e70b0ece60].
1 2 3 4 5 6 7 8 9 | 1 2 3 4 5 6 7 8 9 10 | - + | include ../../extra.mk STATIC_PIC_LIB_NOINST = ${FORWARDING_LIB_A} STATIC_LIB_NOINST = ${FORWARDING_A} SRCS = forwarding.S include ../../buildsys.mk |
Modified src/forwarding/forwarding-arm-elf.S from [8e94004cc0] to [c36bf531d2].
︙ | |||
12 13 14 15 16 17 18 19 20 21 22 23 24 25 | 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | + + | * 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 "config.h" #include "platform.h" .globl of_forward .globl of_forward_stret .section .text of_forward: #ifdef HAVE_VFP2 fstmfdd sp!, {d0-d7} |
︙ | |||
163 164 165 166 167 168 169 | 165 166 167 168 169 170 171 172 173 174 | - + | .long 0, sel_forwardingTargetForSelector_ .short 0, 0 .long 0 .long 0 module: .long 8, 16, 0, symtab |
Modified src/forwarding/forwarding-mips-elf.S from [287653bc74] to [a97bf3f098].
︙ | |||
12 13 14 15 16 17 18 19 20 21 | 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 | + + - + - + | * 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 "config.h" #include "platform.h" .globl of_forward .globl of_forward_stret |
︙ | |||
58 59 60 61 62 63 64 | 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 | - + - + | sw $s0, 20($sp) sw $s1, 24($sp) sw $a0, 28($sp) sw $a1, 32($sp) sw $a2, 36($sp) sw $a3, 40($sp) |
︙ | |||
114 115 116 117 118 119 120 | 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 | - + | sw $v0, 28($sp) move $gp, $s0 move $a0, $v0 lw $a1, 32($sp) jal_pic objc_msg_lookup |
︙ | |||
159 160 161 162 163 164 165 | 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 | - + | addiu $sp, $sp, 96 j_pic of_method_not_found .type of_forward, %function .size of_forward, .-of_forward of_forward_stret: |
︙ | |||
182 183 184 185 186 187 188 | 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 | - + - + | sw $s0, 20($sp) sw $s1, 24($sp) sw $a0, 28($sp) sw $a1, 32($sp) sw $a2, 36($sp) sw $a3, 40($sp) |
︙ | |||
239 240 241 242 243 244 245 | 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 | - + | sw $v0, 32($sp) move $gp, $s0 move $a0, $v0 lw $a1, 36($sp) jal_pic objc_msg_lookup_stret |
︙ | |||
285 286 287 288 289 290 291 | 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 | - + | addiu $sp, $sp, 96 j_pic of_method_not_found_stret .type of_forward_stret, %function .size of_forward_stret, .-of_forward_stret init: |
︙ | |||
319 320 321 322 323 324 325 | 321 322 323 324 325 326 327 328 329 330 | - + | .long 0, sel_forwardingTargetForSelector_ .short 0, 0 .long 0 .long 0 module: .long 8, 16, 0, symtab |
Modified src/forwarding/forwarding-ppc-elf.S from [df6435beab] to [c4a4dfcf7c].
︙ | |||
12 13 14 15 16 17 18 19 20 21 22 23 24 25 | 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | + + | * 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 "config.h" #include "platform.h" .globl of_forward .globl of_forward_stret .section .text of_forward: stwu %r1, -112(%r1) mflr %r0 |
︙ | |||
232 233 234 235 236 237 238 | 234 235 236 237 238 239 240 241 242 243 | - + | .long 0, sel_forwardingTargetForSelector_ .short 0, 0 .long 0 .long 0 module: .long 8, 16, 0, symtab |
Modified src/forwarding/forwarding-x86-elf.S from [f3271edd35] to [677c89c5d9].
︙ | |||
12 13 14 15 16 17 18 19 20 21 22 23 24 25 | 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | + + | * 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 "config.h" #include "platform.h" .globl of_forward .globl of_forward_stret .section .text of_forward: pushl %ebp movl %esp, %ebp |
︙ | |||
198 199 200 201 202 203 204 | 200 201 202 203 204 205 206 207 208 209 | - + | .long 0, sel_forwardingTargetForSelector_ .short 0, 0 .long 0 .long 0 module: .long 8, 16, 0, symtab |
Modified src/forwarding/forwarding-x86_64-elf.S from [3571ec6513] to [286d06a2f8].
︙ | |||
12 13 14 15 16 17 18 19 20 21 22 23 24 25 | 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | + + | * 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 "config.h" #include "platform.h" .globl of_forward .globl of_forward_stret .section .text of_forward: pushq %rbp movq %rsp, %rbp |
︙ | |||
211 212 213 214 215 216 217 | 213 214 215 216 217 218 219 220 221 222 | - + | .quad 0, sel_forwardingTargetForSelector_ .short 0, 0 .long 0 .quad 0 module: .quad 8, 32, 0, symtab |
Modified src/forwarding/forwarding.S from [24819a0e71] to [1dd265bebc].
︙ | |||
11 12 13 14 15 16 17 18 19 | 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. */ #include "config.h" #include "platform.h" #ifdef OF_APPLE_RUNTIME |
Modified src/macros.h from [57b5109a4c] to [2ef46745a0].
︙ | |||
10 11 12 13 14 15 16 | 10 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 | - + + + | * * 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. */ |
︙ | |||
72 73 74 75 76 77 78 | 74 75 76 77 78 79 80 81 82 83 84 85 86 87 | - - - - - - - - - - | # define OF_INLINE inline # define OF_LIKELY(cond) cond # define OF_UNLIKELY(cond) cond # define OF_CONST_FUNC # define OF_NO_RETURN_FUNC #endif |
︙ | |||
227 228 229 230 231 232 233 | 219 220 221 222 223 224 225 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 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 | - - + - - + - - - - - - - - - - - - - - - - + + + + + + + + + + - - - - - - + + + - - + - - - - + + - - + - - - - + + - - - - + - - - - - - - - + + - - - + + + - - - - - - - - - - + + - + | # define OF_SUBCLASSING_RESTRICTED \ __attribute__((__objc_subclassing_restricted__)) #else # define OF_SUBCLASSING_RESTRICTED #endif #ifdef __GNUC__ |
︙ | |||
403 404 405 406 407 408 409 | 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 | - + | return __builtin_bswap16(i); #elif defined(OF_X86_64_ASM) || defined(OF_X86_ASM) __asm__ ( "xchgb %h0, %b0" : "=Q"(i) : "0"(i) ); |
︙ | |||
433 434 435 436 437 438 439 | 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 | - + | return __builtin_bswap32(i); #elif defined(OF_X86_64_ASM) || defined(OF_X86_ASM) __asm__ ( "bswap %0" : "=q"(i) : "0"(i) ); |
︙ |
Modified src/of_asprintf.m from [7771a499a7] to [4c2fb9e2fa].
︙ | |||
210 211 212 213 214 215 216 | 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 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 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 | - + - + - + - + - + | ctx->lengthModifier = LENGTH_MODIFIER_H; } break; case 'l': /* and also ll */ if (ctx->formatLen > ctx->i + 1 && ctx->format[ctx->i + 1] == 'l') { |
︙ |
Modified src/of_strptime.m from [14e7795c0f] to [11e23bd91e].
︙ | |||
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 | + + | */ #include "config.h" #include <string.h> #include <time.h> #include "macros.h" const char* of_strptime(const char *buffer, const char *format, struct tm *tm) { enum { SEARCH_CONVERSION_SPECIFIER, IN_CONVERSION_SPECIFIER |
︙ |
Added src/platform.h version [2f0cba7b71].