Comment: | Clean up the feature #ifdef mess. |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
b8ce2359f3f2f48ad55787a44fac264d |
User & Date: | js on 2013-01-12 20:53:54 |
Other Links: | manifest | tags |
2013-01-13
| ||
00:54 | OFTCPSocket: Define AI_* to 0 if missing. check-in: 5c6bc745b5 user: js tags: trunk | |
2013-01-12
| ||
20:53 | Clean up the feature #ifdef mess. check-in: b8ce2359f3 user: js tags: trunk | |
20:32 | Fix code used when atomic ops are unavailable. check-in: 20aea410be user: js tags: trunk | |
Modified Doxyfile from [295329e516] to [594baeb063].
1 2 3 4 5 6 7 8 9 10 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | - + | PROJECT_NAME = "ObjFW" OUTPUT_DIRECTORY = docs/ INPUT = src src/exceptions FILE_PATTERNS = *.h *.m HTML_OUTPUT = . GENERATE_LATEX = NO HIDE_UNDOC_CLASSES = YES HIDE_UNDOC_MEMBERS = YES PREDEFINED = OF_HAVE_PROPERTIES \ OF_HAVE_BLOCKS \ |
Modified configure.ac from [d7fb42e5f4] to [ab8f1d8c4e].
︙ | |||
102 103 104 105 106 107 108 | 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 | - + | AC_SUBST(EXCEPTIONS_EXCEPTIONS_A, "exceptions/exceptions.a") ]) AC_DEFINE_UNQUOTED(PLUGIN_SUFFIX, "$PLUGIN_SUFFIX", [Suffix for plugins]) AS_IF([test x"$PLUGIN_SUFFIX" != x""], [ AC_SUBST(USE_SRCS_PLUGINS, '${SRCS_PLUGINS}') AC_SUBST(TESTPLUGIN, "plugin") |
︙ | |||
400 401 402 403 404 405 406 | 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 | - + - + | ]) AC_MSG_RESULT($ac_cv_snprintf_useful_ret) ]) 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_FUNC(arc4random, [ |
︙ | |||
450 451 452 453 454 455 456 | 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 476 477 478 479 480 | - + - + | ]) ], [ AC_MSG_ERROR(No supported threads found!) ]) ;; esac |
︙ | |||
517 518 519 520 521 522 523 | 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 | - + | ], [ dnl We can only have one thread - therefore everything is atomic atomic_ops="not needed" ]) AC_MSG_CHECKING(for atomic operations) AS_IF([test x"$atomic_ops" != x"none"], [ |
︙ | |||
542 543 544 545 546 547 548 | 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 | - + | 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_HEADERS(sys/select.h, [ |
︙ |
Modified src/OFApplication.m from [9620cd4f32] to [af4f6fe02e].
︙ | |||
22 23 24 25 26 27 28 | 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 | - + | #include <signal.h> #import "OFApplication.h" #import "OFString.h" #import "OFArray.h" #import "OFDictionary.h" |
︙ | |||
376 377 378 379 380 381 382 | 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 | - + | } - (void)run { void *pool = objc_autoreleasePoolPush(); OFRunLoop *runLoop; |
︙ |
Modified src/OFAutoreleasePool.m from [5c43e2c904] to [b51231d742].
︙ | |||
18 19 20 21 22 23 24 | 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 54 55 56 57 58 59 60 61 62 63 64 65 | - + - + - + - + - + | #include <stdlib.h> #import "OFAutoreleasePool.h" #import "OFArray.h" #import "macros.h" |
︙ | |||
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 | - + - + | - (void)drain { [self dealloc]; } - (void)dealloc { |
︙ |
Modified src/OFBlock.m from [7f1306bf32] to [069bfaafeb].
︙ | |||
29 30 31 32 33 34 35 | 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 | - + - + | #import "OFBlock.h" #import "OFAllocFailedException.h" #import "OFInitializationFailedException.h" #import "macros.h" |
︙ | |||
154 155 156 157 158 159 160 | 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 | - + | # endif #endif static struct { Class isa; } alloc_failed_exception; |
︙ | |||
185 186 187 188 189 190 191 | 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 | - + | if (block->flags & OF_BLOCK_HAS_COPY_DISPOSE) block->descriptor->copy_helper(copy, block); return copy; } if (object_getClass((id)block) == (Class)&_NSConcreteMallocBlock) { |
︙ | |||
207 208 209 210 211 212 213 | 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 | - + | _Block_release(const void *block_) { of_block_literal_t *block = (of_block_literal_t*)block_; if (object_getClass((id)block) != (Class)&_NSConcreteMallocBlock) return; |
︙ | |||
371 372 373 374 375 376 377 | 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 | - + | memcpy(&_NSConcreteMallocBlock, tmp, sizeof(_NSConcreteMallocBlock)); free(tmp); objc_registerClassPair((Class)&_NSConcreteMallocBlock); # endif } #endif |
︙ |
Modified src/OFDate.m from [eda5b1ce39] to [a29328b01b].
︙ | |||
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 | - + - + | #include <sys/time.h> #import "OFDate.h" #import "OFString.h" #import "OFDictionary.h" #import "OFXMLElement.h" |
︙ | |||
72 73 74 75 76 77 78 | 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 | - + | \ if (localtime_r(&seconds_, &tm) == NULL) \ @throw [OFOutOfRangeException \ exceptionWithClass: [self class]]; \ \ return tm.field; #else |
︙ | |||
158 159 160 161 162 163 164 | 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 | - + | 31 + 28 + 31 + 30 + 31 + 30 + 31 + 31 + 30, 31 + 28 + 31 + 30 + 31 + 30 + 31 + 31 + 30 + 31, 31 + 28 + 31 + 30 + 31 + 30 + 31 + 31 + 30 + 31 + 30, }; @implementation OFDate #if (!defined(HAVE_GMTIME_R) || !defined(HAVE_LOCALTIME_R)) && \ |
︙ | |||
521 522 523 524 525 526 527 | 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 | - + - + | if (seconds_ != floor(seconds)) @throw [OFOutOfRangeException exceptionWithClass: [self class]]; #ifdef HAVE_GMTIME_R if (gmtime_r(&seconds_, &tm) == NULL) @throw [OFOutOfRangeException exceptionWithClass: [self class]]; #else |
︙ | |||
571 572 573 574 575 576 577 | 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 | - + - + | if (seconds_ != floor(seconds)) @throw [OFOutOfRangeException exceptionWithClass: [self class]]; #ifdef HAVE_LOCALTIME_R if (localtime_r(&seconds_, &tm) == NULL) @throw [OFOutOfRangeException exceptionWithClass: [self class]]; #else |
︙ |
Modified src/OFFile.m from [25d73bc7b8] to [9af0a75ec0].
︙ | |||
39 40 41 42 43 44 45 | 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 | - + | # include <pwd.h> # include <grp.h> #endif #import "OFFile.h" #import "OFString.h" #import "OFArray.h" |
︙ | |||
97 98 99 100 101 102 103 | 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 | - + | #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 OFStream *of_stdin = nil; OFStream *of_stdout = nil; OFStream *of_stderr = nil; |
︙ | |||
158 159 160 161 162 163 164 | 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 | - + | objc_autoreleasePoolPop(pool); } @interface OFFileSingleton: OFFile @end @implementation OFFile |
︙ | |||
471 472 473 474 475 476 477 | 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 | - + | uid_t uid = -1; gid_t gid = -1; if (owner == nil && group == nil) @throw [OFInvalidArgumentException exceptionWithClass: self selector: _cmd]; |
︙ | |||
504 505 506 507 508 509 510 | 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 | - + | exceptionWithClass: self path: path owner: owner group: group]; gid = group_->gr_gid; } |
︙ |
Modified src/OFMapTable.m from [996b96d265] to [299f6d68b0].
︙ | |||
150 151 152 153 154 155 156 | 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 | - + - + | buckets = [self allocMemoryWithSize: sizeof(*buckets) count: capacity]; memset(buckets, 0, capacity * sizeof(*buckets)); if (of_hash_seed != 0) |
︙ |
Modified src/OFObject.h from [a016fafbe2] to [5d2293002c].
︙ | |||
680 681 682 683 684 685 686 | 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 | - + | * @param delay The delay after which the selector will be performed */ - (void)performSelector: (SEL)selector withObject: (id)object1 withObject: (id)object2 afterDelay: (double)delay; |
︙ |
Modified src/OFObject.m from [1c57171d5d] to [c05874ae6f].
︙ | |||
22 23 24 25 26 27 28 | 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 | - + | #include <assert.h> #include <sys/time.h> #import "OFObject.h" #import "OFTimer.h" |
︙ | |||
53 54 55 56 57 58 59 | 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 | - + - + - + | #ifdef _WIN32 # include <windows.h> #endif #import "OFString.h" #import "instance.h" |
︙ | |||
195 196 197 198 199 200 201 | 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 | - + | @throw (id)&alloc_failed_exception; } ((struct pre_ivar*)instance)->retainCount = 1; ((struct pre_ivar*)instance)->firstMem = NULL; ((struct pre_ivar*)instance)->lastMem = NULL; |
︙ | |||
250 251 252 253 254 255 256 | 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 | - + - + | objc_setForwardHandler(of_forward, of_forward_stret); #endif #ifdef HAVE_OBJC_ENUMERATIONMUTATION objc_setEnumerationMutationHandler(enumeration_mutation_handler); #endif |
︙ | |||
621 622 623 624 625 626 627 | 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 | - + | object: object1 object: object2 repeats: NO]; objc_autoreleasePoolPop(pool); } |
︙ | |||
967 968 969 970 971 972 973 | 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 | - + - + - - - + - + - - - | { @throw [OFNotImplementedException exceptionWithClass: [self class] selector: selector]; } - retain { |
︙ |
Modified src/OFRunLoop.h from [f2e88dae39] to [1730eaf461].
︙ | |||
16 17 18 19 20 21 22 | 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 | - + - + | #import "OFObject.h" #import "OFStream.h" #import "OFStreamObserver.h" #import "OFTCPSocket.h" @class OFSortedList; |
︙ |
Modified src/OFRunLoop.m from [1f0d5617f1] to [9373453d76].
︙ | |||
16 17 18 19 20 21 22 | 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | - + | #include "config.h" #include <assert.h> #import "OFRunLoop.h" #import "OFDictionary.h" |
︙ | |||
134 135 136 137 138 139 140 | 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 | - + | + (OFRunLoop*)mainRunLoop { return [[mainRunLoop retain] autorelease]; } + (OFRunLoop*)currentRunLoop { |
︙ | |||
285 286 287 288 289 290 291 | 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 | - + - + - + - + - + - + | - init { self = [super init]; @try { timersQueue = [[OFSortedList alloc] init]; |
︙ | |||
587 588 589 590 591 592 593 | 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 | - + - + - + - + | { for (;;) { void *pool = objc_autoreleasePoolPush(); OFDate *now = [OFDate date]; OFTimer *timer; OFDate *nextTimer; |
︙ |
Modified src/OFStreamObserver.h from [16966241ea] to [b07d550270].
︙ | |||
24 25 26 27 28 29 30 | 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 | - + | # include <windows.h> #endif @class OFStream; @class OFMutableArray; @class OFMutableDictionary; @class OFDataArray; |
︙ | |||
84 85 86 87 88 89 90 | 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 | - + | OFMutableArray *queue; OFDataArray *queueInfo, *queueFDs; id <OFStreamObserverDelegate> delegate; int cancelFD[2]; #ifdef _WIN32 struct sockaddr_in cancelAddr; #endif |
︙ |
Modified src/OFStreamObserver.m from [b904df7bb8] to [b6d33523f1].
︙ | |||
28 29 30 31 32 33 34 | 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 | - + | #import "OFArray.h" #import "OFDictionary.h" #import "OFStream.h" #import "OFDataArray.h" #ifdef _WIN32 # import "OFTCPSocket.h" #endif |
︙ | |||
144 145 146 147 148 149 150 | 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 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 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 | - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + | #endif maxFD = cancelFD[0]; FDToStream = [self allocMemoryWithSize: sizeof(OFStream*) count: maxFD + 1]; FDToStream[cancelFD[0]] = nil; |
︙ | |||
302 303 304 305 306 307 308 | 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 | - + - + | { [self doesNotRecognizeSelector: _cmd]; abort(); } - (void)OF_processQueue { |
︙ | |||
366 367 368 369 370 371 372 | 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 | - + - + | assert(0); } } [queue removeAllObjects]; [queueInfo removeAllItems]; [queueFDs removeAllItems]; |
︙ |
Modified src/OFStreamObserver_select.h from [47937d91a0] to [ef59e082ab].
︙ | |||
17 18 19 20 21 22 23 | 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 | - + | #ifndef __STDC_LIMIT_MACROS # define __STDC_LIMIT_MACROS #endif #ifndef __STDC_CONSTANT_MACROS # define __STDC_CONSTANT_MACROS #endif |
Modified src/OFTCPSocket.h from [e5d525cdbe] to [80ab9c568a].
︙ | |||
126 127 128 129 130 131 132 | 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 | - + | * * @param host The host to connect to * @param port The port on the host to connect to */ - (void)connectToHost: (OFString*)host port: (uint16_t)port; |
︙ |
Modified src/OFTCPSocket.m from [e458e43209] to [5685b5bf99].
︙ | |||
31 32 33 34 35 36 37 | 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 | - + | # include <arpa/inet.h> # include <netdb.h> #endif #import "OFTCPSocket.h" #import "OFTCPSocket+SOCKS5.h" #import "OFString.h" |
︙ | |||
55 56 57 58 59 60 61 | 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 | - + | #import "autorelease.h" #import "macros.h" #ifndef INVALID_SOCKET # define INVALID_SOCKET -1 #endif |
︙ | |||
77 78 79 80 81 82 83 | 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 | - + | } Class of_tls_socket_class = Nil; static OFString *defaultSOCKS5Host = nil; static uint16_t defaultSOCKS5Port = 1080; |
︙ | |||
212 213 214 215 216 217 218 | 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 | - + | return nil; } @end #endif @implementation OFTCPSocket |
︙ | |||
340 341 342 343 344 345 346 | 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 | - + - + - + - + | freeaddrinfo(res0); #else BOOL connected = NO; struct hostent *he; struct sockaddr_in addr; char **ip; |
︙ | |||
403 404 405 406 407 408 409 | 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 | - + | if (connect(sock, (struct sockaddr*)&addr, sizeof(addr)) == -1) continue; connected = YES; break; } |
︙ | |||
425 426 427 428 429 430 431 | 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 | - + | port: port]; if (SOCKS5Host != nil) [self OF_SOCKS5ConnectToHost: destinationHost port: destinationPort]; } |
︙ | |||
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 | - + - + - + - + | port: port]; } freeaddrinfo(res); #else struct hostent *he; |
︙ | |||
701 702 703 704 705 706 707 | 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 727 728 | - + - + | return [OFString stringWithCString: host encoding: OF_STRING_ENCODING_NATIVE]; } @finally { [self freeMemory: host]; } #else |
︙ |
Modified src/OFTimer.h from [2f990ddaf1] to [b48acf13c1].
︙ | |||
15 16 17 18 19 20 21 | 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | - + | */ #import "OFObject.h" @class OFTimer; @class OFDate; @class OFRunLoop; |
︙ | |||
38 39 40 41 42 43 44 | 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 | - + | SEL selector; uint8_t arguments; BOOL repeats; #ifdef OF_HAVE_BLOCKS of_timer_block_t block; #endif BOOL isValid; |
︙ | |||
311 312 313 314 315 316 317 | 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 | - + | * repeating timer. * * @return The time interval in which the timer will repeat, if it is a * repeating timer */ - (double)timeInterval; |
Modified src/OFTimer.m from [1f8783cad4] to [0fd41ebc3f].
︙ | |||
19 20 21 22 23 24 25 | 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | - + | #include <stdlib.h> #include <assert.h> #import "OFTimer.h" #import "OFDate.h" #import "OFRunLoop.h" |
︙ | |||
233 234 235 236 237 238 239 | 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 | - + | target = [target_ retain]; selector = selector_; object1 = [object1_ retain]; object2 = [object2_ retain]; arguments = arguments_; repeats = repeats_; isValid = YES; |
︙ | |||
309 310 311 312 313 314 315 | 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 | - + | @try { fireDate = [fireDate_ retain]; interval = interval_; repeats = repeats_; block = [block_ copy]; isValid = YES; |
︙ | |||
336 337 338 339 340 341 342 | 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 | - + | [fireDate release]; [target release]; [object1 release]; [object2 release]; #ifdef OF_HAVE_BLOCKS [block release]; #endif |
︙ | |||
384 385 386 387 388 389 390 | 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 | - + | withObject: object2]; break; } #ifdef OF_HAVE_BLOCKS } #endif |
︙ | |||
444 445 446 447 448 449 450 | 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 | - + | } - (BOOL)isValid { return isValid; } |
︙ |
Modified src/ObjFW.h from [e5cbb2dc26] to [46c8ffd626].
︙ | |||
83 84 85 86 87 88 89 | 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 | - + | #import "OFAcceptFailedException.h" #import "OFAddressTranslationFailedException.h" #import "OFAlreadyConnectedException.h" #import "OFBindFailedException.h" #import "OFChangeDirectoryFailedException.h" #import "OFChangeFileModeFailedException.h" #import "OFChangeFileOwnerFailedException.h" |
︙ | |||
120 121 122 123 124 125 126 | 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 | - + - + - + - + | #import "OFReadFailedException.h" #import "OFReadOrWriteFailedException.h" #import "OFRenameFileFailedException.h" #import "OFSeekFailedException.h" #import "OFSetOptionFailedException.h" #import "OFStillLockedException.h" #import "OFSymlinkFailedException.h" |
︙ |
Modified src/atomic.h from [7c0142eaf1] to [368de22827].
︙ | |||
21 22 23 24 25 26 27 | 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 | - + | #ifdef OF_HAVE_OSATOMIC # include <libkern/OSAtomic.h> #endif static OF_INLINE int of_atomic_add_int(volatile int *p, int i) { |
︙ | |||
65 66 67 68 69 70 71 | 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 | - + | # error No atomic operations available! #endif } static OF_INLINE int32_t of_atomic_add_32(volatile int32_t *p, int32_t i) { |
︙ | |||
89 90 91 92 93 94 95 | 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 | - + | # error No atomic operations available! #endif } static OF_INLINE void* of_atomic_add_ptr(void* volatile *p, intptr_t i) { |
︙ | |||
130 131 132 133 134 135 136 | 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 | - + | # error No atomic operations available! #endif } static OF_INLINE int of_atomic_sub_int(volatile int *p, int i) { |
︙ | |||
176 177 178 179 180 181 182 | 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 | - + | # error No atomic operations available! #endif } static OF_INLINE int32_t of_atomic_sub_32(volatile int32_t *p, int32_t i) { |
︙ | |||
201 202 203 204 205 206 207 | 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 | - + | # error No atomic operations available! #endif } static OF_INLINE void* of_atomic_sub_ptr(void* volatile *p, intptr_t i) { |
︙ | |||
244 245 246 247 248 249 250 | 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 | - + | # error No atomic operations available! #endif } static OF_INLINE int of_atomic_inc_int(volatile int *p) { |
︙ | |||
294 295 296 297 298 299 300 | 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 | - + | # error No atomic operations available! #endif } static OF_INLINE int32_t of_atomic_inc_32(volatile int32_t *p) { |
︙ | |||
322 323 324 325 326 327 328 | 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 | - + | # error No atomic operations available! #endif } static OF_INLINE int of_atomic_dec_int(volatile int *p) { |
︙ | |||
372 373 374 375 376 377 378 | 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 | - + | # error No atomic operations available! #endif } static OF_INLINE int32_t of_atomic_dec_32(volatile int32_t *p) { |
︙ | |||
400 401 402 403 404 405 406 | 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 | - + | # error No atomic operations available! #endif } static OF_INLINE unsigned int of_atomic_or_int(volatile unsigned int *p, unsigned int i) { |
︙ | |||
454 455 456 457 458 459 460 | 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 | - + | # error No atomic operations available! #endif } static OF_INLINE uint32_t of_atomic_or_32(volatile uint32_t *p, uint32_t i) { |
︙ | |||
483 484 485 486 487 488 489 | 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 | - + | # error No atomic operations available! #endif } static OF_INLINE unsigned int of_atomic_and_int(volatile unsigned int *p, unsigned int i) { |
︙ | |||
537 538 539 540 541 542 543 | 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 | - + | # error No atomic operations available! #endif } static OF_INLINE uint32_t of_atomic_and_32(volatile uint32_t *p, uint32_t i) { |
︙ | |||
566 567 568 569 570 571 572 | 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 | - + | # error No atomic operations available! #endif } static OF_INLINE unsigned int of_atomic_xor_int(volatile unsigned int *p, unsigned int i) { |
︙ | |||
620 621 622 623 624 625 626 | 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 | - + | # error No atomic operations available! #endif } static OF_INLINE uint32_t of_atomic_xor_32(volatile uint32_t *p, uint32_t i) { |
︙ | |||
649 650 651 652 653 654 655 | 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 | - + | # error No atomic operations available! #endif } static OF_INLINE BOOL of_atomic_cmpswap_int(volatile int *p, int o, int n) { |
︙ | |||
683 684 685 686 687 688 689 | 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 | - + | # error No atomic operations available! #endif } static OF_INLINE BOOL of_atomic_cmpswap_32(volatile int32_t *p, int32_t o, int32_t n) { |
︙ | |||
717 718 719 720 721 722 723 | 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 | - + | # error No atomic operations available! #endif } static OF_INLINE BOOL of_atomic_cmpswap_ptr(void* volatile *p, void *o, void *n) { |
︙ |
Modified src/autorelease.m from [221156b5cb] to [fd89fce383].
︙ | |||
18 19 20 21 22 23 24 | 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 54 55 56 57 58 59 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 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 137 138 | - + - + - + - + - + - + - + - + - + - + - + | #include <stdio.h> #include <stdlib.h> #import "OFObject.h" #import "OFSystemInfo.h" |
Modified src/objfw-defs.h.in from [2392df0876] to [8a8805198b].
1 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | - - + + + - + - - | #undef OF_APPLE_RUNTIME |
Modified src/runtime/property.m from [cf5d45ddd2] to [cf0f60e388].
︙ | |||
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 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 | - + - + - + | #import "runtime.h" #import "runtime-private.h" #import "OFObject.h" #import "macros.h" |
︙ | |||
67 68 69 70 71 72 73 | 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 | - + - + | void objc_setProperty(id self, SEL _cmd, ptrdiff_t offset, id value, BOOL atomic, signed char copy) { if (atomic) { id *ptr = (id*)(void*)((char*)self + offset); |
︙ | |||
119 120 121 122 123 124 125 | 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 | - + - + - + - + | /* The following methods are only required for GCC >= 4.6 */ void objc_getPropertyStruct(void *dest, const void *src, ptrdiff_t size, BOOL atomic, BOOL strong) { if (atomic) { |
Modified src/runtime/runtime-private.h from [29ce1db052] to [c43269a3b6].
︙ | |||
145 146 147 148 149 150 151 | 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 | - + | struct objc_sparsearray*); extern void objc_sparsearray_set(struct objc_sparsearray*, uint32_t, const void*); extern void objc_sparsearray_free(struct objc_sparsearray*); extern void objc_sparsearray_cleanup(void); extern void objc_init_static_instances(struct objc_abi_symtab*); extern void __objc_exec_class(struct objc_abi_module*); |
︙ |
Modified src/runtime/synchronized.m from [f3cec63a98] to [fcacd220fc].
︙ | |||
18 19 20 21 22 23 24 | 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | - + | #include <stdio.h> #include <stdlib.h> #import "runtime.h" #import "runtime-private.h" |
︙ | |||
41 42 43 44 45 46 47 | 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 | - + | OBJC_ERROR("Failed to create mutex!") } #endif int objc_sync_enter(id object) { |
︙ | |||
89 90 91 92 93 94 95 | 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 | - + | return 0; } int objc_sync_exit(id object) { |
︙ |
Modified src/threading.h from [f6862f572a] to [ba948db4c9].
︙ | |||
12 13 14 15 16 17 18 | 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. */ #import "objfw-defs.h" #if !defined(OF_HAVE_THREADS) || \ |
︙ | |||
35 36 37 38 39 40 41 | 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 | - + | typedef CRITICAL_SECTION of_mutex_t; typedef struct { HANDLE event; int count; } of_condition_t; #endif |
︙ | |||
293 294 295 296 297 298 299 | 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 | - + - + - + | return TlsFree(key); #endif } static OF_INLINE BOOL of_spinlock_new(of_spinlock_t *spinlock) { |
︙ | |||
347 348 349 350 351 352 353 | 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 | - + - + | return of_mutex_lock(spinlock); #endif } static OF_INLINE BOOL of_spinlock_unlock(of_spinlock_t *spinlock) { |
︙ |
Modified tests/TestsAppDelegate.m from [f102ecba6b] to [573b357575].
︙ | |||
132 133 134 135 136 137 138 | 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 | - + - + - + | [self dictionaryTests]; [self listTests]; [self setTests]; [self dateTests]; [self numberTests]; [self streamTests]; [self TCPSocketTests]; |