~ubuntu-branches/ubuntu/quantal/zeroc-ice/quantal

« back to all changes in this revision

Viewing changes to cpp/src/IcePatch2/OS.h

  • Committer: Bazaar Package Importer
  • Author(s): Cleto Martin Angelina
  • Date: 2011-04-25 18:44:24 UTC
  • mfrom: (6.1.14 sid)
  • Revision ID: james.westby@ubuntu.com-20110425184424-sep9i9euu434vq4c
Tags: 3.4.1-7
* Bug fix: "libdb5.1-java.jar was renamed to db.jar", thanks to Ondřej
  Surý (Closes: #623555).
* Bug fix: "causes noise in php5", thanks to Jayen Ashar (Closes:
  #623533).

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
// **********************************************************************
2
 
//
3
 
// Copyright (c) 2003-2009 ZeroC, Inc. All rights reserved.
4
 
//
5
 
// This copy of Ice is licensed to you under the terms described in the
6
 
// ICE_LICENSE file included in this distribution.
7
 
//
8
 
// **********************************************************************
9
 
 
10
 
#ifndef ICE_PATCH2_OS_H
11
 
#define ICE_PATCH2_OS_H
12
 
 
13
 
#include <Ice/Config.h>
14
 
#include <sys/stat.h>
15
 
#include <fcntl.h>
16
 
#include <stdio.h>
17
 
 
18
 
#ifndef ICE_PATCH2_API
19
 
#   ifdef ICE_PATCH2_API_EXPORTS
20
 
#       define ICE_PATCH2_API ICE_DECLSPEC_EXPORT
21
 
#   else
22
 
#       define ICE_PATCH2_API ICE_DECLSPEC_IMPORT
23
 
#   endif
24
 
#endif
25
 
 
26
 
namespace OS
27
 
{
28
 
 
29
 
#ifdef _WIN32
30
 
 
31
 
typedef struct _stat structstat;
32
 
#ifdef _MSC_VER
33
 
#   define O_RDONLY _O_RDONLY
34
 
#   define O_BINARY _O_BINARY
35
 
 
36
 
#   define S_ISDIR(mode) ((mode) & _S_IFDIR)
37
 
#   define S_ISREG(mode) ((mode) & _S_IFREG)
38
 
#endif
39
 
 
40
 
#else
41
 
 
42
 
typedef struct stat structstat;
43
 
#   define O_BINARY 0
44
 
 
45
 
#endif
46
 
 
47
 
// BUGFIX: aCC errors if this is stat.
48
 
ICE_PATCH2_API int osstat(const std::string&, structstat*);
49
 
ICE_PATCH2_API int remove(const std::string&);
50
 
ICE_PATCH2_API int rename(const std::string&, const std::string&);
51
 
ICE_PATCH2_API int rmdir(const std::string&);
52
 
 
53
 
ICE_PATCH2_API int mkdir(const std::string&, int);
54
 
ICE_PATCH2_API FILE* fopen(const std::string&, const std::string&);
55
 
ICE_PATCH2_API int open(const std::string&, int);
56
 
ICE_PATCH2_API int getcwd(std::string&);
57
 
 
58
 
}
59
 
 
60
 
#endif