~ubuntu-branches/ubuntu/vivid/cctools/vivid

« back to all changes in this revision

Viewing changes to parrot/src/parrot_client.c

  • Committer: Bazaar Package Importer
  • Author(s): Michael Hanke
  • Date: 2011-05-07 09:05:00 UTC
  • Revision ID: james.westby@ubuntu.com-20110507090500-lqpmdtwndor6e7os
Tags: upstream-3.3.2
ImportĀ upstreamĀ versionĀ 3.3.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
Copyright (C) 2008- The University of Notre Dame
 
3
This software is distributed under the GNU General Public License.
 
4
See the file COPYING for details.
 
5
*/
 
6
 
 
7
#include "tracer.table.h"
 
8
#include "tracer.table64.h"
 
9
#include "int_sizes.h"
 
10
 
 
11
#include <stdlib.h>
 
12
#include <unistd.h>
 
13
 
 
14
int parrot_whoami( const char *path, char *buf, int size )
 
15
{
 
16
#ifdef CCTOOLS_CPU_I386
 
17
        return syscall(SYSCALL32_parrot_whoami,path,buf,size);
 
18
#else
 
19
        return syscall(SYSCALL64_parrot_whoami,path,buf,size);
 
20
#endif
 
21
}
 
22
 
 
23
int parrot_locate( const char *path, char *buf, int size )
 
24
{
 
25
#ifdef CCTOOLS_CPU_I386
 
26
        return syscall(SYSCALL32_parrot_locate,path,buf,size);
 
27
#else
 
28
        return syscall(SYSCALL64_parrot_locate,path,buf,size);
 
29
#endif
 
30
}
 
31
 
 
32
int parrot_getacl( const char *path, char *buf, int size )
 
33
{
 
34
#ifdef CCTOOLS_CPU_I386
 
35
        return syscall(SYSCALL32_parrot_getacl,path,buf,size);
 
36
#else
 
37
        return syscall(SYSCALL64_parrot_getacl,path,buf,size);
 
38
#endif
 
39
}
 
40
 
 
41
int parrot_setacl( const char *path, const char *subject, const char *rights )
 
42
{
 
43
#ifdef CCTOOLS_CPU_I386
 
44
        return syscall(SYSCALL32_parrot_setacl,path,subject,rights);
 
45
#else
 
46
        return syscall(SYSCALL64_parrot_setacl,path,subject,rights);
 
47
#endif
 
48
}
 
49
 
 
50
int parrot_md5( const char *filename, unsigned char *digest )
 
51
{
 
52
#ifdef CCTOOLS_CPU_I386
 
53
        return syscall(SYSCALL32_parrot_md5,filename,digest);
 
54
#else
 
55
        return syscall(SYSCALL64_parrot_md5,filename,digest);
 
56
#endif
 
57
}
 
58
 
 
59
int parrot_cp( const char *source, const char *dest )
 
60
{
 
61
#ifdef CCTOOLS_CPU_I386
 
62
                return syscall(SYSCALL32_parrot_copyfile,source,dest);
 
63
#else
 
64
                return syscall(SYSCALL64_parrot_copyfile,source,dest);
 
65
#endif
 
66
}
 
67
 
 
68
int parrot_mkalloc( const char *path, INT64_T size, mode_t mode )
 
69
{
 
70
#ifdef CCTOOLS_CPU_I386
 
71
        return syscall(SYSCALL32_parrot_mkalloc,path,&size,mode);
 
72
#else
 
73
        return syscall(SYSCALL64_parrot_mkalloc,path,&size,mode);
 
74
#endif
 
75
}
 
76
 
 
77
int parrot_lsalloc( const char *path, char *alloc_path, INT64_T *total, INT64_T *inuse )
 
78
{
 
79
#ifdef CCTOOLS_CPU_I386
 
80
        return syscall(SYSCALL32_parrot_lsalloc,path,alloc_path,total,inuse);
 
81
#else
 
82
        return syscall(SYSCALL64_parrot_lsalloc,path,alloc_path,total,inuse);
 
83
#endif
 
84
}
 
85
 
 
86
int parrot_timeout( const char *time )
 
87
{
 
88
#ifdef CCTOOLS_CPU_I386
 
89
        return syscall(SYSCALL32_parrot_timeout,time);
 
90
#else
 
91
        return syscall(SYSCALL64_parrot_timeout,time);
 
92
#endif
 
93
}
 
94