Shraman Chaudhuri
C Prototyping Framework

MASTER.H FOR C

Consolidates frequently used standard and platform-specific C headers into a single cohesive library. Designed for rapid prototyping, systems programming, and competitive problem solving across Linux, macOS, and Windows.

Consolidated Modules

HEADER DOMAINS

01

I/O & Memory Management

Dynamic memory allocation, formatted stream input/output, fixed-width integer types, and boolean definitions.

<stdio.h> <stdlib.h> <stddef.h> <stdint.h> <stdbool.h>
02

String & Character Utilities

Buffer manipulation, null-terminated ASCII string operations, wide-character support, and character class validation.

<string.h> <ctype.h> <wchar.h> <wctype.h>
03

Mathematics & Arithmetic

Trigonometric functions, power routines, complex number arithmetic, and platform architecture numeric boundaries.

<math.h> <complex.h> <float.h> <limits.h>
04

System & Filesystem (POSIX/Win32)

File descriptor operations, directory traversal, file metadata inspection, and low-level system call wrappers.

<fcntl.h> <unistd.h> <dirent.h> <sys/stat.h> <sys/types.h>
05

Threading & Process Control

POSIX threads, signal handling, process creation and fork synchronization routines.

<pthread.h> <signal.h> <sys/wait.h>
06

Cross-Platform Networking

Conditional socket includes seamlessly bridging Berkeley sockets on Unix/Linux/macOS with Winsock2 on Windows.

<sys/socket.h> <netinet/in.h> <arpa/inet.h> <winsock2.h>
Zero Redundancy

IMPLEMENTATION

Cross-Platform Socket & System Guarding

The header uses preprocessor macros to detect host operating systems, automatically providing Windows Sockets (<winsock2.h>) or POSIX networking (<sys/socket.h>) without breaking portability:

#ifndef MASTER_H
#define MASTER_H

// Standard I/O, Strings & Math
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <stdbool.h>

// Cross-Platform Networking Guards
#ifdef _WIN32
    #include <winsock2.h>
    #include <ws2tcpip.h>
    #pragma comment(lib, "ws2_32.lib")
#else
    #include <sys/socket.h>
    #include <netinet/in.h>
    #include <arpa/inet.h>
    #include <unistd.h>
#endif

#endif // MASTER_H
Environment & Toolchains

SUPPORTED PLATFORMS

C99 / C11
GCC / Clang
MSVC
Linux POSIX
macOS Darwin
Windows Win32