1 //===- llvm/System/AIX/Path.cpp - AIX Path Implementation -------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file was developed by Reid Spencer and is distributed under the
6 // University of Illinois Open Source License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // This file provides the AIX specific implementation of the Path class.
12 //===----------------------------------------------------------------------===//
14 // Include the generic unix implementation
15 #include "../Unix/Path.cpp"
20 //===----------------------------------------------------------------------===//
21 //=== WARNING: Implementation here must contain only AIX specific code
22 //=== and must not be generic UNIX code (see ../Unix/Path.cpp)
23 //===----------------------------------------------------------------------===//
26 Path::is_valid() const {
29 if (path.length() >= MAXPATHLEN)
35 Path::GetTemporaryDirectory() {
36 char pathname[MAXPATHLEN];
37 strcpy(pathname,"/tmp/llvm_XXXXXX");
38 if (0 == mkdtemp(pathname))
39 ThrowErrno(std::string(pathname) + ": Can't create temporary directory");
41 result.set_directory(pathname);
42 assert(result.is_valid() && "mkdtemp didn't create a valid pathname!");
47 Path::GetDLLSuffix() {
53 // vim: sw=2 smartindent smarttab tw=80 autoindent expandtab