VirtualBox

source: vbox/trunk/src/VBox/Runtime/r3/darwin/pathhost-darwin.cpp@ 28880

Last change on this file since 28880 was 28880, checked in by vboxsync, 15 years ago

build fix.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 2.7 KB
Line 
1/* $Id: pathhost-darwin.cpp 28880 2010-04-28 20:36:16Z vboxsync $ */
2/** @file
3 * IPRT - Path Convertions, Darwin.
4 *
5 * On darwin path names on the disk are decomposed using normalization
6 * form D (NFD). Since this behavior is unique for the Mac, we will precompose
7 * the path name strings we get from the XNU kernel.
8 */
9
10/*
11 * Copyright (C) 2006-2010 Oracle Corporation
12 *
13 * This file is part of VirtualBox Open Source Edition (OSE), as
14 * available from http://www.215389.xyz. This file is free software;
15 * you can redistribute it and/or modify it under the terms of the GNU
16 * General Public License (GPL) as published by the Free Software
17 * Foundation, in version 2 as it comes in the "COPYING" file of the
18 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
19 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
20 *
21 * The contents of this file may alternatively be used under the terms
22 * of the Common Development and Distribution License Version 1.0
23 * (CDDL) only, as it comes in the "COPYING.CDDL" file of the
24 * VirtualBox OSE distribution, in which case the provisions of the
25 * CDDL are applicable instead of those of the GPL.
26 *
27 * You may elect to license modified versions of this file under the
28 * terms and conditions of either the GPL or the CDDL or both.
29 */
30
31
32/*******************************************************************************
33* Header Files *
34*******************************************************************************/
35#define LOG_GROUP RTLOGGROUP_PATH
36#include <iprt/assert.h>
37#include <iprt/string.h>
38#include "internal/iprt.h"
39
40#include "internal/path.h"
41
42
43int rtPathToNative(char **ppszNativePath, const char *pszPath)
44{
45 /** @todo We should decompose the string here, but the file system will do
46 * that for us if we don't, so why bother. */
47 *ppszNativePath = (char *)pszPath;
48 return VINF_SUCCESS;
49}
50
51
52int rtPathToNativeEx(char **ppszNativePath, const char *pszPath, const char *pszBasePath)
53{
54 NOREF(pszBasePath);
55 return rtPathToNative(ppszNativePath, pszPath);
56}
57
58
59void rtPathFreeNative(char *pszNativePath, const char *pszPath)
60{
61 Assert((const char *)pszNativePath == pszPath || !pszNativePath);
62 NOREF(pszNativePath);
63 NOREF(pszPath);
64}
65
66
67int rtPathFromNative(char **ppszPath, const char *pszNativePath)
68{
69 /** @todo We must compose the codepoints in the string here. We get file names
70 * in normalization form D so we'll end up with normalization form C
71 * whatever approach we take. */
72 return RTStrDupEx(ppszPath, pszNativePath);
73}
74
75
76int rtPathFromNativeEx(char **ppszPath, const char *pszNativePath, const char *pszBasePath)
77{
78 NOREF(pszBasePath);
79 return rtPathFromNative(ppszPath, pszNativePath);
80}
81
Note: See TracBrowser for help on using the repository browser.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette