macOS
brew install unifdeflocal Homebrew formula metadata
sudo port install unifdefMacPorts ports tree · devel/unifdef/Portfile · Source: api.github.com
brew / rang 9647
Consultez les chemins d'installation, exécutables, métadonnées et notes de sécurité de unifdef pour les workflows d'agents IA.
installation
brew install unifdeflocal Homebrew formula metadata
sudo port install unifdefMacPorts ports tree · devel/unifdef/Portfile · Source: api.github.com
sudo apk add unifdefAlpine Linux edge package indexes · unifdef · Source: dl-cdn.alpinelinux.org
sudo apt install unifdefDebian stable package indexes · unifdef · Source: deb.debian.org
sudo dnf install unifdefFedora Rawhide package metadata · unifdef · Source: dl.fedoraproject.org
nix profile install nixpkgs#unifdefnixpkgs package indexes · pkgs/by-name/un/unifdef/package.nix · Source: api.github.com
sudo pacman -S unifdefArch Linux sync databases · unifdef · Source: geo.mirror.pkgbuild.com
sudo zypper install unifdefopenSUSE Tumbleweed package metadata · unifdef · Source: download.opensuse.org
aperçu
Selectively process conditional C preprocessor directives
historique
unifdef is a source-filtering utility that selectively removes C preprocessor conditionals. The official manual says it processes `#if`, `#ifdef`, `#ifndef`, `#elif`, `#else`, and `#endif` lines when command-line macro definitions are sufficient to decide whether a block should be kept or removed.
unifdef is much older than its GitHub mirror. The official manual states that the command appeared in 2.9BSD, and that ANSI C support was added in FreeBSD 4.7. It also credits the original implementation to Dave Yost and Tony Finch's rewrite for ANSI C support.
Tony Finch's official project page explains the modern motivation: understanding `xterm`'s heavily conditionalized pty-handling code. That places unifdef in the Unix source-reading and source-cleanup tradition rather than in general-purpose preprocessing.
The current project page publishes release archives, manual documentation, a browsable source repository, and a GitHub collaboration mirror. The GitHub README warns that GitHub release downloads are incomplete and points users back to the official dotat.at release files, which is useful context for packagers.
The official homepage gives a concrete high-profile adoption example: the Linux kernel uses unifdef to strip `#ifdef __KERNEL__` sections from headers exported to userland. It also notes use outside C, including LaTeX workflows.
The supplied package facts show broad distribution packaging across Homebrew, Debian/Ubuntu, Fedora/DNF, Alpine, Arch, MacPorts, Nix, openSUSE, and others. That matches the tool's age and purpose: it is small, portable, and useful in build and source-export pipelines.
unifdef is used by specifying macros with `-D`, `-U`, or a definitions file, then filtering input files so known conditional branches are removed while unknown conditionals are preserved. It can operate on stdin/stdout or modify files in place.
The manual also documents `unifdefall`, a script that uses `unifdef -s` and `cpp -dM` to derive macro information and remove all conditional directives from a file. This shows the tool's role as a controlled partial preprocessor rather than a full C preprocessor replacement.
unifdef is important in the package-nerd niche because it is both tiny and historically deep: a BSD-era tool still used for practical source filtering. It belongs in base-system and package-manager collections because build scripts and source-export tasks can depend on it without pulling in a large toolchain beyond normal C build support.
Its Linux-kernel header-export use case is exactly the kind of quiet infrastructure job package maintainers care about: remove implementation-only conditional sections, preserve line-oriented source structure, and keep generated user-facing source understandable.
posture de sécurité
Aucun manifest local de gestion des secrets correspondant n'a été trouvé pour unifdef. Les métadonnées de paquet Nucleus restent publiées ici afin que la couverture future dispose d'une URL stable.
Avant une utilisation sans surveillance par un agent, vérifiez si l'outil lit des identifiants en clair, écrit un état distant, publie des artefacts ou lance des plugins.
exécutables
| Commande | Type | Exposition | Note |
|---|---|---|---|
unifdef | exécutable | exécutable indexé | Découvert depuis l'index local des exécutables. |
unifdefall | exécutable | exécutable indexé | Découvert depuis l'index local des exécutables. |
fraîcheur
Ces signaux séparent l'âge de génération de la page, l'activité du gestionnaire de paquets et la comparaison avec les versions amont. Un retard de version n'est signalé que lorsqu'une URL de preuve et des versions comparables sont présentes.
métadonnées d'installation
| Clé du paquet | brew:unifdef |
|---|---|
| Version | 2.12 |
| Gestionnaire de paquets | Homebrew |
| Page d'accueil | https://dotat.at/prog/unifdef/ |
| Dépôt | https://github.com/fanf2/unifdef |
| Bouteille | non enregistré |
| Service | aucun déclaré |
correspondances dans les bases sources
Les correspondances proviennent d’index externes de gestionnaires de paquets et restent séparées des liens de paquets Automic Vault locaux.
unifdef 2.12-1
Remove cpp '#ifdef' lines from files
sudo apt install unifdefunifdef
nix profile install nixpkgs#unifdefunifdef 2.12-1
Remove cpp '#ifdef' lines from files
sudo apt install unifdefunifdef 2.12-r4
Selectively remove C preprocessor conditionals
https://github.com/fanf2/unifdef
sudo apk add unifdefunifdef-doc 2.12-r4
Selectively remove C preprocessor conditionals (documentation)
https://github.com/fanf2/unifdef
sudo apk add unifdef-docunifdef 2.12-9.fc45
Selectively remove C preprocessor conditionals
https://dotat.at/prog/unifdef/
sudo dnf install unifdefunifdef 2.12-4
Remove #ifdef'ed lines
https://dotat.at/prog/unifdef/
sudo pacman -S unifdefunifdef 2.12-3.5
Removes ifdefs from C files
https://dotat.at/prog/unifdef/
sudo zypper install unifdefunifdef
sudo port install unifdefpiste source
Cette page est servie par av-web depuis l'artéfact SQLite privé des paquets généré par scripts/generate-pkg-sqlite.py.
View the package source record on GitHub.