Commit Graph

29 Commits

Author SHA1 Message Date
Jonas 'Sortie' Termansen 611dc22e73 Standardize header include guards.
This change makes all the standard library and kernel headers use header
guards with a consistent scheme within the reserved namespace to avoid
conflicts with non-standard-library-implementation code.
2022-07-09 20:51:13 +02:00
Jonas 'Sortie' Termansen 29555d72bb Fix <fcntl.h> including <sys/stat.h> namespace pollution.
POSIX allows <fcntl.h> to include <sys/stat.h>, but doesn't require it.
There's little reason to do that, since they are separate headers, and
<fcntl.h> just needs the mode_t constants. Fix the code accidentally
relying on <fcntl.h> including <sys/stat.h>. The mode_t constants are now
provided in their own kernel header <sortix/mode.h>.

Additionally fix <sys/stat.h> pulling in all of <sys/types.h>, which is not
allowed by POSIX, which only requires a few types to be declared. Fix the
code accidentally relying on <sys/stat.h> including <sys/types.h>.

Finally fix <dirent.h> pulling in <stdint.h> through <sortix/dirent.h>.

The <sortix/__/dt.h> and <sortix/__/stat.h> headers are no longer required
and their contents have been merged into <sortix/__/dirent.h>.
2018-08-06 23:59:34 +02:00
Jonas 'Sortie' Termansen 2b72262b4f Relicense Sortix to the ISC license.
I hereby relicense all my work on Sortix under the ISC license as below.

All Sortix contributions by other people are already under this license,
are not substantial enough to be copyrightable, or have been removed.

All imported code from other projects is compatible with this license.

All GPL licensed code from other projects had previously been removed.

Copyright 2011-2016 Jonas 'Sortie' Termansen and contributors.

Permission to use, copy, modify, and distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
2016-03-05 22:21:50 +01:00
Jonas 'Sortie' Termansen 2e4b15daed Simplify directory reading. 2016-01-26 18:42:54 +01:00
Jonas 'Sortie' Termansen a79aeed0c1 Remove __BEGIN_DECLS and __END_DECLS. 2015-08-26 14:52:44 +02:00
Jonas 'Sortie' Termansen f3f7ede68d Remove _DIRENT_HAVE_D_FOO and _D_BAR_NAMLEN. 2015-08-22 01:29:38 +02:00
Jonas 'Sortie' Termansen 7098286b34 Rename struct DIR to struct __DIR. 2015-08-22 01:29:37 +02:00
Jonas 'Sortie' Termansen f4d9fda6de Honor feature macros in <dirent.h>. 2014-12-01 23:34:43 +01:00
Jonas 'Sortie' Termansen 5e60007904 Remove dcloseall() and fcloseall(). 2014-12-01 16:29:43 +01:00
Jonas 'Sortie' Termansen fbbb33287b Implement standard library feature macros. 2014-11-20 21:09:14 +01:00
Jonas 'Sortie' Termansen bcf0720a59 Add versionsort_r(3). 2014-11-20 21:09:14 +01:00
Jonas 'Sortie' Termansen 12652fe557 Add alphasort_r(3). 2014-11-20 21:09:14 +01:00
Jonas 'Sortie' Termansen 71ae173b37 Add dscandir_r(3). 2014-11-20 21:09:14 +01:00
Jonas 'Sortie' Termansen b607900a00 Fix <dirent.h> not being C89 friendly. 2014-07-07 17:52:33 +02:00
Jonas 'Sortie' Termansen da933464e5 Add d_namlen, d_dev, and d_type to struct dirent. 2014-03-01 14:37:40 +01:00
Jonas 'Sortie' Termansen ddce6045e0 Split libc/dirent/dir.cpp into multiple files. 2014-03-01 14:37:40 +01:00
Jonas 'Sortie' Termansen d7467e98be Move the declaration of the DIR structure into its own header. 2014-03-01 14:37:40 +01:00
Jonas 'Sortie' Termansen b08455c4d3 Remove mxmpp. 2014-03-01 14:37:40 +01:00
Jonas 'Sortie' Termansen 30a95dfa1e Split parts of <features.h> into <sys/cdefs.h>. 2013-12-17 14:30:44 +01:00
Jonas 'Sortie' Termansen ad1c6e0ed7 Remove <sys/__/types.h> inclusion from <features.h>. 2013-12-17 14:30:42 +01:00
Jonas 'Sortie' Termansen 7bec450367 Add _D_EXACT_NAMLEN and _D_ALLOC_NAMLEN macros to dirent.h. 2013-12-17 14:30:37 +01:00
Jonas 'Sortie' Termansen cab9f561ea Add feature macros to dirent.h describing struct dirent. 2013-12-17 14:30:37 +01:00
Jonas 'Sortie' Termansen 441777de28 Add versionsort(3). 2013-12-17 14:30:37 +01:00
Jonas 'Sortie' Termansen 9bd82e1d80 Add alphasort(3). 2013-12-17 14:30:37 +01:00
Jonas 'Sortie' Termansen 7de9273bef Add scandir(3). 2013-12-17 14:30:37 +01:00
Jonas 'Sortie' Termansen c829cb3c20 Add d_ino to struct dirent. 2013-12-17 14:30:32 +01:00
Jonas 'Sortie' Termansen 90036ca6a8 Update copyright headers of old files to the current format. 2013-12-17 14:30:23 +01:00
Jonas 'Sortie' Termansen 92b029b07f Remove tabs from header include guards. 2013-12-17 14:30:23 +01:00
Jonas 'Sortie' Termansen be4858f82c Rename libmaxsi to sortix libc. 2012-12-14 14:13:36 +01:00
Renamed from libmaxsi/include/dirent.h (Browse further)