How to check CPU architecture during compile time?

This page summarizes the projects mentioned and recommended in the original post on /r/C_Programming

Our great sponsors
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • SaaSHub - Software Alternatives and Reviews
  • BUSY

    BUSY is a lean, statically typed, cross-platform, easily bootstrappable build system for GCC, CLANG and MSVC inspired by Google GN

  • Here is the code from the BUSY build system that detects the OS, CPU architecture and toolchain in C89: https://github.com/rochus-keller/BUSY/blob/main/bsdetect.h.

  • scratch

    Personal scratch code

  • Encoding is really just a bit of math and shouldn't depend on the underlying integer representation. For example, here's a LEB128 encoder I wrote earlier this year: leb128.c. Specifically this signed 32-bit encoder:

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts