---
name: "check_utility_compat"
section: "3"
platform: "freebsd"
package: "base"
version: "16.0-CURRENT-20261027-61c70dc16a79"
release: "FreeBSD 16.0-CURRENT (2026-10-27)"
platforms: ["freebsd"]
url: "https://new.carta.tech/check_utility_compat"
---

# check\_utility\_compat(3)

determine whether a utility should be compatible

## NAME

**check\_utility\_compat** – determine whether a utility should be compatible

## LIBRARY

Standard C Library (libc, -lc)

## SYNOPSIS

**#include \<unistd.h\>**

*int*\

**check\_utility\_compat**(*const char \*utility*);

## DESCRIPTION

The **check\_utility\_compat**() function checks whether *utility* should behave in a traditional (FreeBSD 4.7-compatible) manner, or in accordance with IEEE Std 1003.1-2001 (“POSIX.1”). The configuration is given as a comma-separated list of utility names; if the list is present but empty, all supported utilities assume their most compatible mode. The **check\_utility\_compat**() function first checks for an environment variable named \_COMPAT\_FreeBSD\_4. If that environment variable does not exist, then **check\_utility\_compat**() will attempt to read the contents of a symbolic link named */etc/compat-FreeBSD-4-util*. If no configuration is found, compatibility mode is disabled.

## RETURN VALUES

The **check\_utility\_compat**() function returns zero if *utility* should implement strict IEEE Std 1003.1-2001 (“POSIX.1”) behavior, and nonzero otherwise.

## FILES

- */etc/compat-FreeBSD-4-util*

  If present, a symbolic link whose expansion gives system-wide default settings for the **check\_utility\_compat**() function.

## ERRORS

No errors are detected.

## HISTORY

The **check\_utility\_compat**() function first appeared in FreeBSD 5.0.

## AUTHORS

This manual page was written by Garrett Wollman ⟨*wollman@FreeBSD.org*⟩.
