ObjFW  Check-in [793fdb6630]

Overview
Comment:Add +[OFSystemInfo isWindowsNT]
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 793fdb6630639941f1c1f653cf3864cb3fb16e7ceff9256f45d8a3751e1d8f6b
User & Date: js on 2020-05-17 10:32:12
Other Links: manifest | tags
Context
2020-05-17
10:42
OFWin32ConsoleStdIOStream: Use +[isWindowsNT] check-in: 77bf56450b user: js tags: trunk
10:32
Add +[OFSystemInfo isWindowsNT] check-in: 793fdb6630 user: js tags: trunk
00:58
OFWin32ConsoleStdIOStream: Support for ANSI Win32 check-in: bcf421d813 user: js tags: trunk
Changes

Modified src/OFSystemInfo.h from [3dbc07c33c] to [0a359fe12b].

54
55
56
57
58
59
60



61
62
63
64
65
66
67
...
282
283
284
285
286
287
288











289
290
291
292
293
294
@property (class, readonly, nonatomic) bool supportsAVX2;
@property (class, readonly, nonatomic) bool supportsAESNI;
@property (class, readonly, nonatomic) bool supportsSHAExtensions;
# endif
# if defined(OF_POWERPC) || defined(OF_POWERPC64) || defined(DOXYGEN)
@property (class, readonly, nonatomic) bool supportsAltiVec;
# endif



#endif

/*!
 * @brief Returns the size of a page.
 *
 * @return The size of a page
 */
................................................................................
 *
 * @note This method is only available on PowerPC and PowerPC 64.
 *
 * @return Whether the CPU and OS support AltiVec
 */
+ (bool)supportsAltiVec;
#endif












+ (instancetype)alloc OF_UNAVAILABLE;
- (instancetype)init OF_UNAVAILABLE;
@end

OF_ASSUME_NONNULL_END







>
>
>







 







>
>
>
>
>
>
>
>
>
>
>






54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
...
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
@property (class, readonly, nonatomic) bool supportsAVX2;
@property (class, readonly, nonatomic) bool supportsAESNI;
@property (class, readonly, nonatomic) bool supportsSHAExtensions;
# 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
#endif

/*!
 * @brief Returns the size of a page.
 *
 * @return The size of a page
 */
................................................................................
 *
 * @note This method is only available on PowerPC and PowerPC 64.
 *
 * @return Whether the CPU and OS support AltiVec
 */
+ (bool)supportsAltiVec;
#endif

#ifdef OF_WINDOWS
/*!
 * @brief Returns whether the application is running on Windows NT.
 *
 * @note This method is only available on Windows.
 *
 * @return Whether the application is running on Windows NT
 */
+ (bool)isWindowsNT;
#endif

+ (instancetype)alloc OF_UNAVAILABLE;
- (instancetype)init OF_UNAVAILABLE;
@end

OF_ASSUME_NONNULL_END

Modified src/OFSystemInfo.m from [7bac8e5add] to [c3f493864c].

660
661
662
663
664
665
666







667
668
669
670
671
672
	    SYSTEMINFOTYPE_PPC_ALTIVEC, TAG_DONE) > 0)
		return supportsAltiVec;
# endif

	return false;
}
#endif








- (instancetype)init
{
	OF_INVALID_INIT_METHOD
}
@end







>
>
>
>
>
>
>






660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
	    SYSTEMINFOTYPE_PPC_ALTIVEC, TAG_DONE) > 0)
		return supportsAltiVec;
# endif

	return false;
}
#endif

#ifdef OF_WINDOWS
+ (bool)isWindowsNT
{
	return !(GetVersion() & 0x80000000);
}
#endif

- (instancetype)init
{
	OF_INVALID_INIT_METHOD
}
@end