// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_2_0 && !NET_2_1
+#if (NET_2_0 || BOOTSTRAP_NET_2_0) && !NET_2_1
using System.Text;
using System.Runtime.InteropServices;
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_2_0 && !NET_2_1
+#if (NET_2_0 || BOOTSTRAP_NET_2_0) && !NET_2_1
using System;
using System.Text;
+2008-08-26 Miguel de Icaza <miguel@novell.com>
+
+ * New console features are used by gmcs.exe, but since we only
+ build gmcs.exe with the bootstrap corlib, we need to ensure all
+ the new stuff is included in BOOTSTRAP_NET_2_0
+
2008-08-26 Robert Jordan <robertj@gmx.net>
* AppDomain.cs (get_Evidence): Fix endless recursion exposed
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
+#if NET_2_0 || BOOTSTRAP_NET_2_0
+#define NET2_API
+#endif
using System.IO;
using System.Runtime.CompilerServices;
namespace System
{
public
-#if NET_2_0
+#if NET2_API
static
#else
sealed
static Console ()
{
-#if !NET_2_0 || NET_2_1
+#if !NET2_API || NET_2_1
Encoding inputEncoding;
Encoding outputEncoding;
#endif
((StreamWriter)stderr).AutoFlush = true;
stderr = TextWriter.Synchronized (stderr, true);
-#if NET_2_0 && !NET_2_1
+#if NET2_API && !NET_2_1
if (!Environment.IsRunningOnWindows && ConsoleDriver.IsConsole) {
StreamWriter w = new CStreamWriter (OpenStandardOutput (0), outputEncoding);
w.AutoFlush = true;
stdout = TextWriter.Synchronized (stdout, true);
stdin = new UnexceptionalStreamReader (OpenStandardInput (0), inputEncoding);
stdin = TextReader.Synchronized (stdin);
-#if NET_2_0 && !NET_2_1
+#if NET2_API && !NET_2_1
}
#endif
GC.SuppressFinalize (stdin);
}
-#if !NET_2_0
+#if !NET2_API
private Console ()
{
}
}
#endif
-#if NET_2_0 && !NET_2_1
+#if NET2_API && !NET_2_1
public static int Read ()
{
if ((stdin is CStreamReader) && ConsoleDriver.IsConsole) {
#endif
-#if NET_2_0 && !NET_2_1
+#if NET2_API && !NET_2_1
// FIXME: Console should use these encodings when changed
static Encoding inputEncoding;
static Encoding outputEncoding;
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_2_0
+#if NET_2_0 || BOOTSTRAP_NET_2_0
namespace System {
[Serializable]
public sealed class ConsoleCancelEventArgs : EventArgs {
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_2_0
+#if NET_2_0 || BOOTSTRAP_NET_2_0
namespace System {
public delegate void ConsoleCancelEventHandler (object sender, ConsoleCancelEventArgs e);
}
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_2_0
+#if NET_2_0 || BOOTSTRAP_NET_2_0
namespace System {
[Serializable]
public enum ConsoleColor {
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_2_0 && !NET_2_1
+#if (NET_2_0||BOOTSTRAP_NET_2_0) && !NET_2_1
using System.IO;
using System.Runtime.CompilerServices;
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_2_0
+#if NET_2_0 || BOOTSTRAP_NET_2_0
namespace System {
[Serializable]
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_2_0
+#if NET_2_0 || BOOTSTRAP_NET_2_0
namespace System {
[Serializable]
public struct ConsoleKeyInfo {
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_2_0
+#if NET_2_0 || BOOTSTRAP_NET_2_0
namespace System {
[Flags]
[Serializable]
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_2_0
+#if NET_2_0 || BOOTSTRAP_NET_2_0
namespace System {
[Serializable]
public enum ConsoleSpecialKey {
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_2_0
+#if NET_2_0 || BOOTSTRAP_NET_2_0
namespace System {
interface IConsoleDriver {
ConsoleColor BackgroundColor { get; set; }
// }
//
-#if NET_2_0
+#if NET_2_0 || BOOTSTRAP_NET_2_0
namespace System
{
static class KnownTerminals
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_2_0 && !NET_2_1
+#if (NET_2_0 || BOOTSTRAP_NET_2_0) && !NET_2_1
using System.Runtime.InteropServices;
using System.Text;
namespace System {
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_2_0
+#if NET_2_0 || BOOTSTRAP_NET_2_0
// These values are taken from 'man 5 terminfo' and /usr/include/term.h.
// They are the indexes for the boolean capabilities in a terminfo file.
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_2_0 && !NET_2_1
+#if (NET_2_0||BOOTSTRAP_NET_2_0) && !NET_2_1
//#define DEBUG
using System.Collections;
using System.IO;
class TermInfoDriver : IConsoleDriver {
/* Do not rename this field, its looked up from the runtime */
static bool need_window_dimensions = true;
-
+ static uint flag = 0xdeadbeef;
static string [] locations = { "/etc/terminfo", "/usr/share/terminfo", "/usr/lib/terminfo" };
TermInfoReader reader;
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_2_0 && !NET_2_1
+#if (NET_2_0 || BOOTSTRAP_NET_2_0) && !NET_2_1
// These values are taken from 'man 5 terminfo' and /usr/include/term.h.
// They are the indexes for the numeric capabilities in a terminfo file.
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_2_0 && !NET_2_1
+#if (NET_2_0 || BOOTSTRAP_NET_2_0) && !NET_2_1
using System.IO;
using System.Text;
namespace System {
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_2_0 && !NET_2_1
+#if (NET_2_0 || BOOTSTRAP_NET_2_0) && !NET_2_1
// These values are taken from 'man 5 terminfo' and /usr/include/term.h.
// They are the indexes for the string capabilities in a terminfo file.
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_2_0 && !NET_2_1
+#if (NET_2_0||BOOTSTRAP_NET_2_0) && !NET_2_1
using System.Runtime.InteropServices;
using System.Text;
namespace System {