Deleted Added
sdiff udiff text old ( 2764:e6fea7527b3c ) new ( 3113:a6811aaea654 )
full compact
1/*
2 * Copyright (c) 2004-2005 The Regents of The University of Michigan
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met: redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer;

--- 24 unchanged lines hidden (view full) ---

33#include "config/full_system.hh"
34
35#if FULL_SYSTEM
36
37class Solaris {};
38
39#else //!FULL_SYSTEM
40
41#include <inttypes.h>
42
43#include "kern/operatingsystem.hh"
44
45class TranslatingPort;
46
47///
48/// This class encapsulates the types, structures, constants,
49/// functions, and syscall-number mappings specific to the Solaris
50/// syscall interface.
51///
52class Solaris : public OperatingSystem
53{
54
55 public:
56
57 //@{
58 /// Basic Solaris types.
59/* typedef uint64_t size_t;
60 typedef uint64_t off_t;
61 typedef int64_t time_t;
62 typedef int32_t uid_t;
63 typedef int32_t gid_t;
64 typedef uint64_t rlim_t;
65 typedef uint64_t ino_t;
66 typedef uint64_t dev_t;
67 typedef uint32_t mode_t;
68 typedef uint32_t nlink_t;*/
69 //@}
70
71 struct tgt_timespec {
72 int64_t tv_sec;
73 int64_t tv_nsec;
74 };
75
76 /// Stat buffer. Note that we can't call it 'stat' since that
77 /// gets #defined to something else on some systems.
78 typedef struct {
79 uint64_t st_dev; //!< device
80 uint64_t st_ino; //!< inode
81 uint32_t st_mode; //!< mode
82 uint32_t st_nlink; //!< link count
83 int32_t st_uid; //!< owner's user ID
84 int32_t st_gid; //!< owner's group ID
85 uint64_t st_rdev; //!< device number
86 int64_t st_size; //!< file size in bytes
87 //struct tgt_timespec st_atimeX; //!< time of last access
88 //struct tgt_timespec st_mtimeX; //!< time of last modification
89 //struct tgt_timespec st_ctimeX; //!< time of last status change
90 int64_t st_atimeX, st_mtimeX, st_ctimeX;
91 int32_t st_blksize; //!< optimal I/O block size
92 int64_t st_blocks; //!< number of blocks allocated
93 char st_fstype[16];
94 } tgt_stat;
95
96 // same for stat64
97 typedef struct {
98 uint64_t st_dev; //!< device
99 uint64_t st_ino; //!< inode
100 uint32_t st_mode; //!< mode
101 uint32_t st_nlink; //!< link count
102 int32_t st_uid; //!< owner's user ID
103 int32_t st_gid; //!< owner's group ID
104 uint64_t st_rdev; //!< device number
105 int64_t st_size; //!< file size in bytes
106 //struct tgt_timespec st_atimeX; //!< time of last access
107 //struct tgt_timespec st_mtimeX; //!< time of last modification
108 //struct tgt_timespec st_ctimeX; //!< time of last status change
109 int64_t st_atimeX, st_mtimeX, st_ctimeX;
110 int32_t st_blksize; //!< optimal I/O block size
111 int64_t st_blocks; //!< number of blocks allocated
112 char st_fstype[16];
113 } tgt_stat64;
114
115 /// Length of strings in struct utsname (plus 1 for null char).
116 static const int _SYS_NMLN = 257;
117
118 /// Interface struct for uname().
119 typedef struct utsname {
120 char sysname[_SYS_NMLN]; //!< System name.
121 char nodename[_SYS_NMLN]; //!< Node name.
122 char release[_SYS_NMLN]; //!< OS release.
123 char version[_SYS_NMLN]; //!< OS version.
124 char machine[_SYS_NMLN]; //!< Machine type.
125 } utsname;
126
127}; // class Solaris
128
129
130#endif // FULL_SYSTEM
131
132#endif // __SOLARIS_HH__