r/cprogramming • • Mar 27 '26
Created a simple unix posix-compliant(hopefully) directory archiever, any reviews/views appreciated :)
This is basically my most complex C project so far. Here is it:
1
Upvotes
1
u/flyingron Mar 27 '26
Your code seems to assume GCC.
The later POSIX (and GCC) have PATH_MAX and NAME_MAX in limits.h, so you probably should use that rather than just blinding using 4096.
Similarly, you probably should use size_t and offset_t as appropriate rather than just assuming 64 bits will always work.
1
u/Key_River7180 Mar 27 '26
Ok, but this is not posix. You do many assumptions here and there.