# How SerenityOS declares ssize\_t

DevFeed: [How SerenityOS declares ssize\_t](<https://devfeed.tech/articles/how-serenityos-declares-ssize-t-38356.md>)

Original publisher: [Read original article](<https://awesomekling.github.io/How-SerenityOS-declares-ssize_t/>)

Author: Andreas Kling

Published: 2023-04-04T00:00:00Z

Content type: opinion

Language: en

Sources: [Andreas Kling](<https://devfeed.tech/sources/andreas-kling.md>)

Topics: [C](<https://devfeed.tech/topics/c.md>), [POSIX](<https://devfeed.tech/topics/posix.md>), [Operating system](<https://devfeed.tech/topics/operating-system.md>), [compilers](<https://devfeed.tech/topics/compilers.md>), [standard](<https://devfeed.tech/topics/standard.md>), [Library](<https://devfeed.tech/topics/library.md>)

Tags: [c](<https://devfeed.tech/tags/c.md>), [compilers](<https://devfeed.tech/tags/compilers.md>), [cpp](<https://devfeed.tech/tags/cpp.md>), [libraries](<https://devfeed.tech/tags/libraries.md>), [library](<https://devfeed.tech/tags/library.md>), [posix](<https://devfeed.tech/tags/posix.md>), [serenityos](<https://devfeed.tech/tags/serenityos.md>), [standard](<https://devfeed.tech/tags/standard.md>), [technical](<https://devfeed.tech/tags/technical.md>), [unix](<https://devfeed.tech/tags/unix.md>)

## AI overview

This article explains how SerenityOS declares ssize_t using a C preprocessor macro technique. It contrasts the approach with more architecture-specific declarations commonly used by other C libraries and notes the limitations of the hack.

## Source excerpt

This post explores one of my favorite hacks in SerenityOS. I don't recommend doing this in your codebase, but it has worked for us so far. :^)