musl - musl - an implementation of the standard library for Linux-based systems

index : musl
musl - an implementation of the standard library for Linux-based systems
summary refs log tree commit diff
path: root/src/stdlib/abs.c
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2018年02月25日 21:13:38 -0500
committerRich Felker <dalias@aerifal.cx>2018年02月25日 21:17:48 -0500
commit57b97b42bdecafd81c4967a10aef6eaf43d3fcb8 (patch)
tree477e999aaff92024254d99a6f4ea6805f586fd31 /src/stdlib/abs.c
parent2fae10f887b48b809bac56e4ff8a5c3fd4525de3 (diff)
downloadmusl-57b97b42bdecafd81c4967a10aef6eaf43d3fcb8.tar.gz
add public interface headers to implementation files
general policy is that all source files defining a public API or an ABI mechanism referenced by a public header should include the public header that declares the interface, so that the compiler or analysis tools can check the consistency of the declarations. Alexander Monakov pointed out a number of violations of this principle a few years back. fix them now.
Diffstat (limited to 'src/stdlib/abs.c')
-rw-r--r--src/stdlib/abs.c 2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/stdlib/abs.c b/src/stdlib/abs.c
index 4806d629..e721fdc2 100644
--- a/src/stdlib/abs.c
+++ b/src/stdlib/abs.c
@@ -1,3 +1,5 @@
+#include <stdlib.h>
+
int abs(int a)
{
return a>0 ? a : -a;
generated by cgit v1.2.1 (git 2.18.0) at 2025年09月08日 16:01:23 +0000

AltStyle によって変換されたページ (->オリジナル) /