FRIDAY, JULY 17, 2026
cobol
Cobol portability enhanced for Darwin.
Cobol compiler now builds successfully on Darwin, improving portability.
This commit enhances Cobol compiler portability by including necessary headers and correcting type casts for Darwin systems. These changes address issues related to building on Darwin, specifically for the arm64 architecture, and ensure correct handling of file sizes in output formatting.
In Details
This change refactors the GCC Cobol front-end to improve portability to Darwin. It adds a missing include for sys/types.h and casts size_t to unsigned long for printf format specifiers when printing file sizes. These are common portability adjustments needed for different Unix-like systems.
For Context
- Darwin
- The open-source Unix-like operating system derived from NeXTSTEP, which forms the basis for Apple's macOS, iOS, and other Apple operating systems.
- portability
- The ability of software to be run on different computer systems, architectures, or operating systems with little or no modification.
- type cast
- An explicit conversion of a value from one data type to another. This is often necessary to prevent data loss or to satisfy the requirements of a function or operator.
- printf
- A standard C library function used for formatted output. It allows developers to specify how data should be presented, including data types and alignment.