$ xcrun --sdk macosx --find clang
/Library/Developer/CommandLineTools/usr/bin/clang
$ /Library/Developer/CommandLineTools/usr/bin/clang -dM -E - < /dev/null
#define OBJC_NEW_PROPERTIES 1
#define _LP64 1
#define __APPLE_CC__ 6000
#define __APPLE__ 1
#define __ATOMIC_ACQUIRE 2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 0x04653adf 0x04653b5f 0x04653eb7 0x04653ed7 0x046569df 0x046569f7 0x04656e9f 0x04656fa7 | |
| 0x0465769f 0x04657da7 0x0465a9df 0x0465a9f7 0x0465ba9f 0x0465bea7 0x0465da9f 0x0465f6a7 | |
| 0x04674adf 0x046752df 0x0467695f 0x04676a5f 0x0467d2b7 0x0467d4b7 0x0467da57 0x0467da97 | |
| 0x046959df 0x046959f7 0x04695cfb 0x04695d9f 0x04695f3b 0x04695f67 0x0469cafb 0x0469d95f | |
| 0x0469df2b 0x0469f2bb 0x0469f657 0x0469f72b 0x046a59df 0x046a59f7 0x046a5cfb 0x046a5d9f | |
| 0x046a5f3b 0x046a5f67 0x046a72fb 0x046a765f 0x046a77cb 0x046a7cbb 0x046a7d97 0x046a7dcb | |
| 0x046b29df 0x046b29f7 0x046b94fb 0x046bb29f 0x046be53b 0x046beca7 0x046ca75f 0x046ca7d7 | |
| 0x046cae9f 0x046cafa7 0x046cba9f 0x046cbea7 0x046ce95f 0x046cea5f 0x046cfa57 0x046cfa97 | |
| 0x046e53eb 0x046e7d2b 0x046e7d4b 0x046e959f 0x046e9f2b 0x046ea59f 0x046ea7cb 0x046eb29f | |
| 0x046f94eb 0x046f9d2b 0x046f9d4b 0x046fa567 0x046fa72b 0x046fa967 0x046fa9cb 0x046faca7 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| * Created 181128 lynnl | |
| */ | |
| #include <stdio.h> | |
| #include <assert.h> | |
| #include <errno.h> | |
| #include <stdlib.h> | |
| #include <sys/sysctl.h> | |
| #ifndef __nullable |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Probe local removable mounted volumes | |
| * @return An array with NSURL objects | |
| */ | |
| + (NSArray<NSURL *> *)probeRemovableMountedVolumes { | |
| NSArray *keys = [NSArray arrayWithObjects:NSURLVolumeIsEjectableKey, | |
| NSURLVolumeIsLocalKey, NSURLVolumeIsReadOnlyKey, | |
| NSURLVolumeIsRemovableKey, nil]; | |
| NSArray *flags = [NSArray arrayWithObjects:@YES, @YES, @NO, @YES, nil]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #ifdef DEBUG | |
| #define BUILD_BUG_ON(cond) ((void) sizeof(char[-!(cond)])) | |
| #define BUILD_BUG_ON2(cond) ((void) (char[1]){[!(cond)] = 0}) /* Nonoptimal */ | |
| #else | |
| #define BUILD_BUG_ON(cond) ((void) (cond)) | |
| #define BUILD_BUG_ON2(cond) ((void) (cond)) | |
| #endif | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| * XXX: Should used only for `char[]'(NOT `char *') | |
| */ | |
| #define QSTRLEN(s) (sizeof(s) - 1) | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| xcrun --sdk macosx --show-sdk-path | |
| # | |
| # see: | |
| # https://stackoverflow.com/questions/18741675/how-to-get-the-path-of-latest-sdk-available-on-mac | |
| # | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Showing All Messages | |
| Prepare build | |
| note: Using new build systemnote: Planning buildnote: Using build description from memory | |
| Build target kext-test of project kext-test with configuration Debug | |
| CreateBuildDirectory /Users/lynnl/Library/Developer/Xcode/DerivedData/kext-test-arzgdkduvgiifeclyjsvcrtkxtkg/Build/Products (in target: kext-test) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| * Created 190102 | |
| * | |
| * gcc -Wall -Wextra -std=c11 -O0 -g -DDEBUG -lsqlite3 sqlite_bom.c -o sqlite_bom | |
| * | |
| * see: | |
| * https://www.sqlite.org/cintro.html | |
| * https://www.sqlite.org/quickstart.html | |
| * https://www.sqlite.org/howtocompile.html | |
| * https://en.wikipedia.org/wiki/Byte_order_mark#UTF-16 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| # | |
| # Created 190109 lynnl | |
| # | |
| set -e | |
| #set -x | |
| if [ $# -ne 1 ]; then | |
| echo "`basename $0` installer_app" |