Skip to content

Commit

Permalink
svn path=/branches/mono-1-1-9/mcs/; revision=51216
Browse files Browse the repository at this point in the history
  • Loading branch information
gonzalop committed Oct 4, 2005
2 parents 93a903a + bc0a0b0 commit 0649b90
Show file tree
Hide file tree
Showing 69 changed files with 22,398 additions and 0 deletions.
52 changes: 52 additions & 0 deletions mcs/class/Mono.Posix/Assembly/AssemblyInfo.cs
@@ -0,0 +1,52 @@
//
// AssemblyInfo.cs
//
// Author:
// Andreas Nahr (ClassDevelopment@A-SoftTech.com)
//
// (C) 2003 Ximian, Inc. http://www.ximian.com
// (C) 2004 Novell (http://www.novell.com)
//

//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//

using System;
using System.Reflection;
using System.Runtime.InteropServices;

[assembly: AssemblyVersion (Consts.FxVersion)]

[assembly: AssemblyTitle("Mono.Posix.dll")]
[assembly: AssemblyDescription("Unix Integration Classes")]

[assembly: CLSCompliant (true)]
[assembly: ComVisible (false)]

/* TODO COMPLETE INFORMATION
[assembly: AssemblyFileVersion ("0.0.0.1")]
*/

[assembly: AssemblyDelaySign (true)]
[assembly: AssemblyKeyFile ("../mono.pub")]

9 changes: 9 additions & 0 deletions mcs/class/Mono.Posix/Assembly/ChangeLog
@@ -0,0 +1,9 @@
2005-09-20 Sebastien Pouliot <sebastien@ximian.com>

* AssemblyInfo.cs: Mark [CLSCompliant(true)], [ComVisible(false)].

2004-04-30 Sebastien Pouliot <sebastien@ximian.com>

* AssemblyInfo.cs: Added
* ChangeLog: Added
* Locale.cs: Added
90 changes: 90 additions & 0 deletions mcs/class/Mono.Posix/ChangeLog
@@ -0,0 +1,90 @@
2005-08-24 Lluis Sanchez Gual <lluis@novell.com>

* Makefile: Removed System.Runtime.Remoting dependency.
* Mono.Posix.dll.sources: Added new files:
Mono.Remoting.Channels.Unix/UnixBinaryClientFormatterSink.cs
Mono.Remoting.Channels.Unix/UnixBinaryClientFormatterSinkProvider.cs
Mono.Remoting.Channels.Unix/UnixBinaryCore.cs
Mono.Remoting.Channels.Unix/UnixBinaryServerFormatterSink.cs
Mono.Remoting.Channels.Unix/UnixBinaryServerFormatterSinkProvider.

2005-07-30 Atsushi Enomoto <atsushi@ximian.com>

* Makefile : csc build fix.

2005-07-28 Lluis Sanchez Gual <lluis@novell.com>

* Mono.Posix.dll.sources: Add the Unix remoting channel to the build.
* Makefile: Add System.Runtime.Remoting dependency.

2005-02-28 Jonathan Pryor <jonpryor@vt.edu>

* Makefile (TEST_MCS_FLAGS): Ignore warnings 0219 (variable declared and
never used) and 0618 (member is obsolete): this is test code, which
produces lots of unused variables and tests [Obsolete] members.

2005-02-28 Jonathan Pryor <jonpryor@vt.edu>

* Mono.Posix_test.dll.sources: Added Test/Mono.Unix/StdioFileStreamTest.cs.

2005-01-13 Jonathan Pryor <jonpryor@vt.edu>

* Mono.Posix_test.dll.sources: Added Test/Mono.Unix/StdlibTest.cs.

2005-01-05 Jonathan Pryor <jonpryor@vt.edu>

* Mono.Posix.dll.sources: Add Mono.Unix/StdioFileStream.cs.

2005-01-05 Jonathan Pryor <jonpryor@vt.edu>

* Makfile: Add testsuite.
* Mono.Posix_test.dll.sources: Added; Files for testsuite.
* Test: Directory added.

2004-12-28 Jonathan Pryor <jonpryor@vt.edu>

* Mono.Posix.dll.sources: Add UnixDriveInfo and UnixPath.

2004-11-22 Raja R Harinath <rharinath@novell.com>

* Makefile (CLEAN_FILES): Clean up make-map.exe and the duplicated
Mono.Posix.dll.

2004-11-18 Jonathan Pryor <jonpryor@vt.edu>

* Mono.Posix.dll.sources: Add Mono.Unix/CdeclFunction.cs to the build.

