Overview
Comment: | Change how +[OFSystemInfo networkInterfaces] works
This removes functionality which will be restored later. |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
43c80a7593063fdb233b8910856771a0 |
User & Date: | js on 2023-05-21 17:47:10 |
Other Links: | manifest | tags |
Context
2023-05-27
| ||
10:54 | GitHub Actions: Restore devkitPPC builds check-in: c294e5877d user: js tags: trunk | |
2023-05-21
| ||
17:47 | Change how +[OFSystemInfo networkInterfaces] works check-in: 43c80a7593 user: js tags: trunk | |
13:10 | Remove support for configuring AppleTalk check-in: 550bd1b7bb user: js tags: trunk | |
Changes
Modified Doxyfile from [864bba86b9] to [f1f5fc12ae].
︙ | ︙ | |||
33 34 35 36 37 38 39 | OF_NULL_RESETTABLE_PROPERTY(...)= \ OF_REQUIRES_SUPER= \ OF_RETURNS_INNER_POINTER= \ OF_RETURNS_NOT_RETAINED= \ OF_RETURNS_RETAINED= \ OF_ROOT_CLASS= \ OF_SENTINEL= \ | < | 33 34 35 36 37 38 39 40 41 42 43 44 45 46 | OF_NULL_RESETTABLE_PROPERTY(...)= \ OF_REQUIRES_SUPER= \ OF_RETURNS_INNER_POINTER= \ OF_RETURNS_NOT_RETAINED= \ OF_RETURNS_RETAINED= \ OF_ROOT_CLASS= \ OF_SENTINEL= \ OF_WARN_UNUSED_RESULT= \ OF_WEAK_UNAVAILABLE= \ SIGHUP \ SIGUSR1 \ SIGUSR2 MACRO_EXPANSION = YES EXPAND_ONLY_PREDEF = YES |
︙ | ︙ |
Modified configure.ac from [579103d61e] to [b1471bd183].
︙ | ︙ | |||
1765 1766 1767 1768 1769 1770 1771 | [Whether we have select() or similar]) AC_SUBST(OF_SELECT_KERNEL_EVENT_OBSERVER_M, "OFSelectKernelEventObserver.m") ]) ;; esac | | | < < < | 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 | [Whether we have select() or similar]) AC_SUBST(OF_SELECT_KERNEL_EVENT_OBSERVER_M, "OFSelectKernelEventObserver.m") ]) ;; esac AC_CHECK_HEADERS(net/if.h net/if_types.h net/if_dl.h) AC_CHECK_HEADERS(netpacket/packet.h) AC_CHECK_FUNCS(if_nameindex) AC_CHECK_TYPES([struct sockaddr_dl], [], [], [ #ifdef HAVE_SYS_TYPES_H # include <sys/types.h> #endif #ifdef HAVE_NET_IF_DL_H # include <net/if_dl.h> #endif |
︙ | ︙ |
Modified src/OFSystemInfo.h from [d7ddb6bfe4] to [c58919a56b].
︙ | ︙ | |||
17 18 19 20 21 22 23 | #import "OFString.h" OF_ASSUME_NONNULL_BEGIN @class OFDictionary OF_GENERIC(KeyType, ObjectType); @class OFIRI; | < < < < < < < < < < < < < < < < < < < < < < < < < < < | 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | #import "OFString.h" OF_ASSUME_NONNULL_BEGIN @class OFDictionary OF_GENERIC(KeyType, ObjectType); @class OFIRI; /** * @class OFSystemInfo OFSystemInfo.h ObjFW/OFSystemInfo.h * * @brief A class for querying information about the system. */ OF_SUBCLASSING_RESTRICTED @interface OFSystemInfo: OFObject |
︙ | ︙ | |||
86 87 88 89 90 91 92 | # endif # if defined(OF_POWERPC) || defined(OF_POWERPC64) || defined(DOXYGEN) @property (class, readonly, nonatomic) bool supportsAltiVec; # endif # ifdef OF_WINDOWS @property (class, readonly, nonatomic, getter=isWindowsNT) bool windowsNT; # endif | | | < | | 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 | # endif # if defined(OF_POWERPC) || defined(OF_POWERPC64) || defined(DOXYGEN) @property (class, readonly, nonatomic) bool supportsAltiVec; # endif # ifdef OF_WINDOWS @property (class, readonly, nonatomic, getter=isWindowsNT) bool windowsNT; # endif # ifdef OF_HAVE_SOCKETS @property (class, readonly, nullable, nonatomic) OFArray OF_GENERIC(OFString *) *networkInterfaces; # endif #endif /** * @brief Returns the size of a page. * * @return The size of a page |
︙ | ︙ | |||
367 368 369 370 371 372 373 | * @note This method is only available on Windows. * * @return Whether the application is running on Windows NT */ + (bool)isWindowsNT; #endif | | | | | < | 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 | * @note This method is only available on Windows. * * @return Whether the application is running on Windows NT */ + (bool)isWindowsNT; #endif #ifdef OF_HAVE_SOCKETS /** * @brief Returns the available (though not necessarily configured) network * interfaces. * * @return The available network interfaces */ + (nullable OFArray OF_GENERIC(OFString *) *)networkInterfaces; #endif + (instancetype)alloc OF_UNAVAILABLE; - (instancetype)init OF_UNAVAILABLE; @end OF_ASSUME_NONNULL_END |
Modified src/OFSystemInfo.m from [91568c0543] to [29fca6defb].
︙ | ︙ | |||
26 27 28 29 30 31 32 | #ifdef HAVE_SYS_UTSNAME_H # include <sys/utsname.h> #endif #if defined(OF_MACOS) || defined(OF_IOS) || defined(OF_NETBSD) # include <sys/sysctl.h> #endif | | | | 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 | #ifdef HAVE_SYS_UTSNAME_H # include <sys/utsname.h> #endif #if defined(OF_MACOS) || defined(OF_IOS) || defined(OF_NETBSD) # include <sys/sysctl.h> #endif #ifdef HAVE_NET_IF_H # include <net/if.h> #endif #ifdef HAVE_NET_IF_TYPES_H # include <net/if_types.h> #endif #ifdef HAVE_NET_IF_DL_H # include <net/if_dl.h> #endif |
︙ | ︙ | |||
69 70 71 72 73 74 75 76 77 78 79 80 81 82 | #import "OFSystemInfo.h" #import "OFApplication.h" #import "OFArray.h" #import "OFData.h" #import "OFDictionary.h" #import "OFIRI.h" #import "OFLocale.h" #import "OFOnce.h" #ifdef OF_HAVE_SOCKETS # import "OFSocket.h" #endif #import "OFString.h" #if defined(OF_MACOS) || defined(OF_IOS) | > | 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 | #import "OFSystemInfo.h" #import "OFApplication.h" #import "OFArray.h" #import "OFData.h" #import "OFDictionary.h" #import "OFIRI.h" #import "OFLocale.h" #import "OFNumber.h" #import "OFOnce.h" #ifdef OF_HAVE_SOCKETS # import "OFSocket.h" #endif #import "OFString.h" #if defined(OF_MACOS) || defined(OF_IOS) |
︙ | ︙ | |||
126 127 128 129 130 131 132 | #if defined(OF_AMD64) || defined(OF_X86) struct X86Regs { uint32_t eax, ebx, ecx, edx; }; #endif | < < < < < < < | 127 128 129 130 131 132 133 134 135 136 137 138 139 140 | #if defined(OF_AMD64) || defined(OF_X86) struct X86Regs { uint32_t eax, ebx, ecx, edx; }; #endif static size_t pageSize = 4096; static size_t numberOfCPUs = 1; static OFString *operatingSystemName = nil; static OFString *operatingSystemVersion = nil; static void initOperatingSystemName(void) |
︙ | ︙ | |||
840 841 842 843 844 845 846 | #ifdef OF_WINDOWS + (bool)isWindowsNT { return !(GetVersion() & 0x80000000); } #endif | | | < < < < < < < < < < < < < < < < | < < < < < < < < < < < < < < < < < < < | < < | < < < < | | > | < < < < < < < < < < < < < < < | | < < | < < < < < < < | < < < | < < < < < | < < < < < < < < | < < | < < < < | < < < < | < < < < | | < < | < | < | | > | 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 | #ifdef OF_WINDOWS + (bool)isWindowsNT { return !(GetVersion() & 0x80000000); } #endif #ifdef OF_HAVE_SOCKETS + (OFArray OF_GENERIC(OFString *) *)networkInterfaces { # ifdef HAVE_IF_NAMEINDEX OFMutableArray *ret = [OFMutableArray array]; void *pool = objc_autoreleasePoolPush(); OFStringEncoding encoding = [OFLocale encoding]; struct if_nameindex *nameindex = if_nameindex(); if (nameindex == NULL) { objc_autoreleasePoolPop(pool); return nil; } @try { for (size_t i = 0; nameindex[i].if_index != 0; i++) [ret addObject: [OFString stringWithCString: nameindex[i].if_name encoding: encoding]]; } @finally { if_freenameindex(nameindex); } [ret makeImmutable]; objc_autoreleasePoolPop(pool); return ret; # else return nil; # endif } #endif - (instancetype)init { OF_INVALID_INIT_METHOD } @end |
Modified src/objfw-defs.h.in from [b557faae7b] to [5a8629e6a6].
︙ | ︙ | |||
47 48 49 50 51 52 53 | #undef OF_HAVE__THREAD_LOCAL #undef OF_HAVE___THREAD #undef OF_NINTENDO_3DS #undef OF_NINTENDO_DS #undef OF_NINTENDO_SWITCH #undef OF_NO_SHARED #undef OF_OBJFW_RUNTIME | < | 47 48 49 50 51 52 53 54 55 56 | #undef OF_HAVE__THREAD_LOCAL #undef OF_HAVE___THREAD #undef OF_NINTENDO_3DS #undef OF_NINTENDO_DS #undef OF_NINTENDO_SWITCH #undef OF_NO_SHARED #undef OF_OBJFW_RUNTIME #undef OF_UNIVERSAL #undef OF_WII #undef OF_WII_U |
Modified tests/OFSystemInfoTests.m from [f271eb5ab9] to [bc94edf915].
︙ | ︙ | |||
17 18 19 20 21 22 23 | #import "TestsAppDelegate.h" @implementation TestsAppDelegate (OFSystemInfoTests) - (void)systemInfoTests { void *pool = objc_autoreleasePoolPush(); | < < < < | 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | #import "TestsAppDelegate.h" @implementation TestsAppDelegate (OFSystemInfoTests) - (void)systemInfoTests { void *pool = objc_autoreleasePoolPush(); [OFStdOut setForegroundColor: [OFColor lime]]; [OFStdOut writeFormat: @"[OFSystemInfo] Page size: %zd\n", [OFSystemInfo pageSize]]; [OFStdOut writeFormat: @"[OFSystemInfo] Number of CPUs: %zd\n", |
︙ | ︙ | |||
107 108 109 110 111 112 113 | #endif #ifdef OF_POWERPC [OFStdOut writeFormat: @"[OFSystemInfo] Supports AltiVec: %d\n", [OFSystemInfo supportsAltiVec]]; #endif | | | | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 | #endif #ifdef OF_POWERPC [OFStdOut writeFormat: @"[OFSystemInfo] Supports AltiVec: %d\n", [OFSystemInfo supportsAltiVec]]; #endif #ifdef OF_HAVE_SOCKETS [OFStdOut writeFormat: @"[OFSystemInfo] Network interfaces: %@\n", [[OFSystemInfo networkInterfaces] componentsJoinedByString: @", "]]; #endif objc_autoreleasePoolPop(pool); } @end |