Overview
Comment: | Better checks for functions used in OFFile. |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
c01ed004b016b6024db250ccc6d35e61 |
User & Date: | js on 2013-04-26 22:25:13 |
Other Links: | manifest | tags |
Context
2013-04-26
| ||
22:32 | Check for sysconf(). check-in: 3f7dee97e8 user: js tags: trunk | |
22:25 | Better checks for functions used in OFFile. check-in: c01ed004b0 user: js tags: trunk | |
21:10 | Use nanosleep() if available. check-in: db70226153 user: js tags: trunk | |
Changes
Modified configure.ac from [5b0cf6b041] to [0e15f6a1ab].
︙ | |||
329 330 331 332 333 334 335 | 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 | - + | AC_CHECK_FUNC(objc_autoreleasePoolPush, [], [ AC_SUBST(AUTORELEASE_M, "autorelease.m") ]) AC_CHECK_FUNC(objc_enumerationMutation, [ AC_DEFINE(HAVE_OBJC_ENUMERATIONMUTATION, 1, |
︙ | |||
415 416 417 418 419 420 421 | 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 | - + | have_asprintf="no" AC_SUBST(ASPRINTF_M, "asprintf.m") ac_cv_snprintf_useful_ret="yes" ;; *) have_asprintf="yes" AC_DEFINE(OF_HAVE_ASPRINTF, 1, |
︙ | |||
489 490 491 492 493 494 495 | 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 | - + | AC_CHECK_FUNC(pthread_spin_lock, [ AC_DEFINE(OF_HAVE_PTHREAD_SPINLOCKS, 1, [Whether we have pthread spinlocks]) ]) AC_CHECK_FUNC(sched_yield, [ AC_DEFINE(OF_HAVE_SCHED_YIELD, 1, |
︙ | |||
570 571 572 573 574 575 576 577 578 579 580 581 582 583 | 570 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 | + + + + + + + + + + + + + + | AS_IF([test x"$atomic_ops" != x"none"], [ AC_DEFINE(OF_HAVE_ATOMIC_OPS, 1, [Whether we have atomic operations]) AC_SUBST(ATOMIC_H, "atomic.h") ]) AC_MSG_RESULT($atomic_ops) AC_CHECK_FUNCS([gmtime_r localtime_r nanosleep]) AC_CHECK_HEADERS([pwd.h grp.h]) AC_CHECK_FUNC(chmod, [ AC_DEFINE(OF_HAVE_CHMOD, 1, [Whether we have chmod()]) ]) AC_CHECK_FUNC(chown, [ AC_DEFINE(OF_HAVE_CHOWN, 1, [Whether we have chown()]) ]) AC_CHECK_FUNC(link, [ AC_DEFINE(OF_HAVE_LINK, 1, [Whether we have link()]) ]) AC_CHECK_FUNC(symlink, [ AC_DEFINE(OF_HAVE_SYMLINK, 1, [Whether we have symlink()]) ]) AC_ARG_ENABLE(sockets, AS_HELP_STRING([--disable-sockets], [disable socket support])) AS_IF([test x"$enable_sockets" != x"no"], [ AC_DEFINE(OF_HAVE_SOCKETS, 1, [Whether we have sockets]) AC_SUBST(USE_SRCS_SOCKETS, '${SRCS_SOCKETS}') |
︙ | |||
616 617 618 619 620 621 622 | 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 | - + | # include <ws2tcpip.h> #endif ], [ struct addrinfo ai; getaddrinfo(NULL, NULL, NULL, NULL); ], [ AC_MSG_RESULT(yes) |
︙ |
Modified src/OFFile.h from [bad7a67060] to [2f0e7153ad].
︙ | |||
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 | - + - + | /*! * @brief Returns the date of the last modification of the file. * * @return The date of the last modification of the file */ + (OFDate*)modificationDateOfFileAtPath: (OFString*)path; |
︙ | |||
206 207 208 209 210 211 212 | 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 | - + - + | /*! * @brief Deletes an empty directory. * * @param path The path to the directory which should be deleted as a string */ + (void)deleteDirectoryAtPath: (OFString*)path; |
︙ |
Modified src/OFFile.m from [6182cd74e1] to [526afc5ebd].
︙ | |||
31 32 33 34 35 36 37 | 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 | - + + + | #include <unistd.h> #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> #include <dirent.h> |
︙ | |||
97 98 99 100 101 102 103 | 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 | - + | #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 | 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 | - + | objc_autoreleasePoolPop(pool); } @interface OFFileSingleton: OFFile @end @implementation OFFile |
︙ | |||
385 386 387 388 389 390 391 | 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 | - + | if (_wchdir([path UTF16String])) #endif @throw [OFChangeDirectoryFailedException exceptionWithClass: self path: path]; } |
︙ | |||
442 443 444 445 446 447 448 | 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 | - + | path: path mode: @"r"]; /* FIXME: We could be more precise on some OSes */ return [OFDate dateWithTimeIntervalSince1970: s.st_mtime]; } |
︙ | |||
543 544 545 546 547 548 549 | 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 | - + | length = [sourceFile readIntoBuffer: buffer length: pageSize]; [destinationFile writeBuffer: buffer length: length]; } |
︙ | |||
610 611 612 613 614 615 616 | 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 | - + | if (_wrmdir([path UTF16String])) #endif @throw [OFDeleteDirectoryFailedException exceptionWithClass: self path: path]; } |
︙ | |||
632 633 634 635 636 637 638 | 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 | - + | sourcePath: source destinationPath: destination]; objc_autoreleasePoolPop(pool); } #endif |
︙ |
Modified src/OFThread.m from [64480ed795] to [cdfc8ccff6].
︙ | |||
14 15 16 17 18 19 20 21 22 23 24 25 26 27 | 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | + | * file. */ #include "config.h" #define OF_THREAD_M #define _POSIX_TIMERS #define __NO_EXT_QNX #include <stdlib.h> #include <math.h> #include <time.h> #ifndef _WIN32 |
︙ |
Modified src/objfw-defs.h.in from [aa207557bf] to [3af4f4e1ad].
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | + + + + | #undef OF_APPLE_RUNTIME #undef OF_BIG_ENDIAN #undef OF_FLOAT_BIG_ENDIAN #undef OF_HAVE_ASPRINTF #undef OF_HAVE_ATOMIC_OPS #undef OF_HAVE_CHMOD #undef OF_HAVE_CHOWN #undef OF_HAVE_COMPILER_TLS #undef OF_HAVE_FORWARDING_TARGET_FOR_SELECTOR #undef OF_HAVE_GCC_ATOMIC_OPS #undef OF_HAVE_LINK #undef OF_HAVE_OSATOMIC #undef OF_HAVE_OSATOMIC_64 #undef OF_HAVE_PTHREADS #undef OF_HAVE_PLUGINS #undef OF_HAVE_PROCESSES #undef OF_HAVE_PTHREAD_SPINLOCKS #undef OF_HAVE_RECURSIVE_PTHREAD_MUTEXES #undef OF_HAVE_SCHED_YIELD #undef OF_HAVE_SOCKETS #undef OF_HAVE_SYMLINK #undef OF_HAVE_THREADS #undef OF_OBJFW_RUNTIME #undef SIZE_MAX |