2004-11-16 Jonathan Pryor <jonpryor@vt.edu>

+ Rename the Mono.Posix namespace to Mono.Unix.
+ Copy the Mono.Posix files from the mono-1-0 branch to Mono.Posix (to
preserve backward compatibility).
* Mono.Posix.dll.sources: Rename Mono.Posix to Mono.Unix, remove
IncludeAttribute and MapAttribute from Mono.Posix namespace (use the
ones in Mono.Unix instead).
* Makefile: Update file paths to build from Mono.Unix.

2004-11-05 Jonathan Pryor <jonpryor@vt.edu>

* Mono.Posix.dll.sources: Add lots of new files to the binding.

2004-06-03 Raja R Harinath <rharinath@novell.com>

* Makefile (Mono.Posix/make-map.exe): Depend on $(the_lib) to pick
the name of the library from library.make. This should make it
parallel-make-safe.

2004-04-26 Jackson Harper <jackson@ximian.com>

* Makefile: Dont use explicit lib references so the proper lib
directory is used. Output to profile directory.

2004-01-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>

* Makefile: handle win32 paths and copy Mono.Posix.dll to Mono.Posix
directory so that MS runtime finds it.

2003-02-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>

* Check in.

25 changes: 25 additions & 0 deletions mcs/class/Mono.Posix/Makefile
@@ -0,0 +1,25 @@
thisdir = class/Mono.Posix
SUBDIRS =
include ../../build/rules.make

LIBRARY = Mono.Posix.dll
# Don't warn about [Obsolete] members, as there are now *lots* of [Obsolete]
# members, generating volumes of output.
LIB_MCS_FLAGS = /unsafe /r:$(corlib) /r:System.dll /nowarn:0618
TEST_MCS_FLAGS = /r:Mono.Posix.dll /r:System.dll /nowarn:0219,0618

include ../../build/library.make

EXTRA_DISTFILES = Mono.Unix.Native/make-map.cs

all-local: Mono.Unix.Native/make-map.exe

Mono.Unix.Native/make-map.exe: Mono.Unix.Native/make-map.cs $(the_lib)
cp $(the_lib) Mono.Unix.Native/
ifneq ($(PLATFORM),win32)
$(CSCOMPILE) -debug+ -out:Mono.Unix.Native/make-map.exe -r:Mono.Posix.dll Mono.Unix.Native/make-map.cs
else
$(CSCOMPILE) -debug+ -out:Mono.Unix.Native/make-map.exe -r:Mono.Posix.dll Mono.Unix.Native\\make-map.cs
endif

