X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=mcs%2Fclass%2Fcorlib%2FLinux%2FLinux.cs;h=5a51ec93a6b9d80d8230a7a4a711fd3d1334fd42;hb=e0a389372196b4082a414bf987e015683585c6b6;hp=4c978257086f99e0512a901cc194d8d0f0c01e4d;hpb=68cb0d715e8958a750427f37b5d90b7886922ee7;p=mono.git diff --git a/mcs/class/corlib/Linux/Linux.cs b/mcs/class/corlib/Linux/Linux.cs index 4c978257086..5a51ec93a6b 100644 --- a/mcs/class/corlib/Linux/Linux.cs +++ b/mcs/class/corlib/Linux/Linux.cs @@ -1,3 +1,26 @@ + +// +// Copyright (C) 2004 Novell, Inc (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. +// /*--------------------------------------------------------------------- XX X XXX @@ -371,47 +394,6 @@ namespace System.PAL } } - - // For StdInputStream - public int ReadStdInput(byte[] buffer, int offset, int count) - { - return ReadFile(StdinHandle, buffer, offset, count); - } - - // For StdOutputStream - public void FlushStdOutput(byte[] byteBuf) - { - FlushFile(StdoutHandle, byteBuf); - } - - [MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.InternalCall)] - public extern int ReadFile(IntPtr handle, byte[] buffer, int offset, int count); - - [MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.InternalCall)] - public extern int WriteFile(IntPtr handle, byte[] buffer, int offset, int count); - - [MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.InternalCall)] - public extern int SetLengthFile(IntPtr handle, long length); - - public void FlushFile(IntPtr handle, byte[] byteBuf) - { - WriteFile(handle, byteBuf, 0, byteBuf.Length); - } - - [MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.InternalCall)] - public extern IntPtr OpenFile(String path, FileMode mode, FileAccess access, FileShare share); - - [MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.InternalCall)] - public extern void CloseFile(IntPtr handle); - - [MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.InternalCall)] - public extern long SeekFile(IntPtr handle, long offset, SeekOrigin origin); - - public IntPtr CreateFile(string path, FileMode mode, FileAccess access, FileShare share) - { - return OpenFile(path, FileMode.CreateNew, access, share); - } - [MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.InternalCall)] public extern void DeleteFile(string path); @@ -423,10 +405,10 @@ namespace System.PAL * from DateTime(1/1/1601 00:00 GMT)) */ [MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.InternalCall)] - private extern bool GetFileTime(IntPtr handle, out long creat, out long lastaccess, out long lastwrite); + private extern static bool GetFileTime(IntPtr handle, out long creat, out long lastaccess, out long lastwrite); [MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.InternalCall)] - private extern bool SetFileTime(IntPtr handle, long creat, long lastaccess, long lastwrite); + private extern static bool SetFileTime(IntPtr handle, long creat, long lastaccess, long lastwrite); public DateTime GetCreationTimeFile(string path) { @@ -515,61 +497,11 @@ namespace System.PAL return 0; } - public long FileLength(IntPtr handle) - { - return 0; - } - // Private implementation details [DllImport("monowrapper", EntryPoint="mono_wrapper_environ", CharSet=CharSet.Ansi)] private unsafe static extern IntPtr _getEnviron(); [DllImport("libc", EntryPoint="getpid")] private unsafe static extern int _getPid(); - - [ DllImport("libm", EntryPoint="acos") ] - public extern static double Acos(double d); - - [ DllImport("libm", EntryPoint="asin") ] - public extern static double Asin(double d); - - [ DllImport("libm", EntryPoint="atan") ] - public extern static double Atan(double d); - - [ DllImport("libm", EntryPoint="atan2") ] - public extern static double Atan2(double y, double x); - - [ DllImport("libm", EntryPoint="cos") ] - public extern static double Cos(double d); - - [ DllImport("libm", EntryPoint="cosh") ] - public extern static double Cosh(double d); - - [ DllImport("libm", EntryPoint="exp") ] - public extern static double Exp(double d); - - [ DllImport("libm", EntryPoint="log") ] - public extern static double Log(double d); - - [ DllImport("libm", EntryPoint="log10") ] - public extern static double Log10(double d); - - [ DllImport("libm", EntryPoint="pow") ] - public extern static double Pow(double x, double y); - - [ DllImport("libm", EntryPoint="sin") ] - public extern static double Sin(double d); - - [ DllImport("libm", EntryPoint="sinh") ] - public extern static double Sinh(double d); - - [ DllImport("libm", EntryPoint="sqrt") ] - public extern static double Sqrt(double d); - - [ DllImport("libm", EntryPoint="tan") ] - public extern static double Tan(double d); - - [ DllImport("libm", EntryPoint="tanh") ] - public extern static double Tanh(double d); } }