]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/tools/build/src/engine/pathunix.c
add subtree-ish sources for 12.0.3
[ceph.git] / ceph / src / boost / tools / build / src / engine / pathunix.c
1 /*
2 * Copyright 1993-2002 Christopher Seiwald and Perforce Software, Inc.
3 *
4 * This file is part of Jam - see jam.c for Copyright information.
5 */
6
7 /* This file is ALSO:
8 * Copyright 2001-2004 David Abrahams.
9 * Copyright 2005 Rene Rivera.
10 * Distributed under the Boost Software License, Version 1.0.
11 * (See accompanying file LICENSE_1_0.txt or copy at
12 * http://www.boost.org/LICENSE_1_0.txt)
13 */
14
15 /*
16 * pathunix.c - UNIX specific path manipulation support
17 */
18
19 #include "pathsys.h"
20
21 #include <stdlib.h>
22 #include <unistd.h> /* needed for getpid() */
23
24
25 /*
26 * path_get_process_id_()
27 */
28
29 unsigned long path_get_process_id_( void )
30 {
31 return getpid();
32 }
33
34
35 /*
36 * path_get_temp_path_()
37 */
38
39 void path_get_temp_path_( string * buffer )
40 {
41 char const * t = getenv( "TMPDIR" );
42 string_append( buffer, t ? t : "/tmp" );
43 }
44
45
46 /*
47 * path_translate_to_os_()
48 */
49
50 int path_translate_to_os_( char const * f, string * file )
51 {
52 int translated = 0;
53
54 /* by default, pass on the original path */
55 string_copy( file, f );
56
57 return translated;
58 }
59
60
61 /*
62 * path_register_key()
63 */
64
65 void path_register_key( OBJECT * path )
66 {
67 }
68
69
70 /*
71 * path_as_key()
72 */
73
74 OBJECT * path_as_key( OBJECT * path )
75 {
76 return object_copy( path );
77 }
78
79
80 /*
81 * path_done()
82 */
83
84 void path_done( void )
85 {
86 }