linux.hh (8600:b0d7c64ada19) linux.hh (9141:593fe25c86a6)
1/*
2 * Copyright (c) 2006 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;

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

87
88 //@{
89 /// For setsysinfo().
90 static const unsigned SSI_IEEE_FP_CONTROL = 14; //!< ieee_set_fp_control()
91 //@}
92
93 //@{
94 /// ioctl() command codes.
1/*
2 * Copyright (c) 2006 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;

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

87
88 //@{
89 /// For setsysinfo().
90 static const unsigned SSI_IEEE_FP_CONTROL = 14; //!< ieee_set_fp_control()
91 //@}
92
93 //@{
94 /// ioctl() command codes.
95 static const unsigned TIOCGETP_ = 0x7408;
96 static const unsigned TIOCSETP_ = 0x7409;
97 static const unsigned TIOCSETN_ = 0x740a;
98 static const unsigned TIOCSETC_ = 0x7411;
99 static const unsigned TIOCGETC_ = 0x7412;
100 static const unsigned FIONREAD_ = 0x467f;
101 static const unsigned TIOCISATTY_ = 0x5480;
102 static const unsigned TIOCGETS_ = 0x540d;
103 static const unsigned TIOCGETA_ = 0x7417;
104 static const unsigned TCSETAW_ = 0x5403; // 2.6.15 kernel
95 static const unsigned TGT_TCGETA = 0x5401;
96 static const unsigned TGT_TCSETAW = 0x5403;
97 static const unsigned TGT_TCGETS = 0x540d;
98 static const unsigned TGT_FIONREAD = 0x467f;
99 static const unsigned TGT_TIOCGETP = 0x7408;
100 static const unsigned TGT_TIOCSETP = 0x7409;
101 static const unsigned TGT_TIOCSETN = 0x740a;
105 //@}
106
102 //@}
103
104 static bool
105 isTtyReq(unsigned req)
106 {
107 switch (req) {
108 case TGT_TIOCGETP:
109 case TGT_TIOCSETP:
110 case TGT_TIOCSETN:
111 case TGT_FIONREAD:
112 case TGT_TCGETS:
113 case TGT_TCGETA:
114 case TGT_TCSETAW:
115 return true;
116 default:
117 return false;
118 }
119 }
120
107 /// For table().
108 static const int TBL_SYSINFO = 12;
109
110 /// Resource enumeration for getrlimit()/setrlimit().
111 enum rlimit_resources {
112 TGT_RLIMIT_CPU = 0,
113 TGT_RLIMIT_FSIZE = 1,
114 TGT_RLIMIT_DATA = 2,

--- 35 unchanged lines hidden ---
121 /// For table().
122 static const int TBL_SYSINFO = 12;
123
124 /// Resource enumeration for getrlimit()/setrlimit().
125 enum rlimit_resources {
126 TGT_RLIMIT_CPU = 0,
127 TGT_RLIMIT_FSIZE = 1,
128 TGT_RLIMIT_DATA = 2,

--- 35 unchanged lines hidden ---