1 //===-- MIUtilSystemOsx.cpp -------------------------------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
11 // File: MIUtilSystemOsx.cpp
13 // Overview: CMIUtilSystemOsx implementation.
15 // Environment: Compilers: Visual C++ 12.
16 // gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
17 // Libraries: See MIReadmetxt.
22 #if defined(__APPLE__)
25 #include "MIUtilSystemOsx.h"
26 #include "MICmnResources.h"
28 //++ ------------------------------------------------------------------------------------
29 // Details: CMIUtilSystemOsx constructor.
35 CMIUtilSystemOsx::CMIUtilSystemOsx(void)
39 //++ ------------------------------------------------------------------------------------
40 // Details: CMIUtilSystemOsx destructor.
46 CMIUtilSystemOsx::~CMIUtilSystemOsx(void)
50 //++ ------------------------------------------------------------------------------------
51 // Details: Retrieve the OS system error message for the given system error code.
53 // Args: vError - (R) OS error code value.
54 // vrwErrorMsg - (W) The error message.
55 // Return: MIstatus::success - Functional succeeded.
56 // MIstatus::failure - Functional failed.
60 CMIUtilSystemOsx::GetOSErrorMsg(const MIint vError, CMIUtilString &vrwErrorMsg) const
65 bool bOk = MIstatus::failure;
67 // ToDo: Implement LINUX version
72 //++ ------------------------------------------------------------------------------------
73 // Details: Retrieve if possible the OS last error description.
76 // Return: CMIUtilString - Error description.
80 CMIUtilSystemOsx::GetOSLastError(void) const
82 CMIUtilString errorMsg("Error fn not implemented");
84 // ToDo: Implement LINUX version
89 //++ ------------------------------------------------------------------------------------
90 // Details: Retrieves the fully qualified path for the this application. If the function
91 // fails the string is filled with the error message.
93 // Args: vrwFileNamePath - (W) The excutable's name and path or last error description.
94 // Return: MIstatus::success - Functional succeeded.
95 // MIstatus::failure - Functional failed.
99 CMIUtilSystemOsx::GetExecutablesPath(CMIUtilString &vrwFileNamePath) const
101 vrwFileNamePath = CMIUtilString(".");
102 return MIstatus::success;
105 //++ ------------------------------------------------------------------------------------
106 // Details: Retrieves the fully qualified path for the Log file for this application.
107 // If the function fails the string is filled with the error message.
108 // Append a dummy file name on the end of the path. This will be stripped off
109 // later and the real log file name replaces it.
111 // Args: vrwFileNamePath - (W) The Log file's name and path or last error description.
112 // Return: MIstatus::success - Functional succeeded.
113 // MIstatus::failure - Functional failed.
117 CMIUtilSystemOsx::GetLogFilesPath(CMIUtilString &vrwFileNamePath) const
119 vrwFileNamePath = CMIUtilString(".");
120 return MIstatus::success;
123 #endif // #if defined( __APPLE__ )