~n-muench/ubuntu/oneiric/open-vm-tools/open-vm-tools.fix-836277

« back to all changes in this revision

Viewing changes to modules/freebsd/vmhgfs/hgfsUtil.h

  • Committer: Bazaar Package Importer
  • Author(s): Devid Antonio Filoni
  • Date: 2008-08-15 21:21:40 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20080815212140-05fhxj8wroosysmj
Tags: 2008.08.08-109361-1ubuntu1
* Merge from Debian unstable (LP: #258393), remaining Ubuntu change:
  - add ubuntu_toolchain_FTBFS.dpatch patch, fix FTBFS
* Update ubuntu_toolchain_FTBFS.dpatch patch for the new version.

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
 
20
20
/*
21
21
 * hgfsUtil.h --
22
 
 * 
 
22
 *
23
23
 *    Utility functions and macros used by hgfs.
24
24
 */
25
25
 
29
29
 
30
30
#   if defined(__linux__) && defined(__KERNEL__)
31
31
#      include "driver-config.h"
32
 
#      include <linux/time.h> // for time_t and timespec  
 
32
#      include <linux/time.h> // for time_t and timespec
33
33
    /* Include time.h in userspace code, but not in Solaris kernel code. */
34
34
#   elif defined(__FreeBSD__) && defined(_KERNEL)
35
35
    /* Do nothing. */
36
36
#   elif defined(__APPLE__) && defined(KERNEL)
37
37
#      include <sys/time.h>
38
 
#   else 
 
38
#   else
39
39
#      include <time.h>
40
 
#   endif 
 
40
#   endif
41
41
#   include "vm_basic_types.h"
42
42
#   if !defined(_STRUCT_TIMESPEC) &&   \
43
43
       !defined(_TIMESPEC_DECLARED) && \
71
71
    typedef DWORD HgfsInternalStatus;
72
72
#endif
73
73
 
74
 
/* 
75
 
 * Unfortunately, we need a catch-all "generic error" to use with 
 
74
/*
 
75
 * Unfortunately, we need a catch-all "generic error" to use with
76
76
 * HgfsInternalStatus, because there are times when cross-platform code needs
77
 
 * to return its own errors along with errors from platform specific code. 
 
77
 * to return its own errors along with errors from platform specific code.
78
78
 *
79
79
 * Using -1 should be safe because we expect our platforms to use zero as
80
80
 * success and a positive range of numbers as error values.
81
81
 */
82
 
#define HGFS_INTERNAL_STATUS_ERROR -1
 
82
#define HGFS_INTERNAL_STATUS_ERROR (-1)
 
83
 
 
84
#ifndef _WIN32
 
85
/*
 
86
 * This error code is used to notify the client that some of the parameters passed
 
87
 * (e.g. file handles) are not supported. Clients are expected to correct
 
88
 * the parameter (e.g. pass file name instead) and retry.
 
89
 *
 
90
 * Note that this error code is artificially made up and in future may conflict
 
91
 * with an "official" error code when added.
 
92
 */
 
93
#define EPARAMETERNOTSUPPORTED  (MAX_INT32 - 1)
 
94
#endif
83
95
 
84
96
/*
85
97
 * FreeBSD (pre-6.0) does not define EPROTO, so we'll define our own error code.
89
101
#endif
90
102
 
91
103
#define HGFS_NAME_BUFFER_SIZE(request) (HGFS_PACKET_MAX - (sizeof *request - 1))
92
 
#define HGFS_NAME_BUFFER_SIZET(sizet) (HGFS_PACKET_MAX - (sizet) - 1)
 
104
#define HGFS_NAME_BUFFER_SIZET(sizet) (HGFS_PACKET_MAX - ((sizet) - 1))
93
105
 
94
106
#ifndef _WIN32
95
107
/*