aboutsummaryrefslogtreecommitdiff
path: root/www/content/posts/c-func-ext.md
diff options
context:
space:
mode:
authorYuqian Yang <crupest@crupest.life>2025-03-05 00:21:48 +0800
committerYuqian Yang <crupest@crupest.life>2025-03-27 01:33:06 +0800
commitfb7194d8af642373b9b371fbfb9c7099b193bfd2 (patch)
tree6f92499b6f7d33b53a817f324ddc2820954a1d88 /www/content/posts/c-func-ext.md
parent3ad034a1b5755bd5d8ebed71637dedb9089a7dce (diff)
downloadcrupest-fb7194d8af642373b9b371fbfb9c7099b193bfd2.tar.gz
crupest-fb7194d8af642373b9b371fbfb9c7099b193bfd2.tar.bz2
crupest-fb7194d8af642373b9b371fbfb9c7099b193bfd2.zip
feat(www): add post systemd-nspawn.
Diffstat (limited to 'www/content/posts/c-func-ext.md')
-rw-r--r--www/content/posts/c-func-ext.md23
1 files changed, 23 insertions, 0 deletions
diff --git a/www/content/posts/c-func-ext.md b/www/content/posts/c-func-ext.md
new file mode 100644
index 0000000..f5ab8fb
--- /dev/null
+++ b/www/content/posts/c-func-ext.md
@@ -0,0 +1,23 @@
+---
+title: "Libc/POSIX Function \"Extensions\""
+date: 2025-03-04T13:40:33+08:00
+lastmod: 2025-03-04T13:40:33+08:00
+categories: coding
+tags:
+ - c
+ - posix
+---
+
+Recently, I've been working on porting libraries to GNU/Hurd. The maintainers of GNU/Hurd
+have a strong belief that [`*_MAX` macros on POSIX system interfaces](https://pubs.opengroup.org/onlinepubs/9699919799.2008edition/nframe.html)
+are very evil things. This is indeed true as a lot of (old) libraries relying on those macros
+to determine the buffer size. In modern programming world, it is definitely a bad
+idea to use fixed values for buffer sizes without considering possible overflow, unless
+you are certain that size is sufficient.
+
+When you get rid of some old things, you will always meet compatibility problems. In these
+case, old source codes using these macros just do not compile now. So here are some
+
+<!--more-->
+
+