[libc] Add dirent.h functions opendir, readdir, closedir and dirfd.Reviewed By: lntueDifferential Revision: https://reviews.llvm.org/D130459
[libc] fix line buffered empty file writesPreviously, any line buffered write of size 0 would cause an error.The variable used to track the index of the last newline started atthe size of the wri
[libc] fix line buffered empty file writesPreviously, any line buffered write of size 0 would cause an error.The variable used to track the index of the last newline started atthe size of the write - 1, which underflowed. Now it's handled properly,and a test has been added to prevent regressions.Reviewed By: sivachandra, lntueDifferential Revision: https://reviews.llvm.org/D127914
show more ...
[libc][Obvious] Removed few unused vars.
[libc] add buffering to FILE writesPreviously all FILE objects were fully buffered, this patch adds linebuffering and unbuffered output, as well as applying them to stdout andstderr.Reviewed By
[libc] add buffering to FILE writesPreviously all FILE objects were fully buffered, this patch adds linebuffering and unbuffered output, as well as applying them to stdout andstderr.Reviewed By: sivachandraDifferential Revision: https://reviews.llvm.org/D126829
[libc] Add global stdout and stderr objects.They are added as entrypoint object targets. The header-geninfrastructure has been extended to enable handling standard requiredglobal objects. The lib
[libc] Add global stdout and stderr objects.They are added as entrypoint object targets. The header-geninfrastructure has been extended to enable handling standard requiredglobal objects. The libc-api-test has also been extended to verify theglobal object declarations.Reviewed By: lntueDifferential Revision: https://reviews.llvm.org/D126329
[libc] Add implementations of feof, ferror and clearerr.The corresponding _unlocked functions have also been added.Reviewed By: lntue, michaelrjDifferential Revision: https://reviews.llvm.org/D
[libc] Add implementations of feof, ferror and clearerr.The corresponding _unlocked functions have also been added.Reviewed By: lntue, michaelrjDifferential Revision: https://reviews.llvm.org/D124311
[libc] Add the implementation of the fflush function.Note that the underlying flush implementation does not yet fully implementthe POSIX standard. It is complete with respect to the C standardhow
[libc] Add the implementation of the fflush function.Note that the underlying flush implementation does not yet fully implementthe POSIX standard. It is complete with respect to the C standardhowever. A future change will add the POSIX behavior. It should not affectthe implementation of the fflush function however as the POSIX behaviorwill be added in a lower layer.Reviewed By: lntueDifferential Revision: https://reviews.llvm.org/D124073
[libc] Add GNU extention functions fread_unlocked and fwrite_unlocked.POSIX locking and unlocking functions flockfile and funlockfile havealso been added. The locking is not recursive yet. A futur
[libc] Add GNU extention functions fread_unlocked and fwrite_unlocked.POSIX locking and unlocking functions flockfile and funlockfile havealso been added. The locking is not recursive yet. A future patch willmake the underlying lock a recursive lock.Reviewed By: lntueDifferential Revision: https://reviews.llvm.org/D123986
[libc][File] Fix a bug under fseek(..., SEEK_CUR).Reviewed By: lntueDifferential Revision: https://reviews.llvm.org/D122284
[libc] Add a linux file implementation.Reviewed By: lntueDifferential Revision: https://reviews.llvm.org/D121976
[libc][NFC] Add the platform independent file target only if mutex is available.The platform independent file implementation is not an entrypoint so itcannot be excluded via the entrypoints.txt fi
[libc][NFC] Add the platform independent file target only if mutex is available.The platform independent file implementation is not an entrypoint so itcannot be excluded via the entrypoints.txt file. Hence, we need aspecial treatment to exclude it from the build.Reviewed By: michaelrjDifferential Revision: https://reviews.llvm.org/D121947
[libc][NFC] Add a separate flag for capturing the '+' in fopen mode string.Having a separate flag helps in setting up proper flags whenimplementing, say the Linux specialization of File.Along th
[libc][NFC] Add a separate flag for capturing the '+' in fopen mode string.Having a separate flag helps in setting up proper flags whenimplementing, say the Linux specialization of File.Along the way, a signature for a function which is to be used to openfiles has been added. The implementation of the function is to beincluded in platform specializations.Reviewed By: lntueDifferential Revision: https://reviews.llvm.org/D121889
[libc][NFC] Keep the mutex with the base File data structure.This is now possible because we have a platform independent abstractionfor mutexes.Reviewed By: lntue, michaelrjDifferential Revisi
[libc][NFC] Keep the mutex with the base File data structure.This is now possible because we have a platform independent abstractionfor mutexes.Reviewed By: lntue, michaelrjDifferential Revision: https://reviews.llvm.org/D121773
[libc] Make the errno macro resolve to the thread local variable directly.With modern architectures having a thread pointer and language supportingthread locals, there is no reason to use a functi
[libc] Make the errno macro resolve to the thread local variable directly.With modern architectures having a thread pointer and language supportingthread locals, there is no reason to use a function intermediary to accessthe thread local errno value.The entrypoint corresponding to errno has been replaced with an objectlibrary as there is no formal entrypoint for errno anymore.Reviewed By: jeffbailey, michaelrjDifferential Revision: https://reviews.llvm.org/D120920
[libc][Obvious] Add a few missing deps listings.
[libc] Add a platform independent buffered file IO data structure.Reviewed By: lntueDifferential Revision: https://reviews.llvm.org/D119458