Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/git/blob/master/compat/compiler.h # git [Ported from github.com/git/git] Sync with Git 2.56.1 Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `master` Branches Tags History `git / compat / compiler.h` 40 lines ยท 874 bytes Raw Blame History 1 #ifndef COMPILER_H 2 #define COMPILER_H 3 4 #include "strbuf.h" 5 6 #ifdef __GLIBC__ 7 #include 8 #endif 9 10 static inline void get_compiler_info(struct strbuf *info) 11 { 12 size_t len = info->len; 13 #ifdef __clang__ 14 strbuf_addf(info, "clang: %s\n", __clang_version__); 15 #elif defined(__GNUC__) 16 strbuf_addf(info, "gnuc: %d.%d\n", __GNUC__, __GNUC_MINOR__); 17 #endif 18 19 #ifdef _MSC_VER 20 strbuf_addf(info, "MSVC version: %02d.%02d.%05d\n", 21 _MSC_VER / 100, _MSC_VER % 100, _MSC_FULL_VER % 100000); 22 #endif 23 24 if (len == info->len) 25 strbuf_addstr(info, _("no compiler information available\n")); 26 } 27 28 static inline void get_libc_info(struct strbuf *info) 29 { 30 size_t len = info->len; 31 32 #ifdef __GLIBC__ 33 strbuf_addf(info, "glibc: %s\n", gnu_get_libc_version()); 34 #endif 35 36 if (len == info->len) 37 strbuf_addstr(info, _("no libc information available\n")); 38 } 39 40 #endif /* COMPILER_H */