summaryrefslogtreecommitdiffstats
path: root/llvm/lib/System/Unix
Commit message (Collapse)AuthorAgeFilesLines
...
* For PR540:Reid Spencer2005-07-121-0/+46
| | | | | | | | | Add a Mutex class for thread synchronization in a platform-independent way. The current implementation only supports pthreads. Win32 use of Critical Sections will be added later. The design permits other threading models to be used if (and only if) pthreads is not available. llvm-svn: 22403
* 1. Fix bug in getBaseName where it mishandles suffixesJeff Cohen2005-07-091-2/+6
| | | | | | 2. Fix bug in eraseSuffix where it allows /path/.suffix to become /path/ llvm-svn: 22362
* Ensure that functions like isDirectory don't fail if the file doesn'tReid Spencer2005-07-081-1/+13
| | | | | | exist but just return false instead. llvm-svn: 22361
* Two changes:Reid Spencer2005-07-081-7/+11
| | | | | | | | | | 1. Use isValid() to check validity of the resulting path name in the eraseSuffix even though we can't think of a case where eraseSuffix could possibly cause an invalid path name. 2. Rewrite isValid() to not use the deprecated realpath function any more. It now just uses isascii to make sure all the characters are legit. llvm-svn: 22359
* Stamp out tabsJeff Cohen2005-07-081-1/+1
| | | | llvm-svn: 22357
* Fix eraseSuffix()Jeff Cohen2005-07-081-10/+6
| | | | llvm-svn: 22355
* Final Changes For PR495:Reid Spencer2005-07-082-10/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | This chagne just renames some sys::Path methods to ensure they are not misused. The Path documentation now divides methods into two dimensions: Path/Disk and accessor/mutator. Path accessors and mutators only operate on the Path object itself without making any disk accesses. Disk accessors and mutators will also access or modify the file system. Because of the potentially destructive nature of disk mutators, it was decided that all such methods should end in the work "Disk" to ensure the user recognizes that the change will occur on the file system. This patch makes that change. The method name changes are: makeReadable -> makeReadableOnDisk makeWriteable -> makeWriteableOnDisk makeExecutable -> makeExecutableOnDisk setStatusInfo -> setStatusInfoOnDisk createDirectory -> createDirectoryOnDisk createFile -> createFileOnDisk createTemporaryFile -> createTemporaryFileOnDisk destroy -> eraseFromDisk rename -> renamePathOnDisk These changes pass the Linux Deja Gnu tests. llvm-svn: 22354
* For PR495:Reid Spencer2005-07-073-134/+83
| | | | | | | | | | | | | | | | | | | | | Get rid of the difference between file paths and directory paths. The Path class now simply stores a path that can refer to either a file or a directory. This required various changes in the implementation and interface of the class with the corresponding impact to its users. Doxygen comments were also updated to reflect these changes. Interface changes are: appendDirectory -> appendComponent appendFile -> appendComponent elideDirectory -> eraseComponent elideFile -> eraseComponent elideSuffix -> eraseSuffix renameFile -> rename setDirectory -> set setFile -> set Changes pass Dejagnu and llvm-test/SingleSource tests. llvm-svn: 22349
* For PR495:Reid Spencer2005-07-072-9/+9
| | | | | | | | | | | Change interface to Path class: readable -> canRead writable -> canWrite executable -> canExecute More (incremental) changes coming to close 495. llvm-svn: 22345
* Put in a hack for Cygwin that prevents mkdtemp from being used sinceReid Spencer2005-06-021-0/+5
| | | | | | configure seems to find it on Cygwin but linking against it fails. llvm-svn: 22189
* comment the hpux bitDuraid Madina2005-05-161-0/+1
| | | | llvm-svn: 22081
* Remove vim settings from source code; people should use llvm/utils/vim/vimrcMisha Brukman2005-05-058-8/+0
| | | | llvm-svn: 21704
* Silence gcc-4.0.0 warnings.Alkis Evlogimenos2005-04-221-4/+4
| | | | llvm-svn: 21453
* Remove trailing whitespaceMisha Brukman2005-04-212-9/+9
| | | | llvm-svn: 21422
* Provide an implementation of the GetCurrentUserId and GetCurrentGroupIdReid Spencer2005-04-211-0/+10
| | | | | | methods that were recently added to the interface. llvm-svn: 21401
* For Bug 543:Reid Spencer2005-04-211-24/+24
| | | | | | | | Standardize the error messages to be in "path: what failed: why" format. Also attempt to use the correct errno to ThrowErrno in situations where the errno value is erased by subsequent system calls. llvm-svn: 21385
* For Bug 543:Reid Spencer2005-04-211-6/+8
| | | | | | | Allow the ThrowErrno function to optionally accept an error number parameter so that callers can specify the error number to be used. llvm-svn: 21384
* Add FIXME by Markus Oberhumer from bug 545: not checking for "." in $PATH mayMisha Brukman2005-04-201-0/+2
| | | | | | result in returning executable files that won't be runnable. llvm-svn: 21378
* Do not mark directories as `executable', we only want program filesMisha Brukman2005-04-201-0/+4
| | | | | | Patch by Markus Oberhumer. llvm-svn: 21377
* Ignore dangling symlinks in getDirectoryContents()Misha Brukman2005-04-201-3/+8
| | | | | | Thanks to Markus Oberhumer for the patch! llvm-svn: 21370
* Be slightly more accurate in an error message.Reid Spencer2005-03-021-1/+1
| | | | llvm-svn: 20397
* Fix a bug in my previous change to this, which broke the build on sparcs.Chris Lattner2005-02-141-1/+1
| | | | llvm-svn: 20184
* If errno is zero strerror_r does not modify the buffer, leaving it unterminated.Chris Lattner2005-02-132-2/+6
| | | | | | This causes garbage to be printed out after error messages. llvm-svn: 20165
* Fix bugpointChris Lattner2005-01-161-2/+1
| | | | llvm-svn: 19605
* Make asctime_r work for HP/UX.Reid Spencer2005-01-141-0/+4
| | | | llvm-svn: 19544
* Rename Unix/*.cpp and Win32/*.cpp to have a *.inc suffix so that the sillyReid Spencer2005-01-097-0/+0
| | | | | | | gdb debugger doesn't get confused on which file it is reading (the one in lib/System or the one in lib/System/{Win32,Unix}) llvm-svn: 19426
* Use size_t instead of long to represent memory usage. long is 32 bitsJeff Cohen2005-01-081-2/+2
| | | | | | on 64-bit Windows. llvm-svn: 19393
* Add functions for determining if the stdin/out/err is connected to aReid Spencer2005-01-011-0/+24
| | | | | | console or not. llvm-svn: 19233
* Fix a compilation error for the case where mallinfo() is not available.Reid Spencer2004-12-311-1/+1
| | | | llvm-svn: 19201
* For PR351:Reid Spencer2004-12-271-4/+58
| | | | | | | | | | * Ensure #includes are wrapped with appropriate HAVE_ guards * Account for variations in time.h and sys/time.h inclusion. * Add macros for getting wait(2) exit status correctly (per autoconf sugg.) * Implement ThrowErrno in terms of strerror_r, strerror or none based on what is available on the platform. llvm-svn: 19161
* For PR351:Reid Spencer2004-12-271-4/+0
| | | | | | * Remove redundant #includes that are now in Unix.h llvm-svn: 19160
* For PR351:Reid Spencer2004-12-271-0/+12
| | | | | | | * Move implementation of sys::PreventCoreFiles function to this file from the now defunct SysConfig abstraction. llvm-svn: 19159
* For PR351:Reid Spencer2004-12-271-1/+25
| | | | | | | * Ensure #includes are wrapped with appropriate HAVE_ guards * Ensure variations in "dirent" structure are accounted for. llvm-svn: 19158
* For PR351:Reid Spencer2004-12-271-0/+50
| | | | | | | * Ensure #includes are wrapped with appropriate HAVE_ guards * Consolidate implementation from operating system specific directory. llvm-svn: 19157
* For PR351:Reid Spencer2004-12-273-6/+20
| | | | | | * Ensure #includes are wrapped with appropriate HAVE_ guards llvm-svn: 19156
* For PR351:Reid Spencer2004-12-271-33/+0
| | | | | | | | SysConf abstraction was pointless because it had a single function in it that pertained only to the current process. So merge it into the Process abstraction and remove the files completely. llvm-svn: 19149
* For PR351:Reid Spencer2004-12-241-0/+89
| | | | | | | | Merge implementations of isValid and GetTemporaryDirectory into this file. There is not any point having the operating system specific files for such little variation between the Unix family of systems. llvm-svn: 19134
* Remove these files as they are not being included any more. DynamicLibraryReid Spencer2004-12-241-56/+0
| | | | | | | is now implemented via ltdl.cpp which has its own way of dealing with the different platforms. llvm-svn: 19129
* Put the CopyFile function explicitly in the sys namespace.Reid Spencer2004-12-211-1/+1
| | | | llvm-svn: 19079
* Implement GetTimeUsage correctly.Reid Spencer2004-12-201-4/+8
| | | | llvm-svn: 19074
* Provide a getrusage based implementation of GetTotalMemoryUsage and useReid Spencer2004-12-201-0/+4
| | | | | | the ru_maxrss field as an approximation. llvm-svn: 19072
* Consistently use the same #if style. Also, fix a bug testing for sbrk(3)Reid Spencer2004-12-201-4/+4
| | | | llvm-svn: 19071
* For PR351:Reid Spencer2004-12-201-6/+78
| | | | | | | | * Implement GetMallocUsage to get usage of malloc heap * Implement GetMemoryUsage to get total memory usage of process * Implement GetTimeUsage to get elapsed/user/system time llvm-svn: 19055
* * Use "" for LLVM include files, not <>Misha Brukman2004-12-201-5/+3
| | | | | | | * llvm/Config/alloca.h already #includes config.h * Minor readability/stylistic changes llvm-svn: 19048
* Use <> for system #include filesMisha Brukman2004-12-191-1/+1
| | | | llvm-svn: 19046
* Make references to 'struct sigaction' compile under Solaris.Brian Gaeke2004-12-191-0/+1
| | | | llvm-svn: 19045
* For PR351:Reid Spencer2004-12-191-22/+99
| | | | | | | Move the functionality of RunProgramWithTimeout into the ExecuteAndWait function: support a timeout and I/O redirects llvm-svn: 19043
* For PR351:Reid Spencer2004-12-191-0/+1
| | | | | | Add a needed include. llvm-svn: 19042
* Change the signatures of the destroyFile and destroyDirectory methods toReid Spencer2004-12-151-2/+2
| | | | | | const because they affect the file system, not the Path object. llvm-svn: 18973
* Remove automatic insertion of CFE's lib directory into the bytecode pathReid Spencer2004-12-151-7/+0
| | | | | | because LLVM should be agnostic to the needs of specific front ends. llvm-svn: 18968
OpenPOWER on IntegriCloud