CLEAN_FILES = Mono.Unix.Native/make-map.exe Mono.Unix.Native/Mono.Posix.dll
55 changes: 55 additions & 0 deletions mcs/class/Mono.Posix/Mono.Posix.dll.sources
@@ -0,0 +1,55 @@
./Assembly/AssemblyInfo.cs
../../build/common/Consts.cs
../../build/common/Locale.cs
./Mono.Unix/Catalog.cs
./Mono.Unix/CdeclFunction.cs
./Mono.Unix/IncludeAttribute.cs
./Mono.Unix/MapAttribute.cs
./Mono.Unix/PeerCred.cs
./Mono.Unix/StdioFileStream.cs
./Mono.Unix/Stdlib.cs
./Mono.Unix/Syscall.cs
./Mono.Unix/UnixClient.cs
./Mono.Unix/UnixConvert.cs
./Mono.Unix/UnixDirectory.cs
./Mono.Unix/UnixDirectoryInfo.cs
./Mono.Unix/UnixDriveInfo.cs
./Mono.Unix/UnixEnvironment.cs
./Mono.Unix/UnixEndPoint.cs
./Mono.Unix/UnixFile.cs
./Mono.Unix/UnixFileInfo.cs
./Mono.Unix/UnixFileSystemInfo.cs
./Mono.Unix/UnixGroup.cs
./Mono.Unix/UnixGroupInfo.cs
./Mono.Unix/UnixIOException.cs
./Mono.Unix/UnixListener.cs
./Mono.Unix/UnixMarshal.cs
./Mono.Unix/UnixPath.cs
./Mono.Unix/UnixProcess.cs
./Mono.Unix/UnixStream.cs
./Mono.Unix/UnixSymbolicLinkInfo.cs
./Mono.Unix/UnixUser.cs
./Mono.Unix/UnixUserInfo.cs
./Mono.Unix.Native/CdeclFunction.cs
./Mono.Unix.Native/HeaderAttribute.cs
./Mono.Unix.Native/NativeConvert.cs
./Mono.Unix.Native/NativeConvert.generated.cs
./Mono.Unix.Native/Stdlib.cs
./Mono.Unix.Native/Syscall.cs
./Mono.Posix/Catalog.cs
./Mono.Posix/PeerCred.cs
./Mono.Posix/Syscall.cs
./Mono.Posix/UnixEndPoint.cs
./Mono.Remoting.Channels.Unix/UnixBinaryClientFormatterSink.cs
./Mono.Remoting.Channels.Unix/UnixBinaryClientFormatterSinkProvider.cs
./Mono.Remoting.Channels.Unix/UnixBinaryCore.cs
./Mono.Remoting.Channels.Unix/UnixBinaryServerFormatterSink.cs
./Mono.Remoting.Channels.Unix/UnixBinaryServerFormatterSinkProvider.cs
./Mono.Remoting.Channels.Unix/UnixChannel.cs
./Mono.Remoting.Channels.Unix/UnixClientChannel.cs
./Mono.Remoting.Channels.Unix/UnixClientTransportSink.cs
./Mono.Remoting.Channels.Unix/UnixClientTransportSinkProvider.cs
./Mono.Remoting.Channels.Unix/UnixMessageIO.cs
./Mono.Remoting.Channels.Unix/UnixServerChannel.cs
./Mono.Remoting.Channels.Unix/UnixServerTransportSink.cs
./Mono.Remoting.Channels.Unix/UnixConnectionPool.cs
86 changes: 86 additions & 0 deletions mcs/class/Mono.Posix/Mono.Posix/Catalog.cs
@@ -0,0 +1,86 @@
//
// Mono.Posix.Catalog.cs: Wrappers for the libintl library.
//
// Author:
// Edd Dumbill (edd@usefulinc.com)
//
// (C) 2004 Edd Dumbill
//
// This file implements the low-level syscall interface to the POSIX
// subsystem.
//
// This file tries to stay close to the low-level API as much as possible
// using enumerations, structures and in a few cases, using existing .NET
// data types.
//
// Implementation notes:
//
// Since the values for the various constants on the API changes
// from system to system (even Linux on different architectures will
// have different values), we define our own set of values, and we
// use a set of C helper routines to map from the constants we define
// to the values of the native OS.
//
// Bitfields are flagged with the [Map] attribute, and a helper program
// generates a set of map_XXXX routines that we can call to convert
// from our value definitions to the value definitions expected by the
// OS.
//
// Methods that require tuning are bound as `internal syscal_NAME' methods
// and then a `NAME' method is exposed.
//

using System;
using System.Runtime.InteropServices;

namespace Mono.Posix {

[Obsolete ("Use Mono.Unix.Catalog")]
public class Catalog {
[DllImport("libintl")]
static extern IntPtr bindtextdomain (IntPtr domainname, IntPtr dirname);
[DllImport("libintl")]
static extern IntPtr bind_textdomain_codeset (IntPtr domainname,
IntPtr codeset);
[DllImport("libintl")]
static extern IntPtr textdomain (IntPtr domainname);

public static void Init (String package, String localedir)
{
IntPtr ipackage = Marshal.StringToHGlobalAuto (package);
IntPtr ilocaledir = Marshal.StringToHGlobalAuto (localedir);
IntPtr iutf8 = Marshal.StringToHGlobalAuto ("UTF-8");
bindtextdomain (ipackage, ilocaledir);
bind_textdomain_codeset (ipackage, iutf8);
textdomain (ipackage);
Marshal.FreeHGlobal (ipackage);
Marshal.FreeHGlobal (ilocaledir);
Marshal.FreeHGlobal (iutf8);
}

[DllImport("libintl")]
static extern IntPtr gettext (IntPtr instring);

public static String GetString (String s)
{
IntPtr ints = Marshal.StringToHGlobalAuto (s);
String t = Marshal.PtrToStringAuto (gettext (ints));
Marshal.FreeHGlobal (ints);
return t;
}

[DllImport("libintl")]
static extern IntPtr ngettext (IntPtr singular, IntPtr plural, Int32 n);

public static String GetPluralString (String s, String p, Int32 n)
{
IntPtr ints = Marshal.StringToHGlobalAuto (s);
IntPtr intp = Marshal.StringToHGlobalAuto (p);
String t = Marshal.PtrToStringAnsi (ngettext (ints, intp, n));
Marshal.FreeHGlobal (ints);
Marshal.FreeHGlobal (intp);
return t;
}

}
}

0 comments on commit 0649b90

Please sign in to comment.