[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Dotgnu-pnet-commits] CVS: pnetlib/compat .cvsignore,NONE,1.1 CSharpCom
From: |
Rhys Weatherley <address@hidden> |
Subject: |
[Dotgnu-pnet-commits] CVS: pnetlib/compat .cvsignore,NONE,1.1 CSharpCompiler.cs,NONE,1.1 Makefile.am,NONE,1.1 README,NONE,1.1 VisualC.cs,NONE,1.1 compat.build,NONE,1.1 |
Date: |
Sun, 08 Dec 2002 19:17:56 -0500 |
Update of /cvsroot/dotgnu-pnet/pnetlib/compat
In directory subversions:/tmp/cvs-serv14997/compat
Added Files:
.cvsignore CSharpCompiler.cs Makefile.am README VisualC.cs
compat.build
Log Message:
Add the "compat" directory, and implement two MS assemblies (Microsoft.VisualC
and cscompmgd) within it, solely for the sake of backwards-compatbility.
--- NEW FILE ---
Makefile
Makefile.in
.deps
*.dll
--- NEW FILE ---
/*
* CSharpCompiler.cs - Implement the "cscompmgd" assembly.
*
* Copyright (C) 2002 Southern Storm Software, Pty Ltd.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
namespace Microsoft.CSharp
{
using System;
using System.Text;
using System.Collections;
// Level of error that caused a message.
public enum ErrorLevel
{
None = 0,
Warning = 1,
Error = 2,
FatalError = 3
} // enum ErrorLevel
// Wrapped version of a compiler error message.
public class CompilerError
{
// Public error information.
public ErrorLevel ErrorLevel;
public String ErrorMessage;
public int ErrorNumber;
public int SourceColumn;
public String SourceFile;
public int SourceLine;
// Convert the error information into a string.
public override String ToString()
{
StringBuilder builder = new StringBuilder();
if(SourceFile != null)
{
builder.AppendFormat("{0}({1},{2}): ",
SourceFile,
SourceLine, SourceColumn);
}
switch(ErrorLevel)
{
case ErrorLevel.Warning:
{
builder.Append("warning ");
}
break;
case ErrorLevel.Error:
{
builder.Append("error ");
}
break;
case ErrorLevel.FatalError:
{
builder.Append("fatal error ");
}
break;
default: break;
}
builder.AppendFormat("CS{0:D4}: ", ErrorNumber);
if(ErrorMessage != null)
{
builder.Append(ErrorMessage);
}
return builder.ToString();
}
} // class CompilerError
// Public interface to the C# compiler.
public class Compiler
{
// Compile a number of source files.
public static CompilerError[] Compile
(String[] sourceTexts, String[] sourceTextNames,
String target, String[] imports, IDictionary
options)
{
// TODO: wrap this around
"System.CodeDom.Compiler".
throw new NotImplementedException();
}
} // class Compiler
} // namespace Microsoft.CSharp
--- NEW FILE ---
.PHONY: compat
all-local: compat
compat:
"$(CSANT)" $(CSANT_FLAGS) -f compat.build all
CLEANFILES = Microsoft.VisualC.dll cscompmgd.dll
install-exec-local:
@$(NORMAL_INSTALL)
$(mkinstalldirs) $(DESTDIR)$(libdir)/cscc/lib
$(INSTALL_DATA) Microsoft.VisualC.dll
$(DESTDIR)$(libdir)/cscc/lib/Microsoft.VisualC.dll
$(INSTALL_DATA) cscompmgd.dll $(DESTDIR)$(libdir)/cscc/lib/cscompmgd.dll
uninstall-local:
@$(NORMALL_UNINSTALL)
rm -f $(DESTDIR)$(libdir)/cscc/lib/Microsoft.VisualC.dll
rm -f $(DESTDIR)$(libdir)/cscc/lib/cscompmgd.dll
--- NEW FILE ---
The assemblies in this directory exist to provide compatibility with
minor Microsoft assemblies within the .NET Framework SDK. We do not
recommend using these assemblies in portable code.
--- NEW FILE ---
/*
* VisualC.cs - Marker classes for Microsoft Visual C++ interoperability.
*
* Copyright (C) 2002 Southern Storm Software, Pty Ltd.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
// These classes exist to emulate behaviour that is expected by
// programs compiled with Microsoft Visual C++. We do not use them
// in the Portable.NET C compiler, as the ABI's are different.
// See "pnetlib/csupport" for the Portable.NET C ABI definitions.
//
// Note: just because we supply these classes doesn't mean that
// programs compiled with MSVC will actually run on the Portable.NET
// engine. MSVC inserts calls to native Windows .dll's in most
// programs that it compiles. Such code is not portable, which is
// why we defined an alternative ABI which is portable.
namespace Microsoft.VisualC
{
using System;
// Indicate that debug information is in a ".pdb" file, not metadata.
public sealed class DebugInfoInPDBAttribute : Attribute {}
// Indicate that a name is decorated.
public sealed class DecoratedNameAttribute : Attribute {}
// Modifier that is used to indicate C++ reference types.
public sealed class IsCXXReferenceModifier {}
// Modifier that is used to indicate constant types.
public sealed class IsConstModifier {}
// Modifier that is used to distinguish "int" and "long" on 32-bit systems.
public sealed class IsLongModifier {}
// Modifier that is used to distinguish "X" and "signed X".
public sealed class IsSignedModifier {}
// Modifier that is used to indicate volatile types.
public sealed class IsVolatileModifier {}
// Mark miscellaneous bit information.
public sealed class MiscellaneousBitsAttribute : Attribute
{
public int m_dwAttrs;
public MiscellaneousBitsAttribute(int dwAttrs) { m_dwAttrs = dwAttrs; }
}
// Modifier that is used to mark types that need copy construction.
public sealed class NeedsCopyConstructorModifier {}
// Modifier that is used to mark a "char" type with no explicit
// "signed" or "unsigned" qualification.
public sealed class NoSignSpecifiedModifier {}
} // namespace Microsoft.VisualC
--- NEW FILE ---
<?xml version="1.0"?>
<project name="compat" default="all">
<target name="all">
<!-- Build the Microsoft.VisualC.dll library -->
<compile output="Microsoft.VisualC.dll"
target="library"
unsafe="true"
nostdlib="true"
optimize="true"
debug="true">
<sources>
<file name="VisualC.cs"/>
</sources>
<references>
<file name="../runtime/mscorlib.dll"/>
</references>
<arg compiler="cscc" value="-Wno-empty-input"/>
<arg compiler="csc" value="/nowarn:626"/>
<arg compiler="csc" value="/nowarn:649"/>
<arg compiler="csc" value="/nowarn:168"/>
<arg compiler="csc" value="/nowarn:67"/>
<arg compiler="csc" value="/nowarn:169"/>
</compile>
<!-- Build the cscompmgd.dll library -->
<compile output="cscompmgd.dll"
target="library"
unsafe="true"
nostdlib="true"
optimize="true"
debug="true">
<sources>
<file name="CSharpCompiler.cs"/>
</sources>
<references>
<file name="../runtime/mscorlib.dll"/>
</references>
<arg compiler="cscc" value="-Wno-empty-input"/>
<arg compiler="csc" value="/nowarn:626"/>
<arg compiler="csc" value="/nowarn:649"/>
<arg compiler="csc" value="/nowarn:168"/>
<arg compiler="csc" value="/nowarn:67"/>
<arg compiler="csc" value="/nowarn:169"/>
</compile>
</target>
</project>
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Dotgnu-pnet-commits] CVS: pnetlib/compat .cvsignore,NONE,1.1 CSharpCompiler.cs,NONE,1.1 Makefile.am,NONE,1.1 README,NONE,1.1 VisualC.cs,NONE,1.1 compat.build,NONE,1.1,
Rhys Weatherley <address@hidden> <=
- Prev by Date:
[Dotgnu-pnet-commits] CVS: pnetlib ChangeLog,1.536,1.537 Makefile.am,1.12,1.13 configure.in,1.53,1.54
- Next by Date:
[Dotgnu-pnet-commits] CVS: pnetlib ChangeLog,1.537,1.538
- Previous by thread:
[Dotgnu-pnet-commits] CVS: pnetlib ChangeLog,1.536,1.537 Makefile.am,1.12,1.13 configure.in,1.53,1.54
- Next by thread:
[Dotgnu-pnet-commits] CVS: pnetlib ChangeLog,1.537,1.538
- Index(es):