Merge pull request #484 from roji/transactions_pspe
[mono.git] / mcs / class / Mono.Posix / Documentation / en / Mono.Unix.Native / Stdlib.xml
1 <Type Name="Stdlib" FullName="Mono.Unix.Native.Stdlib">
2   <TypeSignature Language="C#" Value="public class Stdlib" />
3   <TypeSignature Language="ILAsm" Value=".class public auto ansi beforefieldinit Stdlib extends System.Object" />
4   <AssemblyInfo>
5     <AssemblyName>Mono.Posix</AssemblyName>
6     <AssemblyVersion>1.0.5000.0</AssemblyVersion>
7     <AssemblyVersion>2.0.0.0</AssemblyVersion>
8     <AssemblyVersion>4.0.0.0</AssemblyVersion>
9   </AssemblyInfo>
10   <ThreadingSafetyStatement>All public static members of this type are
11   probably safe for multithreaded operations within managed code.  (Methods
12   which are obviously unsafe are synchronized, such as 
13   <see cref="M:Mono.Unix.Native.Stdlib.strerror" />, but any hidden dependencies 
14   between e.g.
15   <see cref="M:Mono.Unix.Native.Stdlib.strerror" /> and 
16   <see cref="M:Mono.Unix.Native.Stdlib.fopen" /> are not protected.)
17   No multithreading guarantee is made between managed and unmanaged code.  
18   Check your operating system documentation for more information.
19   </ThreadingSafetyStatement>
20   <Base>
21     <BaseTypeName>System.Object</BaseTypeName>
22   </Base>
23   <Interfaces />
24   <Docs>
25     <summary>C Standard Library functions.</summary>
26     <remarks>The Stdlib class exports only functions that are part of the standard C library, from the ISO-9899 standard (C99).  As such, exports should be portable to any operating system supporting the standard C library, such as Microsoft Windows, as opposed to <see cref="T:Mono.Unix.Native.Syscall" /> which only supports Unix-like operating systems.</remarks>
27   </Docs>
28   <Members>
29     <Member MemberName="_Exit">
30       <MemberSignature Language="C#" Value="public static void _Exit (int status);" />
31       <MemberSignature Language="ILAsm" Value=".method public static hidebysig pinvokeimpl (&quot;msvcrt&quot; as &quot;_Exit&quot; cdecl)void _Exit(int32 status) cil managed" />
32       <MemberType>Method</MemberType>
33       <AssemblyInfo>
34         <AssemblyVersion>1.0.5000.0</AssemblyVersion>
35         <AssemblyVersion>2.0.0.0</AssemblyVersion>
36         <AssemblyVersion>4.0.0.0</AssemblyVersion>
37       </AssemblyInfo>
38       <Attributes>
39         <Attribute>
40           <AttributeName>System.CLSCompliant(false)</AttributeName>
41         </Attribute>
42       </Attributes>
43       <ReturnValue>
44         <ReturnType>System.Void</ReturnType>
45       </ReturnValue>
46       <Parameters>
47         <Parameter Name="status" Type="System.Int32" />
48       </Parameters>
49       <Docs>
50         <param name="status">The low-order eight bits of <paramref name="status" /> are generally made available to a parent process.</param>
51         <summary>Perform normal program termination.</summary>
52         <remarks>
53           <para>
54 The <c>_Exit</c>(3) function terminates without calling the functions registered with the <see cref="M:Mono.Unix.Native.Stdlib.atexit" />(3) function, and may or may not perform the other actions listed in <see cref="M:Mono.Unix.Native.Stdlib.exit" />(3).
55 </para>
56           <para>
57 The C Standard (ISO/IEC 9899:1999 ("ISO C99")) defines the values 0, <see cref="F:Mono.Unix.Native.Stdlib.EXIT_SUCCESS" />, and <see cref="F:Mono.Unix.Native.Stdlib.EXIT_FAILURE" /> as possible values of <paramref name="status" />.  Cooperating processes may use other values; in a program which might be called by a mail transfer agent, the values described in <c>sysexits</c>(3) may be used to provide more information to the parent process.
58 </para>
59           <para>
60 This function never returns.
61 </para>
62         </remarks>
63       </Docs>
64     </Member>
65     <Member MemberName="_IOFBF">
66       <MemberSignature Language="C#" Value="public static readonly int _IOFBF;" />
67       <MemberSignature Language="ILAsm" Value=".field public static initonly int32 _IOFBF" />
68       <MemberType>Field</MemberType>
69       <AssemblyInfo>
70         <AssemblyVersion>1.0.5000.0</AssemblyVersion>
71         <AssemblyVersion>2.0.0.0</AssemblyVersion>
72         <AssemblyVersion>4.0.0.0</AssemblyVersion>
73       </AssemblyInfo>
74       <Attributes>
75         <Attribute>
76           <AttributeName>System.CLSCompliant(false)</AttributeName>
77         </Attribute>
78       </Attributes>
79       <ReturnValue>
80         <ReturnType>System.Int32</ReturnType>
81       </ReturnValue>
82       <MemberValue>0</MemberValue>
83       <Docs>
84         <summary>Fully Buffered.</summary>
85         <remarks>To be added.</remarks>
86       </Docs>
87     </Member>
88     <Member MemberName="_IOLBF">
89       <MemberSignature Language="C#" Value="public static readonly int _IOLBF;" />
90       <MemberSignature Language="ILAsm" Value=".field public static initonly int32 _IOLBF" />
91       <MemberType>Field</MemberType>
92       <AssemblyInfo>
93         <AssemblyVersion>1.0.5000.0</AssemblyVersion>
94         <AssemblyVersion>2.0.0.0</AssemblyVersion>
95         <AssemblyVersion>4.0.0.0</AssemblyVersion>
96       </AssemblyInfo>
97       <Attributes>
98         <Attribute>
99           <AttributeName>System.CLSCompliant(false)</AttributeName>
100         </Attribute>
101       </Attributes>
102       <ReturnValue>
103         <ReturnType>System.Int32</ReturnType>
104       </ReturnValue>
105       <MemberValue>1</MemberValue>
106       <Docs>
107         <summary>Line buffered.</summary>
108         <remarks>To be added.</remarks>
109       </Docs>
110     </Member>
111     <Member MemberName="_IONBF">
112       <MemberSignature Language="C#" Value="public static readonly int _IONBF;" />
113       <MemberSignature Language="ILAsm" Value=".field public static initonly int32 _IONBF" />
114       <MemberType>Field</MemberType>
115       <AssemblyInfo>
116         <AssemblyVersion>1.0.5000.0</AssemblyVersion>
117         <AssemblyVersion>2.0.0.0</AssemblyVersion>
118         <AssemblyVersion>4.0.0.0</AssemblyVersion>
119       </AssemblyInfo>
120       <Attributes>
121         <Attribute>
122           <AttributeName>System.CLSCompliant(false)</AttributeName>
123         </Attribute>
124       </Attributes>
125       <ReturnValue>
126         <ReturnType>System.Int32</ReturnType>
127       </ReturnValue>
128       <MemberValue>2</MemberValue>
129       <Docs>
130         <summary>Specify unbuffered <c>FILE</c> streams.</summary>
131         <remarks>To be added.</remarks>
132       </Docs>
133     </Member>
134     <Member MemberName="abort">
135       <MemberSignature Language="C#" Value="public static void abort ();" />
136       <MemberSignature Language="ILAsm" Value=".method public static hidebysig pinvokeimpl (&quot;msvcrt&quot; as &quot;abort&quot; cdecl)void abort() cil managed" />
137       <MemberType>Method</MemberType>
138       <AssemblyInfo>
139         <AssemblyVersion>1.0.5000.0</AssemblyVersion>
140         <AssemblyVersion>2.0.0.0</AssemblyVersion>
141         <AssemblyVersion>4.0.0.0</AssemblyVersion>
142       </AssemblyInfo>
143       <ReturnValue>
144         <ReturnType>System.Void</ReturnType>
145       </ReturnValue>
146       <Parameters />
147       <Docs>
148         <summary>Cause abnormal program termination.</summary>
149         <remarks>
150           <para>The <c>abort</c>() function causes abnormal program termination to occur, unless the signal
151 <see cref="F:Mono.Unix.Native.Signum.SIGABRT" /> is being caught and the signal handler does not return.
152 </para>
153           <para>
154 Any open streams are flushed and closed.
155 </para>
156           <para>The <c>abort</c>() function never returns.</para>
157         </remarks>
158       </Docs>
159     </Member>
160     <Member MemberName="BUFSIZ">
161       <MemberSignature Language="C#" Value="public static readonly int BUFSIZ;" />
162       <MemberSignature Language="ILAsm" Value=".field public static initonly int32 BUFSIZ" />
163       <MemberType>Field</MemberType>
164       <AssemblyInfo>
165         <AssemblyVersion>1.0.5000.0</AssemblyVersion>
166         <AssemblyVersion>2.0.0.0</AssemblyVersion>
167         <AssemblyVersion>4.0.0.0</AssemblyVersion>
168       </AssemblyInfo>
169       <Attributes>
170         <Attribute>
171           <AttributeName>System.CLSCompliant(false)</AttributeName>
172         </Attribute>
173       </Attributes>
174       <ReturnValue>
175         <ReturnType>System.Int32</ReturnType>
176       </ReturnValue>
177       <MemberValue>8192</MemberValue>
178       <Docs>
179         <summary>Buffer size.</summary>
180         <remarks>To be added.</remarks>
181       </Docs>
182     </Member>
183     <Member MemberName="calloc">
184       <MemberSignature Language="C#" Value="public static IntPtr calloc (ulong nmemb, ulong size);" />
185       <MemberSignature Language="ILAsm" Value=".method public static hidebysig pinvokeimpl (&quot;MonoPosixHelper&quot; as &quot;Mono_Posix_Stdlib_calloc&quot; cdecl lasterr)native int calloc(unsigned int64 nmemb, unsigned int64 size) cil managed" />
186       <MemberType>Method</MemberType>
187       <AssemblyInfo>
188         <AssemblyVersion>1.0.5000.0</AssemblyVersion>
189         <AssemblyVersion>2.0.0.0</AssemblyVersion>
190         <AssemblyVersion>4.0.0.0</AssemblyVersion>
191       </AssemblyInfo>
192       <Attributes>
193         <Attribute>
194           <AttributeName>System.CLSCompliant(false)</AttributeName>
195         </Attribute>
196       </Attributes>
197       <ReturnValue>
198         <ReturnType>System.IntPtr</ReturnType>
199       </ReturnValue>
200       <Parameters>
201         <Parameter Name="nmemb" Type="System.UInt64" />
202         <Parameter Name="size" Type="System.UInt64" />
203       </Parameters>
204       <Docs>
205         <param name="nmemb">Number of objects to allocate.</param>
206         <param name="size">Size of each object to allocate.</param>
207         <summary>Allocate and zero-fill memory.</summary>
208         <returns>The <c>calloc</c> function returns a pointer to the allocated memory if successful; otherwise <see cref="F:System.IntPtr.Zero" /> is returned and <see cref="M:Mono.Unix.Native.Stdlib.GetLastError" /> returns <see cref="F:Mono.Unix.Native.Errno.ENOMEM" />.</returns>
209         <remarks>
210           <para>
211 The <c>calloc</c>() function allocates space for <paramref name="nmemb" /> objects, each <paramref name="size" /> bytes in length. The result is identical to calling <see cref="M:Mono.Unix.Native.Stdlib.malloc" />(3) with an argument of "<c>nmemb * size</c>," with the exception that the allocated memory is explicitly initialized to zero bytes.
212 </para>
213           <para>
214 The return value of <c>calloc</c> must be passed to <see cref="M:Mono.Unix.Native.Stdlib.free" /> to avoid a memory leak.
215 </para>
216         </remarks>
217       </Docs>
218     </Member>
219     <Member MemberName="clearerr">
220       <MemberSignature Language="C#" Value="public static int clearerr (IntPtr stream);" />
221       <MemberSignature Language="ILAsm" Value=".method public static hidebysig pinvokeimpl (&quot;MonoPosixHelper&quot; as &quot;Mono_Posix_Stdlib_clearerr&quot; cdecl lasterr)int32 clearerr(native int stream) cil managed" />
222       <MemberType>Method</MemberType>
223       <AssemblyInfo>
224         <AssemblyVersion>1.0.5000.0</AssemblyVersion>
225         <AssemblyVersion>2.0.0.0</AssemblyVersion>
226         <AssemblyVersion>4.0.0.0</AssemblyVersion>
227       </AssemblyInfo>
228       <ReturnValue>
229         <ReturnType>System.Int32</ReturnType>
230       </ReturnValue>
231       <Parameters>
232         <Parameter Name="stream" Type="System.IntPtr" />
233       </Parameters>
234       <Docs>
235         <param name="stream">The <c>FILE</c> stream to clear end-of-file and error indicators on.</param>
236         <summary>Clear <c>FILE</c> stream status.</summary>
237         <returns>The <c>clearerr</c>() function returns the value 0 if successful; otherwise the value -1 is returned and <see cref="M:Mono.Unix.Native.Stdlib.GetLastError" /> indicates the error.</returns>
238         <remarks>Clears the end-of-file and error indicators for the stream pointed to by <paramref name="stream" />.</remarks>
239       </Docs>
240     </Member>
241     <Member MemberName="EOF">
242       <MemberSignature Language="C#" Value="public static readonly int EOF;" />
243       <MemberSignature Language="ILAsm" Value=".field public static initonly int32 EOF" />
244       <MemberType>Field</MemberType>
245       <AssemblyInfo>
246         <AssemblyVersion>1.0.5000.0</AssemblyVersion>
247         <AssemblyVersion>2.0.0.0</AssemblyVersion>
248         <AssemblyVersion>4.0.0.0</AssemblyVersion>
249       </AssemblyInfo>
250       <Attributes>
251         <Attribute>
252           <AttributeName>System.CLSCompliant(false)</AttributeName>
253         </Attribute>
254       </Attributes>
255       <ReturnValue>
256         <ReturnType>System.Int32</ReturnType>
257       </ReturnValue>
258       <MemberValue>-1</MemberValue>
259       <Docs>
260         <summary>End Of File.</summary>
261         <remarks>To be added.</remarks>
262       </Docs>
263     </Member>
264     <Member MemberName="exit">
265       <MemberSignature Language="C#" Value="public static void exit (int status);" />
266       <MemberSignature Language="ILAsm" Value=".method public static hidebysig pinvokeimpl (&quot;msvcrt&quot; as &quot;exit&quot; cdecl)void exit(int32 status) cil managed" />
267       <MemberType>Method</MemberType>
268       <AssemblyInfo>
269         <AssemblyVersion>1.0.5000.0</AssemblyVersion>
270         <AssemblyVersion>2.0.0.0</AssemblyVersion>
271         <AssemblyVersion>4.0.0.0</AssemblyVersion>
272       </AssemblyInfo>
273       <ReturnValue>
274         <ReturnType>System.Void</ReturnType>
275       </ReturnValue>
276       <Parameters>
277         <Parameter Name="status" Type="System.Int32" />
278       </Parameters>
279       <Docs>
280         <param name="status">The low-order eight bits of <paramref name="status" /> are generally made available to a parent process.</param>
281         <summary>Terminates the process that calls the function with the exit status <paramref name="status" />.</summary>
282         <remarks>
283           <para>The <c>exit</c> function terminates a process.</para>
284           <para>Before termination, <c>exit</c>() performs the following functions in the order listed:</para>
285           <list type="number">
286             <item>
287               <term>Call the functions registered with the <see cref="M:Mono.Unix.Native.Stdlib.atexit" />(3) function, in the reverse order of their registration.</term>
288             </item>
289             <item>
290               <term>Flush all open output streams</term>
291             </item>
292             <item>
293               <term>Close all open streams</term>
294             </item>
295             <item>
296               <term>Unlink all files created with the <see cref="M:Mono.Unix.Native.Stdlib.tmpfile" />(3) function.</term>
297             </item>
298           </list>
299           <para>The low-order eight bits of the <paramref name="status" /> argument is made available to a parent process which has called a <see cref="M:Mono.Unix.Native.Syscall.wait" />(2)-family function.
300 </para>
301           <para>
302 The C Standard (ISO/IEC 9899:1999 ("ISO C99")) defines the values 0, <see cref="F:Mono.Unix.Native.Stdlib.EXIT_SUCCESS" />, and <see cref="F:Mono.Unix.Native.Stdlib.EXIT_FAILURE" /> as possible values of <paramref name="status" />.  Cooperating processes may use other values; in a program which might be called by a mail transfer agent, the values described in <c>sysexits</c>(3) may be used to provide more information to the parent process.
303 </para>
304           <para>Note that <c>exit</c>() does nothing to prevent bottomless recursion should a function registered using <see cref="M:Mono.Unix.Native.Stdlib.atexit" />(3) itself call <c>exit</c>().  Such functions must call <see cref="M:Mono.Unix.Native.Stdlib._Exit" />() instead
305      (although this has other effects as well which may not be desired).
306 </para>
307           <para>
308 This function never returns.
309 </para>
310           <example>
311             <code lang="C#">
312 using System;
313 using Mono.Unix.Native;
314 using System.Runtime.InteropServices;
315
316 class Test
317 {
318         public void SignalCatcher(int v)
319         {
320                 // sleep signal caught.
321                 Console.WriteLine("Signal received: " + v);
322                 // this line will not be printed because process exits...
323                 Console.WriteLine("Exiting with: " + Stdlib.exit(9));
324         }               
325         
326         public static void Main(string[] args)
327         {
328                 Test t = new Test();
329                 Console.Write("waiting for event...");
330                 string x = Console.ReadLine();
331         }
332         
333         public Test()
334         {
335                 // create a signal handler delegate for sleep signals
336                 Console.WriteLine("signal result: " + 
337                         Syscall.signal(Signum.SIGALRM, 
338                                 new SignalHandler (SignalCatcher)));
339                 // send a sleep signal
340                 Syscall.alarm(3);
341         }
342 }</code>
343           </example>
344         </remarks>
345       </Docs>
346     </Member>
347     <Member MemberName="EXIT_FAILURE">
348       <MemberSignature Language="C#" Value="public static readonly int EXIT_FAILURE;" />
349       <MemberSignature Language="ILAsm" Value=".field public static initonly int32 EXIT_FAILURE" />
350       <MemberType>Field</MemberType>
351       <AssemblyInfo>
352         <AssemblyVersion>1.0.5000.0</AssemblyVersion>
353         <AssemblyVersion>2.0.0.0</AssemblyVersion>
354         <AssemblyVersion>4.0.0.0</AssemblyVersion>
355       </AssemblyInfo>
356       <Attributes>
357         <Attribute>
358           <AttributeName>System.CLSCompliant(false)</AttributeName>
359         </Attribute>
360       </Attributes>
361       <ReturnValue>
362         <ReturnType>System.Int32</ReturnType>
363       </ReturnValue>
364       <MemberValue>1</MemberValue>
365       <Docs>
366         <summary>Failure program exit status.</summary>
367         <remarks>This is the value to return from <c>Main</c> when an error occurs.</remarks>
368       </Docs>
369     </Member>
370     <Member MemberName="EXIT_SUCCESS">
371       <MemberSignature Language="C#" Value="public static readonly int EXIT_SUCCESS;" />
372       <MemberSignature Language="ILAsm" Value=".field public static initonly int32 EXIT_SUCCESS" />
373       <MemberType>Field</MemberType>
374       <AssemblyInfo>
375         <AssemblyVersion>1.0.5000.0</AssemblyVersion>
376         <AssemblyVersion>2.0.0.0</AssemblyVersion>
377         <AssemblyVersion>4.0.0.0</AssemblyVersion>
378       </AssemblyInfo>
379       <Attributes>
380         <Attribute>
381           <AttributeName>System.CLSCompliant(false)</AttributeName>
382         </Attribute>
383       </Attributes>
384       <ReturnValue>
385         <ReturnType>System.Int32</ReturnType>
386       </ReturnValue>
387       <MemberValue>0</MemberValue>
388       <Docs>
389         <summary>Success program exit status.</summary>
390         <remarks>This is the value to return from <c>Main</c> when no errors occur.</remarks>
391       </Docs>
392     </Member>
393     <Member MemberName="fclose">
394       <MemberSignature Language="C#" Value="public static int fclose (IntPtr stream);" />
395       <MemberSignature Language="ILAsm" Value=".method public static hidebysig pinvokeimpl (&quot;msvcrt&quot; as &quot;fclose&quot; cdecl lasterr)int32 fclose(native int stream) cil managed" />
396       <MemberType>Method</MemberType>
397       <AssemblyInfo>
398         <AssemblyVersion>1.0.5000.0</AssemblyVersion>
399         <AssemblyVersion>2.0.0.0</AssemblyVersion>
400         <AssemblyVersion>4.0.0.0</AssemblyVersion>
401       </AssemblyInfo>
402       <ReturnValue>
403         <ReturnType>System.Int32</ReturnType>
404       </ReturnValue>
405       <Parameters>
406         <Parameter Name="stream" Type="System.IntPtr" />
407       </Parameters>
408       <Docs>
409         <param name="stream">The <c>FILE</c> stream to close.</param>
410         <summary>Close a <c>FILE</c> stream.</summary>
411         <returns>
412           <para>Upon successful completion 0 is returned.  Otherwise, <see cref="F:Mono.Unix.Native.Stdlib.EOF" /> is returned and the global variable <c>errno</c> is set to indicate the error.  In either case no further access to the stream is possible.</para>
413           <para> The <c>fclose</c>() function may also fail and set <c>errno</c> for any of the errors specified for the routines <see cref="M:Mono.Unix.Native.Syscall.close" />(2) or <see cref="M:Mono.Unix.Native.Stdlib.fflush" />(3).
414 </para>
415         </returns>
416         <remarks>
417           <para> The <c>fclose</c>() function dissociates the named stream from its underlying file or set of functions.  If the stream was being used for output, any buffered data is written first, using <see cref="M:Mono.Unix.Native.Stdlib.fflush" />(3).
418 </para>
419         </remarks>
420       </Docs>
421     </Member>
422     <Member MemberName="feof">
423       <MemberSignature Language="C#" Value="public static int feof (IntPtr stream);" />
424       <MemberSignature Language="ILAsm" Value=".method public static hidebysig pinvokeimpl (&quot;msvcrt&quot; as &quot;feof&quot; cdecl)int32 feof(native int stream) cil managed" />
425       <MemberType>Method</MemberType>
426       <AssemblyInfo>
427         <AssemblyVersion>1.0.5000.0</AssemblyVersion>
428         <AssemblyVersion>2.0.0.0</AssemblyVersion>
429         <AssemblyVersion>4.0.0.0</AssemblyVersion>
430       </AssemblyInfo>
431       <ReturnValue>
432         <ReturnType>System.Int32</ReturnType>
433       </ReturnValue>
434       <Parameters>
435         <Parameter Name="stream" Type="System.IntPtr" />
436       </Parameters>
437       <Docs>
438         <param name="stream">The <c>FILE</c> stream on which to test the end-of-file indicator.</param>
439         <summary>Test end-of-file indicator for the <c>FILE</c> stream.</summary>
440         <returns>Returns non-zero if the end-of-stream indicator for <paramref name="stream" /> is set.  Otherwise, 0 is returned.</returns>
441         <remarks>The function <c>feof</c>() tests the end-of-file indicator for the stream pointed to by stream, returning non-zero if it is set.  The end-of-file indicator can only be cleared by the function <see cref="M:Mono.Unix.Native.Stdlib.clearerr" />().</remarks>
442       </Docs>
443     </Member>
444     <Member MemberName="ferror">
445       <MemberSignature Language="C#" Value="public static int ferror (IntPtr stream);" />
446       <MemberSignature Language="ILAsm" Value=".method public static hidebysig pinvokeimpl (&quot;msvcrt&quot; as &quot;ferror&quot; cdecl)int32 ferror(native int stream) cil managed" />
447       <MemberType>Method</MemberType>
448       <AssemblyInfo>
449         <AssemblyVersion>1.0.5000.0</AssemblyVersion>
450         <AssemblyVersion>2.0.0.0</AssemblyVersion>
451         <AssemblyVersion>4.0.0.0</AssemblyVersion>
452       </AssemblyInfo>
453       <ReturnValue>
454         <ReturnType>System.Int32</ReturnType>
455       </ReturnValue>
456       <Parameters>
457         <Parameter Name="stream" Type="System.IntPtr" />
458       </Parameters>
459       <Docs>
460         <param name="stream">The <c>FILE</c> stream on which to test the error indicator.</param>
461         <summary>Tests the error indicator for the <c>FILE</c> stream.</summary>
462         <returns>Returns non-zero if the error indicator is set on <paramref name="stream" />.  Otherwise, 0 is returned.</returns>
463         <remarks>The function <c>ferror</c>() tests the error indicator for the stream pointed to by stream, returning non-zero if it is set.  The error indicator can only be reset by the <see cref="M:Mono.Unix.Native.Stdlib.clearerr" />() function.</remarks>
464       </Docs>
465     </Member>
466     <Member MemberName="fflush">
467       <MemberSignature Language="C#" Value="public static int fflush (IntPtr stream);" />
468       <MemberSignature Language="ILAsm" Value=".method public static hidebysig pinvokeimpl (&quot;msvcrt&quot; as &quot;fflush&quot; cdecl lasterr)int32 fflush(native int stream) cil managed" />
469       <MemberType>Method</MemberType>
470       <AssemblyInfo>
471         <AssemblyVersion>1.0.5000.0</AssemblyVersion>
472         <AssemblyVersion>2.0.0.0</AssemblyVersion>
473         <AssemblyVersion>4.0.0.0</AssemblyVersion>
474       </AssemblyInfo>
475       <ReturnValue>
476         <ReturnType>System.Int32</ReturnType>
477       </ReturnValue>
478       <Parameters>
479         <Parameter Name="stream" Type="System.IntPtr" />
480       </Parameters>
481       <Docs>
482         <param name="stream">The <c>FILE</c> stream to flush.</param>
483         <summary>Flush a <c>FILE</c> stream.</summary>
484         <returns>Upon successful completion 0 is returned.  Otherwise, <see cref="F:Mono.Unix.Native.Stdlib.EOF" /> is returned and the global variable <c>errno</c> is set to indicate the error.
485
486 <block subset="none" type="usage"><para>The following errors are specified:</para><list type="table"><listheader><term>Error</term><description>Details</description></listheader><item><term><see cref="F:Mono.Unix.Native.Errno.EBADF" /></term><description>The <paramref name="stream" /> argument is not an open stream, or not a stream open for writing.</description></item></list><para>The function <c>fflush</c> may also fail and set <c>errno</c> for any of the errors specified for <see cref="M:Mono.Unix.Native.Syscall.write" />(2).</para></block></returns>
487         <remarks>
488           <para> The function <c>fflush</c>() forces a write of all buffered data for the given output or update <paramref name="stream" /> via the stream's underlying write function.  The open status of the stream is unaffected.</para>
489           <para>If the stream argument is <see cref="F:System.IntPtr.Zero" />, <c>fflush</c>() flushes all open output streams.</para>
490         </remarks>
491       </Docs>
492     </Member>
493     <Member MemberName="fgetc">
494       <MemberSignature Language="C#" Value="public static int fgetc (IntPtr stream);" />
495       <MemberSignature Language="ILAsm" Value=".method public static hidebysig pinvokeimpl (&quot;msvcrt&quot; as &quot;fgetc&quot; cdecl lasterr)int32 fgetc(native int stream) cil managed" />
496       <MemberType>Method</MemberType>
497       <AssemblyInfo>
498         <AssemblyVersion>1.0.5000.0</AssemblyVersion>
499         <AssemblyVersion>2.0.0.0</AssemblyVersion>
500         <AssemblyVersion>4.0.0.0</AssemblyVersion>
501       </AssemblyInfo>
502       <ReturnValue>
503         <ReturnType>System.Int32</ReturnType>
504       </ReturnValue>
505       <Parameters>
506         <Parameter Name="stream" Type="System.IntPtr" />
507       </Parameters>
508       <Docs>
509         <param name="stream">
510           <c>FILE</c> stream to read a character from.</param>
511         <summary>Get next character from a <c>FILE</c> input stream.</summary>
512         <returns> If successful, returns the next requested object from the stream.  Character values are returned as an unsigned char converted to an int.  If the stream is at end-of-file or a read error occurs, the routines return <see cref="M:Mono.Unix.Native.Stdlib.EOF" />.  The routines <see cref="M:Mono.Unix.Native.Stdlib.feof" />(3) and <see cref="M:Mono.Unix.Native.Stdlib.ferror" />(3) must be used to distinguish between end-of-file and error.  If an error occurs, use <see cref="M:Mono.Unix.Native.Stdlib.GetLastError" /> indicates the error.  The end-of-file condition is remembered, even on a terminal, and all subsequent attempts to read will return <see cref="M:Mono.Unix.Native.Stdlib.EOF" /> until the condition is cleared with <see cref="M:Mono.Unix.Native.Stdlib.clearerr" />(3).</returns>
513         <remarks>The <c>fgetc</c>() function obtains the next input character (if present) from the stream pointed at by stream, or the next character pushed back on the stream via <see cref="M:Mono.Unix.Native.Stdlib.ungetc" />(3).</remarks>
514       </Docs>
515     </Member>
516     <Member MemberName="fgetpos">
517       <MemberSignature Language="C#" Value="public static int fgetpos (IntPtr stream, Mono.Unix.Native.FilePosition pos);" />
518       <MemberSignature Language="ILAsm" Value=".method public static hidebysig int32 fgetpos(native int stream, class Mono.Unix.Native.FilePosition pos) cil managed" />
519       <MemberType>Method</MemberType>
520       <AssemblyInfo>
521         <AssemblyVersion>1.0.5000.0</AssemblyVersion>
522         <AssemblyVersion>2.0.0.0</AssemblyVersion>
523         <AssemblyVersion>4.0.0.0</AssemblyVersion>
524       </AssemblyInfo>
525       <ReturnValue>
526         <ReturnType>System.Int32</ReturnType>
527       </ReturnValue>
528       <Parameters>
529         <Parameter Name="stream" Type="System.IntPtr" />
530         <Parameter Name="pos" Type="Mono.Unix.Native.FilePosition" />
531       </Parameters>
532       <Docs>
533         <param name="stream">
534           <c>FILE</c> stream to retreive the current file position for.</param>
535         <param name="pos">Where to store the current file position.</param>
536         <summary>Retrieve the current file position of a <c>FILE</c> stream.</summary>
537         <returns>
538           <para>Returns <c>0</c> if successful; otherwise <c>-1</c> is returned and <see cref="M:Mono.Unix.Native.Stdlib.GetLastError" /> indicates the error.</para>
539           <block subset="none" type="usage">
540             <para>The following errors are specified:</para>
541             <list type="table">
542               <listheader>
543                 <term>Error</term>
544                 <description>Details</description>
545               </listheader>
546               <item>
547                 <term>
548                   <see cref="F:Mono.Unix.Native.Errno.EBADF" />
549                 </term>
550                 <description>The <paramref name="stream" /> argument is not not a seekable stream</description>
551               </item>
552               <item>
553                 <term>
554                   <see cref="F:Mono.Unix.Native.Errno.EINVAL" />
555                 </term>
556                 <description>The <paramref name="whence" /> argument is invalid or the resulting file-position indicator would be set to a negative value.</description>
557               </item>
558               <item>
559                 <term>
560                   <see cref="F:Mono.Unix.Native.Errno.EOVERFLOW" />
561                 </term>
562                 <description>The resulting file offset would be a value which cannot be represented correctly in an object of type <see cref="System.Int64" /> for <see cref="M:Mono.Unix.Native.Stdlib.fseek" />() and <see cref="M:Mono.Unix.Native.Stdlib.ftell" />().</description>
563               </item>
564               <item>
565                 <term>
566                   <see cref="F:Mono.Unix.Native.Errno.ESPIPE" />
567                 </term>
568                 <description>The file descriptor underlying stream is associated with a pipe or FIFO or file-position indicator value is unspecified (see <see cref="M:Mono.Unix.Native.Stdlib.ungetc" />(3)).</description>
569               </item>
570             </list>
571           </block>
572           <para>
573             <c>fgetpos</c> may also fail for any of the error specified for the routines <see cref="M:Mono.Unix.Native.Stdlib.fflush" />(3), <see cref="M:Mono.Unix.Native.Syscall.fstat" />(2), <see cref="M:Mono.Unix.Native.Syscall.lseek" />(2), and <see cref="M:Mono.Unix.Native.Stdlib.malloc" />(3)
574 </para>
575         </returns>
576         <remarks>
577           <para>The <c>fgetpos</c>() is an alternate interfaces for retrieving the current position in the file, similar to <see cref="M:Mono.Unix.Native.Stdlib.ftell" />(), except that the current position is stored in an opaque object of type <see cref="T:Mono.Unix.Native.FilePosition" /> pointed to by pos.  This provides a portable way to seek to offsets larger than those that can be represented by a long int.  They may also store additional state information in the <see cref="T:Mono.Unix.Native.FilePosition" /> object to facilitate seeking within files containing multibyte characters with state-dependent encodings.</para>
578           <block subset="none" type="note">The value of <paramref name="pos" /> is modified by this operation.
579 </block>
580         </remarks>
581       </Docs>
582     </Member>
583     <Member MemberName="fgets">
584       <MemberSignature Language="C#" Value="public static System.Text.StringBuilder fgets (System.Text.StringBuilder sb, IntPtr stream);" />
585       <MemberSignature Language="ILAsm" Value=".method public static hidebysig class System.Text.StringBuilder fgets(class System.Text.StringBuilder sb, native int stream) cil managed" />
586       <MemberType>Method</MemberType>
587       <AssemblyInfo>
588         <AssemblyVersion>1.0.5000.0</AssemblyVersion>
589         <AssemblyVersion>2.0.0.0</AssemblyVersion>
590         <AssemblyVersion>4.0.0.0</AssemblyVersion>
591       </AssemblyInfo>
592       <ReturnValue>
593         <ReturnType>System.Text.StringBuilder</ReturnType>
594       </ReturnValue>
595       <Parameters>
596         <Parameter Name="sb" Type="System.Text.StringBuilder" />
597         <Parameter Name="stream" Type="System.IntPtr" />
598       </Parameters>
599       <Docs>
600         <param name="sb">Where to store the next line of text from <paramref name="stream" />.</param>
601         <param name="stream">The <c>FILE</c> stream to read a line from.</param>
602         <summary>Read a line from a <c>FILE</c> stream.</summary>
603         <returns>See the <see cref="M:Mono.Unix.Native.Stdlib.fgets(System.Text.StringBuilder,int,System.IntPtr)" /> documentation.</returns>
604         <remarks>Identical to calling <c>fgets(<paramref name="sb" />, <paramref name="sb" />.Capacity, <paramref name="stream" />)</c>.
605 See the <see cref="M:Mono.Unix.Native.Stdlib.fgets(System.Text.StringBuilder,int,System.IntPtr)" /> documentation.</remarks>
606       </Docs>
607     </Member>
608     <Member MemberName="fgets">
609       <MemberSignature Language="C#" Value="public static System.Text.StringBuilder fgets (System.Text.StringBuilder sb, int size, IntPtr stream);" />
610       <MemberSignature Language="ILAsm" Value=".method public static hidebysig class System.Text.StringBuilder fgets(class System.Text.StringBuilder sb, int32 size, native int stream) cil managed" />
611       <MemberType>Method</MemberType>
612       <AssemblyInfo>
613         <AssemblyVersion>1.0.5000.0</AssemblyVersion>
614         <AssemblyVersion>2.0.0.0</AssemblyVersion>
615         <AssemblyVersion>4.0.0.0</AssemblyVersion>
616       </AssemblyInfo>
617       <ReturnValue>
618         <ReturnType>System.Text.StringBuilder</ReturnType>
619       </ReturnValue>
620       <Parameters>
621         <Parameter Name="sb" Type="System.Text.StringBuilder" />
622         <Parameter Name="size" Type="System.Int32" />
623         <Parameter Name="stream" Type="System.IntPtr" />
624       </Parameters>
625       <Docs>
626         <param name="sb">Where to store the next line of text from <paramref name="stream" />.</param>
627         <param name="size">The maximum number of characters that <paramref name="sb" /> can hold.</param>
628         <param name="stream">The <c>FILE</c> stream to read a line from.</param>
629         <summary>Read a line from a <c>FILE</c> stream.</summary>
630         <returns>
631           <para>Upon successful completion, returns <paramref name="sb" />.  If end-of-file occurs before any characters are read, returns <see langword="null" /> and the contents of <paramref name="sb" /> remains unchanged.  If an error occurs, <see langword="null" /> is returned and the contents of <paramref name="sb" /> are indeterminate.  <c>fgets</c> does not distinguish between end-of-file and error, and callers must use <see cref="M:Mono.Unix.Native.Stdlib.feof" />(3) and <see cref="M:Mono.Unix.Native.Stdlib.ferror" />(3) to determine which occurred.</para>
632           <block subset="none" type="usage">
633             <para>The following errors are specified:</para>
634             <list type="table">
635               <listheader>
636                 <term>Error</term>
637                 <description>Details</description>
638               </listheader>
639               <item>
640                 <term>
641                   <see cref="F:Mono.Unix.Native.Errno.EBADF" />
642                 </term>
643                 <description>The given <paramref name="stream" /> is not a readable stream.</description>
644               </item>
645             </list>
646           </block>
647           <para>
648             <c>fgetpos</c> may also fail for any of the error specified for the routines <see cref="M:Mono.Unix.Native.Stdlib.fflush" />(3), <see cref="M:Mono.Unix.Native.Syscall.fstat" />(2), <see cref="M:Mono.Unix.Native.Syscall.read" />(2), or <see cref="M:Mono.Unix.Native.Stdlib.malloc" />(3).
649 </para>
650         </returns>
651         <remarks>The <c>fgets</c>() function reads at most one less than the number of characters specified by <paramref name="size" /> from the given <paramref name="stream" /> and stores them in the string <paramref name="sb" />.  Reading stops when a newline character is found, at end-of-file or error.  The newline, if any, is retained.  If any characters are read and there is no error, a '\0' character is appended to end the string.</remarks>
652       </Docs>
653     </Member>
654     <Member MemberName="FILENAME_MAX">
655       <MemberSignature Language="C#" Value="public static readonly int FILENAME_MAX;" />
656       <MemberSignature Language="ILAsm" Value=".field public static initonly int32 FILENAME_MAX" />
657       <MemberType>Field</MemberType>
658       <AssemblyInfo>
659         <AssemblyVersion>1.0.5000.0</AssemblyVersion>
660         <AssemblyVersion>2.0.0.0</AssemblyVersion>
661         <AssemblyVersion>4.0.0.0</AssemblyVersion>
662       </AssemblyInfo>
663       <Attributes>
664         <Attribute>
665           <AttributeName>System.CLSCompliant(false)</AttributeName>
666         </Attribute>
667       </Attributes>
668       <ReturnValue>
669         <ReturnType>System.Int32</ReturnType>
670       </ReturnValue>
671       <MemberValue>4096</MemberValue>
672       <Docs>
673         <summary>Maximum filename length.</summary>
674         <remarks>To be added.</remarks>
675       </Docs>
676     </Member>
677     <Member MemberName="fopen">
678       <MemberSignature Language="C#" Value="public static IntPtr fopen (string path, string mode);" />
679       <MemberSignature Language="ILAsm" Value=".method public static hidebysig pinvokeimpl (&quot;msvcrt&quot; as &quot;fopen&quot; cdecl lasterr)native int fopen(string path, string mode) cil managed" />
680       <MemberType>Method</MemberType>
681       <AssemblyInfo>
682         <AssemblyVersion>1.0.5000.0</AssemblyVersion>
683         <AssemblyVersion>2.0.0.0</AssemblyVersion>
684         <AssemblyVersion>4.0.0.0</AssemblyVersion>
685       </AssemblyInfo>
686       <ReturnValue>
687         <ReturnType>System.IntPtr</ReturnType>
688       </ReturnValue>
689       <Parameters>
690         <Parameter Name="path" Type="System.String" />
691         <Parameter Name="mode" Type="System.String" />
692       </Parameters>
693       <Docs>
694         <param name="path">The filename to open.</param>
695         <param name="mode">The file mode for opening.  See the Remarks section for more details.</param>
696         <summary>Open a file and associate a <c>FILE</c> stream with it.</summary>
697         <returns>
698           <para>Upon successful completion, returns a <c>FILE</c> pointer.  Otherwise, <see cref="F:System.IntPtr.Zero" /> is returned and <see cref="M:Mono.Unix.Native.Stdlib.GetLastError" /> indicates the error.</para>
699           <block subset="none" type="usage">
700             <para>The following errors are specified:</para>
701             <list type="table">
702               <listheader>
703                 <term>Error</term>
704                 <description>Details</description>
705               </listheader>
706               <item>
707                 <term>
708                   <see cref="F:Mono.Unix.Native.Errno.EINVAL" />
709                 </term>
710                 <description>The <paramref name="mode" /> argument was invalid.</description>
711               </item>
712             </list>
713           </block>
714           <para>
715             <c>fopen</c> may also fail for any of the error specified for the routines <see cref="M:Mono.Unix.Native.Stdlib.malloc" />(3) and <see cref="M:Mono.Unix.Native.Syscall.open" />(2).
716 </para>
717         </returns>
718         <remarks>
719           <para>The fopen() function opens the file whose name is the string pointed to by path and associates a stream with it.
720 </para>
721           <para>Use <see cref="M:Mono.Unix.Native.Stdlib.fclose" /> to close the <c>FILE</c> stream.</para>
722           <para>The argument <paramref name="mode" /> points to a string beginning with one of the following sequences (Additional characters may follow these sequences.):
723 </para>
724           <list type="table">
725             <listheader>
726               <term>
727                 <paramref name="mode" />
728               </term>
729               <description>Description</description>
730             </listheader>
731             <item>
732               <term>
733                 <c>"r"</c>
734               </term>
735               <description> Open text file for reading.  The stream is positioned at the beginning of the file.</description>
736             </item>
737             <item>
738               <term>
739                 <c>"r+"</c>
740               </term>
741               <description>Open for reading and writing.  The stream is positioned at the beginning of the file.</description>
742             </item>
743             <item>
744               <term>
745                 <c>"w"</c>
746               </term>
747               <description>Truncate file to zero length or create text file for writing.  The stream is positioned at the beginning of the file.</description>
748             </item>
749             <item>
750               <term>
751                 <c>"w+"</c>
752               </term>
753               <description>Open for reading and writing.  The file is created if it does not exist, otherwise it is truncated.  The stream is positioned at the beginning of the file.</description>
754             </item>
755             <item>
756               <term>
757                 <c>"a"</c>
758               </term>
759               <description>Open for writing.  The file is created if it does not exist.  The stream is positioned at the end of the file.  Subsequent writes to the file will always end up at the then current end of file, irrespective of any intervening <see cref="M:Mono.Unix.Native.Stdlib.fseek" />(3) or similar.</description>
760             </item>
761             <item>
762               <term>
763                 <c>"a+"</c>
764               </term>
765               <description>Open for reading and writing.  The file is created if it does not exist.  The stream is positioned at the end of the file.  Subsequent writes to the file will always end up at the then current end of file, irrespective of any intervening <see cref="M:Mono.Unix.Native.Stdlib.fseek" />(3) or similar.</description>
766             </item>
767           </list>
768           <para>The <paramref name="mode" /> string can also include the letter "b" either as a third character or as a character between the characters in any of the two-character strings described above, and is used to enable <i>binary</i> reading/writing on platforms which have different text/binary encodings (read: Microsoft Windows).  The default (non-<c>b</c><paramref name="mode" />) is text encoding.</para>
769           <para>Any created files will have mode <c>S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH</c> (0666), as modified by the process' umask value (see <see cref="M:Mono.Unix.Native.Syscall.umask" />(2)).
770 </para>
771           <para>ANSI C requires that a file positioning function intervene between output and input, unless an input operation encounters end-of-file.</para>
772         </remarks>
773       </Docs>
774     </Member>
775     <Member MemberName="FOPEN_MAX">
776       <MemberSignature Language="C#" Value="public static readonly int FOPEN_MAX;" />
777       <MemberSignature Language="ILAsm" Value=".field public static initonly int32 FOPEN_MAX" />
778       <MemberType>Field</MemberType>
779       <AssemblyInfo>
780         <AssemblyVersion>1.0.5000.0</AssemblyVersion>
781         <AssemblyVersion>2.0.0.0</AssemblyVersion>
782         <AssemblyVersion>4.0.0.0</AssemblyVersion>
783       </AssemblyInfo>
784       <Attributes>
785         <Attribute>
786           <AttributeName>System.CLSCompliant(false)</AttributeName>
787         </Attribute>
788       </Attributes>
789       <ReturnValue>
790         <ReturnType>System.Int32</ReturnType>
791       </ReturnValue>
792       <MemberValue>16</MemberValue>
793       <Docs>
794         <summary>Maximum number of <c>FILE</c> pointer that may be open at one time.</summary>
795         <remarks>To be added.</remarks>
796       </Docs>
797     </Member>
798     <Member MemberName="fprintf">
799       <MemberSignature Language="C#" Value="public static int fprintf (IntPtr stream, string message);" />
800       <MemberSignature Language="ILAsm" Value=".method public static hidebysig int32 fprintf(native int stream, string message) cil managed" />
801       <MemberType>Method</MemberType>
802       <AssemblyInfo>
803         <AssemblyVersion>1.0.5000.0</AssemblyVersion>
804         <AssemblyVersion>2.0.0.0</AssemblyVersion>
805         <AssemblyVersion>4.0.0.0</AssemblyVersion>
806       </AssemblyInfo>
807       <ReturnValue>
808         <ReturnType>System.Int32</ReturnType>
809       </ReturnValue>
810       <Parameters>
811         <Parameter Name="stream" Type="System.IntPtr" />
812         <Parameter Name="message" Type="System.String" />
813       </Parameters>
814       <Docs>
815         <param name="stream">
816           <c>FILE</c> stream to write to.</param>
817         <param name="message">The string to write on <paramref name="stream" />.</param>
818         <summary>Print to a <c>FILE</c> stream.</summary>
819         <returns>Returns the number of characters printed or a negative value if an error occurs, and <see cref="M:Mono.Unix.Native.Stdlib.GetLastError" /> indicates the error.
820
821 <block subset="none" type="usage"><para>The following errors are specified:
822   </para><list type="table"><listheader><term>Error</term><description>Details</description></listheader><item><term><see cref="F:Mono.Unix.Native.Errno.EILSEQ" /></term><description>An invalid wide character code was encountered</description></item><item><term><see cref="F:Mono.Unix.Native.Errno.ENOMEM" /></term><description>Insufficient storage space is available.</description></item></list><para>Any of the errors documented for the <see cref="M:Mono.Unix.Native.Syscall.write" /> system call may also be returned.
823 </para></block></returns>
824         <remarks />
825       </Docs>
826     </Member>
827     <Member MemberName="fprintf">
828       <MemberSignature Language="C#" Value="public static int fprintf (IntPtr stream, string format, object[] parameters);" />
829       <MemberSignature Language="ILAsm" Value=".method public static hidebysig int32 fprintf(native int stream, string format, object[] parameters) cil managed" />
830       <MemberType>Method</MemberType>
831       <AssemblyInfo>
832         <AssemblyVersion>1.0.5000.0</AssemblyVersion>
833         <AssemblyVersion>2.0.0.0</AssemblyVersion>
834         <AssemblyVersion>4.0.0.0</AssemblyVersion>
835       </AssemblyInfo>
836       <Attributes>
837         <Attribute>
838           <AttributeName>System.Obsolete("Not necessarily portable due to cdecl restrictions.
839 Use fprintf (IntPtr, string) instead.")</AttributeName>
840         </Attribute>
841       </Attributes>
842       <ReturnValue>
843         <ReturnType>System.Int32</ReturnType>
844       </ReturnValue>
845       <Parameters>
846         <Parameter Name="stream" Type="System.IntPtr" />
847         <Parameter Name="format" Type="System.String" />
848         <Parameter Name="parameters" Type="System.Object[]">
849           <Attributes>
850             <Attribute>
851               <AttributeName>System.ParamArray</AttributeName>
852             </Attribute>
853           </Attributes>
854         </Parameter>
855       </Parameters>
856       <Docs>
857         <param name="stream">
858           <c>FILE</c> stream to write to.</param>
859         <param name="format">The message format.</param>
860         <param name="parameters">Arguments to the message format.</param>
861         <summary>Print to a <c>FILE</c> stream.</summary>
862         <returns>Returns the number of characters printed or a negative value if an error occurs, and <see cref="M:Mono.Unix.Native.Stdlib.GetLastError" /> indicates the error.
863
864 <block subset="none" type="usage"><para>The following errors are specified:
865   </para><list type="table"><listheader><term>Error</term><description>Details</description></listheader><item><term><see cref="F:Mono.Unix.Native.Errno.EILSEQ" /></term><description>An invalid wide character code was encountered</description></item><item><term><see cref="F:Mono.Unix.Native.Errno.ENOMEM" /></term><description>Insufficient storage space is available.</description></item></list><para>Any of the errors documented for the <see cref="M:Mono.Unix.Native.Syscall.write" /> system call may also be returned.
866 </para></block></returns>
867         <remarks>
868           <para>The <c>fprintf</c>() family of functions produces output according to a format as described below.  <c>fprintf</c>() writes output to the given output <paramref name="stream" />.</para>
869           <para>These functions write the output under the control of a <paramref name="format" /> string that specifies how subsequent arguments (or arguments accessed via the variable-length argument facilities of <c>stdarg</c>(3)) are converted for output.
870 </para>
871           <para>The format string is composed of zero or more directives: ordinary characters (not %), which are copied unchanged to the output stream; and conversion specifications, each of which results in fetching zero or more subsequent arguments.  Each conversion specification is introduced by the % character.  The arguments must correspond properly (after type promotion) with the conversion specifier.  After the %, the following appear in sequence:</para>
872           <list type="bullet">
873             <item>
874               <term>An optional field, consisting of a decimal digit string followed by a <c>$</c>, specifying the next argument to access.  If this field is not provided, the argument following the last argument accessed will be used.  Arguments are numbered starting at <c>1</c>.  If unaccessed arguments in the format string are interspersed with ones that are accessed the results will be indeterminate.</term>
875             </item>
876             <item>
877               <term>Zero or more of the following flags:
878
879 <list type="table"><listheader><term>Flag</term><description>Description</description></listheader><item><term>'<c>#</c>'</term><description>The value should be converted to an "alternate form".  For <c>c</c>, <c>d</c>, <c>i</c>, <c>n</c>, <c>p</c>, <c>s</c>, and <c>u</c> conversions, this option has no effect.  For <c>o</c> conversions, the precision of the number is increased to force the first character of the output string to a zero (except if a zero value is printed with an explicit precision of zero).  For <c>x</c> and <c>X</c> conversions, a non-zero result has the string '<c>0x</c>' (or '<c>0X</c>' for <c>X</c> conversions) prepended to it. For <c>a</c>, <c>A</c>, <c>e</c>, <c>E</c>, <c>f</c>, <c>F</c>, <c>g</c>, and <c>G</c> conversions, the result will always contain a decimal point, even if no digits follow it (normally, a decimal point appears in the results of those conversions only if a digit follows).  For <c>g</c> and <c>G</c> conversions, trailing zeros are not removed from the result as they would otherwise be.</description></item><item><term>'<c>0</c>' (zero)</term><description>Zero padding.  For all conversions except <c>n</c>, the converted value is padded on the left with zeros rather than blanks.  If a precision is given with a numeric conversion (<c>d</c>, <c>i</c>, <c>o</c>, <c>u</c>, <c>i</c>, <c>x</c>, and <c>X</c>), the 0 flag is ignored.</description></item><item><term>'<c>-</c>'</term><description>A negative field width flag; the converted value is to be left adjusted on the field boundary.  Except for <c>n</c> conversions, the converted value is padded on the right with blanks, rather than on the left with blanks or zeros.  A <c>-</c> overrides a <c>0</c> if both are given.</description></item><item><term>'<c />' (space)</term><description>A blank should be left before a positive number produced by a signed conversion (<c>a</c>, <c>A</c>, <c>d</c>, <c>e</c>, <c>E</c>, <c>f</c>, <c>F</c>, <c>g</c>, <c>G</c>, or <c>i</c>).</description></item><item><term>'<c>+</c>'</term><description>A sign must always be placed before a number produced by a signed conversion.  A <c>+</c> overrides a space if both are used.</description></item><item><term>'<c>'</c>'</term><description>Decimal conversions (<c>d</c>, <c>u</c>, or <c>i</c>) or the integral portion of a floating point conversion (<c>f</c> or <c>F</c>) should be grouped and separated by thousands using the non-monetary separator returned by <see cref="M:Mono.Unix.Native.Syscall.localeconv" />(3).</description></item></list></term>
880             </item>
881             <item>
882               <term>An optional decimal digit string specifying a minimum field width.  If the converted value has fewer characters than the field width, it will be padded with spaces on the left (or right, if the left-adjustment flag has been given) to fill out the field width.</term>
883             </item>
884             <item>
885               <term>An optional precision, in the form of a period . followed by an optional digit string.  If the digit string is omitted, the precision is taken as zero.  This gives the minimum number of digits to appear for <c>d</c>, <c>i</c>, <c>o</c>, <c>u</c>, <c>x</c>, and <c>X</c> conversions, the number of digits to appear after the decimal-point for <c>a</c>, <c>A</c>, <c>e</c>, <c>E</c>, <c>f</c>, and <c>F</c> conversions, the maximum number of significant digits for <c>g</c> and <c>G</c> conversions, or the maximum number of characters to be printed from a string for <c>s</c> conversions.</term>
886             </item>
887             <item>
888               <term>An optional length modifier, that specifies the size of the argument.  The following length modifiers are valid for the <c>d</c>, <c>i</c>, <c>n</c>, <c>o</c>, <c>u</c>, <c>x</c>, or <c>X</c> conversion:
889
890 <list type="table"><listheader><term>Modifier</term><description><c>d</c>, <c>i</c></description><description><c>o, u, x, X</c></description><description><c>n</c></description></listheader><item><term><c>hh</c></term><description><c>signed char</c></description><description><c>unsigned char</c></description><description><c>signed char *</c></description></item><item><term><c>h</c></term><description><c>short</c></description><description><c>unsigned short</c></description><description><c>short *</c></description></item><item><term><c>l</c> (ell)</term><description><c>long</c></description><description><c>unsigned long</c></description><description><c>unsigned long *</c></description></item><item><term><c>ll</c> (ell ell)</term><description><c>long long</c></description><description><c>unsigned long long</c></description><description><c>long long *</c></description></item><item><term><c>j</c></term><description><c>intmax_t</c></description><description><c>uintmax_t</c></description><description><c>intmax_t *</c></description></item><item><term><c>t</c></term><description><c>ptrdiff_t</c></description><description>(see note)</description><description><c>ptrdiff_t *</c></description></item><item><term><c>z</c></term><description>(see note)</description><description><c>size_t</c></description><description>(see note)</description></item><item><term><c>q</c><i>(deprecated)</i></term><description><c>quad_t</c></description><description><c>u_quad_t</c></description><description><c>quad_t *</c></description></item></list><block subset="none" type="note"><para>the <c>t</c> modifier, when applied to a <c>o</c>, <c>u</c>, <c>x</c>, or <c>X</c> conversion, indicates that the argument is of an unsigned type equivalent in size to a <c>ptrdiff_t</c>.  The <c>z</c> modifier, when applied to a <c>d</c> or <c>i</c> conversion, indicates that the argument is of a signed type equivalent in size to a <c>size_t</c>.  Similarly, when applied to an <c>n</c> conversion, it indicates that the argument is a pointer to a signed type equivalent in size to a <c>size_t</c>.
891   </para></block><para>The following length modifier is valid for the <c>a</c>, <c>A</c>, <c>e</c>, <c>E</c>, <c>f</c>, <c>F</c>, <c>g</c>, or <c>G</c> conversion:</para><list type="table"><listheader><term>Modifier</term><description><c>a, A, e, E, f, F, g, G</c></description></listheader><item><term><c>L</c></term><description><c>long double</c></description></item></list><para>The following length modifier is valid for the <c>c</c> or <c>s</c> conversion:</para><list type="table"><listheader><term>Modifier</term><description><c>c</c></description><description><c>s</c></description></listheader><item><term><c>l</c> (ell)</term><description><c>wint_t</c></description><description><c>wchar_t *</c></description></item></list></term>
892             </item>
893             <item>
894               <term>A character that specifies the type of conversion to be applied.</term>
895             </item>
896           </list>
897           <para>A field width or precision, or both, may be indicated by an asterisk '<c>*</c>' or an asterisk followed by one or more decimal digits and a '<c>$</c>' instead of a digit string.  In this case, an <i>int</i> argument supplies the field width or precision.  A negative field width is treated as a left adjustment flag followed by a positive field width; a negative precision is treated as though it were missing.  If a single format directive mixes positional (<c>nn$</c>) and non-positional arguments, the results are undefined
898 </para>
899           <para>The conversion specifiers and their meanings are:</para>
900           <list type="table">
901             <listheader>
902               <term>Specifier</term>
903               <description>Meaning</description>
904             </listheader>
905             <item>
906               <term>
907                 <c>diouxX</c>
908               </term>
909               <description>The <c>int</c> (or appropriate variant) argument is converted to signed decimal (<c>d</c> and <c>i</c>), unsigned octal (<c>o</c>), unsigned decimal (<c>u</c>), or unsigned hexadecimal (<c>x</c> and <c>X</c>) notation.  The letters "<c>abcdef</c>" are used for <c>x</c> conversions; the letters "<c>ABCDEF</c>" are used for <c>X</c> conversions.  The precision, if any, gives the minimum number of digits that must appear; if the converted value requires fewer digits, it is padded on the left with zeros.</description>
910             </item>
911             <item>
912               <term>
913                 <c>DOU</c>
914               </term>
915               <description>The <c>long int</c> argument is converted to signed decimal, unsigned octal, or unsigned decimal, as if the format had been <c>ld</c>, <c>lo</c>, or <c>lu</c> respectively.  These conversion characters are deprecated, and will eventually disappear.</description>
916             </item>
917             <item>
918               <term>
919                 <c>eE</c>
920               </term>
921               <description>The <c>double</c> argument is rounded and converted in the style <c>[-]d.ddde±dd</c> where there is one digit before the decimal-point character and the number of digits after it is equal to the precision; if the precision is missing, it is taken as 6; if the precision is zero, no decimal-point character appears.  An <c>E</c> conversion uses the letter '<c>E</c>' (rather than '<c>e</c>') to introduce the exponent.  The exponent always contains at least two digits; if the value is zero, the exponent is 00.</description>
922               <para>For <c>a</c>, <c>A</c>, <c>e</c>, <c>E</c>, <c>f</c>, <c>F</c>, <c>g</c>, and <c>G</c> conversions, positive and negative infinity are represented as <c>inf</c> and <c>-inf</c> respectively when using the lowercase conversion character, and <c>INF</c> and <c>-INF</c> respectively when using the uppercase conversion character.  Similarly, <c>NaN</c> is represented as <c>nan</c> when using the lowercase conversion, and <c>NAN</c> when using the uppercase conversion.</para>
923             </item>
924             <item>
925               <term>
926                 <c>fF</c>
927               </term>
928               <description>The <c>double</c> argument is rounded and converted to decimal notation in the style <c>[-]ddd.ddd</c>, where the number of digits after the decimal-point character is equal to the precision specification.  If the precision is missing, it is taken as 6; if the precision is explicitly zero, no decimal-point character appears. If a decimal point appears, at least one digit appears before it.</description>
929             </item>
930             <item>
931               <term>
932                 <c>gG</c>
933               </term>
934               <description>The <c>double</c> argument is converted in style <c>f</c> or <c>e</c> (or <c>F</c> or <c>E</c> for <c>G</c> conversions). The precision specifies the number of significant digits.  If the precision is missing, 6 digits are given; if the precision is zero, it is treated as 1. Style <c>e</c> is used if the exponent from its conversion is less than -4 or greater than or equal to the precision.  Trailing zeros are removed from the fractional part of the result; a decimal point appears only if it is followed by at least one digit.</description>
935             </item>
936             <item>
937               <term>
938                 <c>aA</c>
939               </term>
940               <description>The <c>double</c> argument is rounded and converted to hexadecimal notation in the style <c>[-]0xh.hhhp[±]d</c>, where the number of digits after the hexadecimal-point character is equal to the precision specification.  If the precision is missing, it is taken as enough to represent the floating-point number exactly, and no rounding occurs.  If the precision is zero, no hexadecimal-point character appears.  The <c>p</c> is a literal character '<c>p</c>', and the exponent consists of a positive or negative sign followed by a decimal number representing an exponent of 2.  The <c>A</c> conversion uses the prefix "<c>0X</c>" (rather than "<c>0x</c>"), the letters "<c>ABCDEF</c>" (rather than "<c>abcdef</c>") to represent the hex digits, and the letter '<c>P</c>' (rather than '<c>p</c>') to separate the mantissa and exponent.
941
942 <para>Note that there may be multiple valid ways to represent floating-point numbers in this hexadecimal format.  For example, <c>0x3.24p+0</c>, <c>0x6.48p-1</c> and <c>0xc.9p-2</c> are all equivalent.  The format chosen depends on the internal representation of the number, but the implementation guarantees that the length of the mantissa will be minimized.  Zeroes are always represented with a mantissa of 0 (preceded by a '<c>-</c>' if appropriate) and an exponent of +0.
943 </para></description>
944             </item>
945             <item>
946               <term>
947                 <c>C</c>
948               </term>
949               <description>Treated as <c>c</c> with the <c>l</c> (ell) modifier.</description>
950             </item>
951             <item>
952               <term>
953                 <c>c</c>
954               </term>
955               <description>The <c>int</c> argument is converted to an <c>unsigned char</c>, and the resulting character is written.
956
957 <para>If the <c>l</c> (ell) modifier is used, the <c>wint_t</c> argument shall be converted to a <c>wchar_t</c>, and the (potentially multi-byte) sequence representing the single wide character is written, including any shift sequences.  If a shift sequence is used, the shift state is also restored to the original state after the character.
958 </para></description>
959             </item>
960             <item>
961               <term>
962                 <c>S</c>
963               </term>
964               <description>Treated as <c>s</c> with the <c>l</c> (ell) modifier.</description>
965             </item>
966             <item>
967               <term>
968                 <c>s</c>
969               </term>
970               <description>
971 The <c>char *</c> argument is expected to be a pointer to an array of character type (pointer to a string).  Characters from the array are written up to (but not including) a terminating NUL character; if a precision is specified, no more than the number specified are written.  If a precision is given, no null character need be present; if the precision is not specified, or is greater than the size of the array, the array must contain a terminating NUL character.
972
973 <para>If the <c>l</c> (ell) modifier is used, the <c>wchar_t *</c> argument is expected to be a pointer to an array of wide characters (pointer to a wide string).  For each wide character in the string, the (potentially multi-byte) sequence representing the wide character is written, including any shift sequences.  If any shift sequence is used, the shift state is also restored to the original state after the string.  Wide characters from the array are written up to (but not including) a terminating wide NUL character; if a precision is specified, no more than the number of bytes specified are written (including shift sequences).  Partial characters are never written.  If a precision is given, no null character need be present; if the precision is not specified, or is greater than the number of bytes required to render the multibyte representation of the string, the array must contain a terminating wide NUL character.</para></description>
974             </item>
975             <item>
976               <term>
977                 <c>p</c>
978               </term>
979               <description>The <c>void *</c> pointer argument is printed in hexadecimal (as if by '<c>%#x</c>' or '<c>%#lx</c>').</description>
980             </item>
981             <item>
982               <term>
983                 <c>n</c>
984               </term>
985               <description>The number of characters written so far is stored into the integer indicated by the <c>int *</c> (or variant) pointer argument.  No argument is converted.</description>
986             </item>
987             <item>
988               <term>
989                 <c>%</c>
990               </term>
991               <description> A '<c>%</c>' is written.  No argument is converted.  The complete conversion specification is '<c>%%</c>'.</description>
992             </item>
993           </list>
994           <para>The decimal point character is defined in the program's locale (category <c>LC_NUMERIC</c>)
995 </para>
996           <para>In no case does a non-existent or small field width cause truncation of a numeric field; if the result of a conversion is wider than the field width, the field is expanded to contain the conversion result.</para>
997         </remarks>
998       </Docs>
999     </Member>
1000     <Member MemberName="fputc">
1001       <MemberSignature Language="C#" Value="public static int fputc (int c, IntPtr stream);" />
1002       <MemberSignature Language="ILAsm" Value=".method public static hidebysig pinvokeimpl (&quot;msvcrt&quot; as &quot;fputc&quot; cdecl lasterr)int32 fputc(int32 c, native int stream) cil managed" />
1003       <MemberType>Method</MemberType>
1004       <AssemblyInfo>
1005         <AssemblyVersion>1.0.5000.0</AssemblyVersion>
1006         <AssemblyVersion>2.0.0.0</AssemblyVersion>
1007         <AssemblyVersion>4.0.0.0</AssemblyVersion>
1008       </AssemblyInfo>
1009       <ReturnValue>
1010         <ReturnType>System.Int32</ReturnType>
1011       </ReturnValue>
1012       <Parameters>
1013         <Parameter Name="c" Type="System.Int32" />
1014         <Parameter Name="stream" Type="System.IntPtr" />
1015       </Parameters>
1016       <Docs>
1017         <param name="c">The charater to write.</param>
1018         <param name="stream">The <c>FILE</c> stream to write to.</param>
1019         <summary>Output a character to a <c>FILE</c> stream.</summary>
1020         <returns>Returns the character written.  If an error occurrs, the value <see cref="F:Mono.Unix.Native.Stdlib.EOF" /> is returned.</returns>
1021         <remarks>The <c>fputc</c>() function writes the character <paramref name="c" /> (converted to an "unsigned char") to the output stream pointed to by <paramref name="stream" />.</remarks>
1022       </Docs>
1023     </Member>
1024     <Member MemberName="fputs">
1025       <MemberSignature Language="C#" Value="public static int fputs (string s, IntPtr stream);" />
1026       <MemberSignature Language="ILAsm" Value=".method public static hidebysig pinvokeimpl (&quot;msvcrt&quot; as &quot;fputs&quot; cdecl lasterr)int32 fputs(string s, native int stream) cil managed" />
1027       <MemberType>Method</MemberType>
1028       <AssemblyInfo>
1029         <AssemblyVersion>1.0.5000.0</AssemblyVersion>
1030         <AssemblyVersion>2.0.0.0</AssemblyVersion>
1031         <AssemblyVersion>4.0.0.0</AssemblyVersion>
1032       </AssemblyInfo>
1033       <ReturnValue>
1034         <ReturnType>System.Int32</ReturnType>
1035       </ReturnValue>
1036       <Parameters>
1037         <Parameter Name="s" Type="System.String" />
1038         <Parameter Name="stream" Type="System.IntPtr" />
1039       </Parameters>
1040       <Docs>
1041         <param name="s">The string to write.</param>
1042         <param name="stream">The <c>FILE</c> stream to write to.</param>
1043         <summary>Output a line to a <c>FILE</c> stream.</summary>
1044         <returns>
1045           <para>The <c>fputs</c> function returns <c>0</c> on success and <see cref="F:Mono.Unix.Native.Stdlib.EOF" /> on error, and <see cref="M:Mono.Unix.Native.Stdlib.GetLastError" /> indicates the error.</para>
1046           <block subset="none" type="usage">
1047             <para>The following errors are specified:</para>
1048             <list type="table">
1049               <listheader>
1050                 <term>Error</term>
1051                 <description>Details</description>
1052               </listheader>
1053               <item>
1054                 <term>
1055                   <see cref="F:Mono.Unix.Native.Errno.EBADF" />
1056                 </term>
1057                 <description>The <paramref name="stream" /> argument not a writable stream.</description>
1058               </item>
1059             </list>
1060           </block>
1061           <para>
1062             <c>fputs</c> may also fail for any of the errors specified for the routines <see cref="M:Mono.Unix.Native.Syscall.write" />(2).
1063 </para>
1064         </returns>
1065         <remarks> The function <c>fputs</c>() writes the string pointed to by <paramref name="s" /> to the stream pointed to by <paramref name="stream" />.</remarks>
1066       </Docs>
1067     </Member>
1068     <Member MemberName="fread">
1069       <MemberSignature Language="C#" Value="public static ulong fread (byte[] ptr, IntPtr stream);" />
1070       <MemberSignature Language="ILAsm" Value=".method public static hidebysig unsigned int64 fread(unsigned int8[] ptr, native int stream) cil managed" />
1071       <MemberType>Method</MemberType>
1072       <AssemblyInfo>
1073         <AssemblyVersion>1.0.5000.0</AssemblyVersion>
1074         <AssemblyVersion>2.0.0.0</AssemblyVersion>
1075         <AssemblyVersion>4.0.0.0</AssemblyVersion>
1076       </AssemblyInfo>
1077       <Attributes>
1078         <Attribute>
1079           <AttributeName>System.CLSCompliant(false)</AttributeName>
1080         </Attribute>
1081       </Attributes>
1082       <ReturnValue>
1083         <ReturnType>System.UInt64</ReturnType>
1084       </ReturnValue>
1085       <Parameters>
1086         <Parameter Name="ptr" Type="System.Byte[]" />
1087         <Parameter Name="stream" Type="System.IntPtr" />
1088       </Parameters>
1089       <Docs>
1090         <param name="ptr">Where to store the binary data read.</param>
1091         <param name="stream">The binary <c>FILE</c> stream to read from.</param>
1092         <summary>Read from a binary stream.</summary>
1093         <returns>
1094           <para>The function <c>fread</c>() advances the file position indicator for the stream by the number of bytes read.  It returns the number of objects read or written. If an error occurs, or the end-of-file is reached, the return value is a short object count (or zero).</para>
1095           <para>The function <c>fread</c>() does not distinguish between end-of-file and error, and callers must use <see cref="M:Mono.Unix.Native.Stdlib.feof" />(3) and <see cref="M:Mono.Unix.Native.Stdlib.ferror" />(3) to determine which occurred.</para>
1096         </returns>
1097         <remarks>The function <c>fread</c>() reads <c><paramref name="ptr" />.Length</c> bytes from the stream pointed to by <paramref name="stream" />, storing them at the location given by <paramref name="ptr" />.</remarks>
1098       </Docs>
1099     </Member>
1100     <Member MemberName="fread">
1101       <MemberSignature Language="C#" Value="public static ulong fread (byte[] ptr, ulong size, ulong nmemb, IntPtr stream);" />
1102       <MemberSignature Language="ILAsm" Value=".method public static hidebysig unsigned int64 fread(unsigned int8[] ptr, unsigned int64 size, unsigned int64 nmemb, native int stream) cil managed" />
1103       <MemberType>Method</MemberType>
1104       <AssemblyInfo>
1105         <AssemblyVersion>1.0.5000.0</AssemblyVersion>
1106         <AssemblyVersion>2.0.0.0</AssemblyVersion>
1107         <AssemblyVersion>4.0.0.0</AssemblyVersion>
1108       </AssemblyInfo>
1109       <Attributes>
1110         <Attribute>
1111           <AttributeName>System.CLSCompliant(false)</AttributeName>
1112         </Attribute>
1113       </Attributes>
1114       <ReturnValue>
1115         <ReturnType>System.UInt64</ReturnType>
1116       </ReturnValue>
1117       <Parameters>
1118         <Parameter Name="ptr" Type="System.Byte[]" />
1119         <Parameter Name="size" Type="System.UInt64" />
1120         <Parameter Name="nmemb" Type="System.UInt64" />
1121         <Parameter Name="stream" Type="System.IntPtr" />
1122       </Parameters>
1123       <Docs>
1124         <param name="ptr">Where to store the binary data read.</param>
1125         <param name="size">The size of each object to read.</param>
1126         <param name="nmemb">The number of objects to read.</param>
1127         <param name="stream">The binary <c>FILE</c> stream to read from.</param>
1128         <summary>Read from a binary stream.</summary>
1129         <returns>
1130           <para>The function <c>fread</c>() advances the file position indicator for the stream by the number of bytes read.  It returns the number of objects read or written. If an error occurs, or the end-of-file is reached, the return value is a short object count (or zero).</para>
1131           <para>The function <c>fread</c>() does not distinguish between end-of-file and error, and callers must use <see cref="M:Mono.Unix.Native.Stdlib.feof" />(3) and <see cref="M:Mono.Unix.Native.Stdlib.ferror" />(3) to determine which occurred.</para>
1132         </returns>
1133         <remarks>The function <c>fread</c>() reads <paramref name="nmemb" /> objects, each <paramref name="size" /> bytes long, from the stream pointed to by <paramref name="stream" />, storing them at the location given by <paramref name="ptr" />.</remarks>
1134       </Docs>
1135     </Member>
1136     <Member MemberName="fread">
1137       <MemberSignature Language="C#" Value="public static ulong fread (IntPtr ptr, ulong size, ulong nmemb, IntPtr stream);" />
1138       <MemberSignature Language="ILAsm" Value=".method public static hidebysig pinvokeimpl (&quot;MonoPosixHelper&quot; as &quot;Mono_Posix_Stdlib_fread&quot; cdecl lasterr)unsigned int64 fread(native int ptr, unsigned int64 size, unsigned int64 nmemb, native int stream) cil managed" />
1139       <MemberType>Method</MemberType>
1140       <AssemblyInfo>
1141         <AssemblyVersion>1.0.5000.0</AssemblyVersion>
1142         <AssemblyVersion>2.0.0.0</AssemblyVersion>
1143         <AssemblyVersion>4.0.0.0</AssemblyVersion>
1144       </AssemblyInfo>
1145       <Attributes>
1146         <Attribute>
1147           <AttributeName>System.CLSCompliant(false)</AttributeName>
1148         </Attribute>
1149       </Attributes>
1150       <ReturnValue>
1151         <ReturnType>System.UInt64</ReturnType>
1152       </ReturnValue>
1153       <Parameters>
1154         <Parameter Name="ptr" Type="System.IntPtr" />
1155         <Parameter Name="size" Type="System.UInt64" />
1156         <Parameter Name="nmemb" Type="System.UInt64" />
1157         <Parameter Name="stream" Type="System.IntPtr" />
1158       </Parameters>
1159       <Docs>
1160         <param name="ptr">Where to store the binary data read.</param>
1161         <param name="size">The size of each object to read.</param>
1162         <param name="nmemb">The number of objects to read.</param>
1163         <param name="stream">The binary <c>FILE</c> stream to read from.</param>
1164         <summary>Read from a binary stream.</summary>
1165         <returns>
1166           <para>The function <c>fread</c>() advances the file position indicator for the stream by the number of bytes read.  It returns the number of objects read or written. If an error occurs, or the end-of-file is reached, the return value is a short object count (or zero).</para>
1167           <para>The function <c>fread</c>() does not distinguish between end-of-file and error, and callers must use <see cref="M:Mono.Unix.Native.Stdlib.feof" />(3) and <see cref="M:Mono.Unix.Native.Stdlib.ferror" />(3) to determine which occurred.</para>
1168         </returns>
1169         <remarks>The function <c>fread</c>() reads <paramref name="nmemb" /> objects, each <paramref name="size" /> bytes long, from the stream pointed to by <paramref name="stream" />, storing them at the location given by <paramref name="ptr" />.</remarks>
1170       </Docs>
1171     </Member>
1172     <Member MemberName="fread">
1173       <MemberSignature Language="C#" Value="public static ulong fread (void* ptr, ulong size, ulong nmemb, IntPtr stream);" />
1174       <MemberSignature Language="ILAsm" Value=".method public static hidebysig unsigned int64 fread(void* ptr, unsigned int64 size, unsigned int64 nmemb, native int stream) cil managed" />
1175       <MemberType>Method</MemberType>
1176       <AssemblyInfo>
1177         <AssemblyVersion>1.0.5000.0</AssemblyVersion>
1178         <AssemblyVersion>2.0.0.0</AssemblyVersion>
1179         <AssemblyVersion>4.0.0.0</AssemblyVersion>
1180       </AssemblyInfo>
1181       <Attributes>
1182         <Attribute>
1183           <AttributeName>System.CLSCompliant(false)</AttributeName>
1184         </Attribute>
1185       </Attributes>
1186       <ReturnValue>
1187         <ReturnType>System.UInt64</ReturnType>
1188       </ReturnValue>
1189       <Parameters>
1190         <Parameter Name="ptr" Type="System.Void*" />
1191         <Parameter Name="size" Type="System.UInt64" />
1192         <Parameter Name="nmemb" Type="System.UInt64" />
1193         <Parameter Name="stream" Type="System.IntPtr" />
1194       </Parameters>
1195       <Docs>
1196         <param name="ptr">Where to store the binary data read.</param>
1197         <param name="size">The size of each object to read.</param>
1198         <param name="nmemb">The number of objects to read.</param>
1199         <param name="stream">The binary <c>FILE</c> stream to read from.</param>
1200         <summary>Read from a binary stream.</summary>
1201         <returns>
1202           <para>The function <c>fread</c>() advances the file position indicator for the stream by the number of bytes read.  It returns the number of objects read or written. If an error occurs, or the end-of-file is reached, the return value is a short object count (or zero).</para>
1203           <para>The function <c>fread</c>() does not distinguish between end-of-file and error, and callers must use <see cref="M:Mono.Unix.Native.Stdlib.feof" />(3) and <see cref="M:Mono.Unix.Native.Stdlib.ferror" />(3) to determine which occurred.</para>
1204         </returns>
1205         <remarks>The function <c>fread</c>() reads <paramref name="nmemb" /> objects, each <paramref name="size" /> bytes long, from the stream pointed to by <paramref name="stream" />, storing them at the location given by <paramref name="ptr" />.</remarks>
1206       </Docs>
1207     </Member>
1208     <Member MemberName="free">
1209       <MemberSignature Language="C#" Value="public static void free (IntPtr ptr);" />
1210       <MemberSignature Language="ILAsm" Value=".method public static hidebysig pinvokeimpl (&quot;msvcrt&quot; as &quot;free&quot; cdecl)void free(native int ptr) cil managed" />
1211       <MemberType>Method</MemberType>
1212       <AssemblyInfo>
1213         <AssemblyVersion>1.0.5000.0</AssemblyVersion>
1214         <AssemblyVersion>2.0.0.0</AssemblyVersion>
1215         <AssemblyVersion>4.0.0.0</AssemblyVersion>
1216       </AssemblyInfo>
1217       <ReturnValue>
1218         <ReturnType>System.Void</ReturnType>
1219       </ReturnValue>
1220       <Parameters>
1221         <Parameter Name="ptr" Type="System.IntPtr" />
1222       </Parameters>
1223       <Docs>
1224         <param name="ptr">The start of a memory area to free.</param>
1225         <summary>Free allocated memory.</summary>
1226         <remarks>The <c>free</c>() function causes the allocated memory referenced by <paramref name="ptr" /> to be made available for future allocations.  If <paramref name="ptr" /> is <see cref="F:System.IntPtr.Zero" />, no action occurs.</remarks>
1227       </Docs>
1228     </Member>
1229     <Member MemberName="freopen">
1230       <MemberSignature Language="C#" Value="public static IntPtr freopen (string path, string mode, IntPtr stream);" />
1231       <MemberSignature Language="ILAsm" Value=".method public static hidebysig pinvokeimpl (&quot;msvcrt&quot; as &quot;freopen&quot; cdecl lasterr)native int freopen(string path, string mode, native int stream) cil managed" />
1232       <MemberType>Method</MemberType>
1233       <AssemblyInfo>
1234         <AssemblyVersion>1.0.5000.0</AssemblyVersion>
1235         <AssemblyVersion>2.0.0.0</AssemblyVersion>
1236         <AssemblyVersion>4.0.0.0</AssemblyVersion>
1237       </AssemblyInfo>
1238       <ReturnValue>
1239         <ReturnType>System.IntPtr</ReturnType>
1240       </ReturnValue>
1241       <Parameters>
1242         <Parameter Name="path" Type="System.String" />
1243         <Parameter Name="mode" Type="System.String" />
1244         <Parameter Name="stream" Type="System.IntPtr" />
1245       </Parameters>
1246       <Docs>
1247         <param name="path">The filename to open.</param>
1248         <param name="mode">The file mode for opening. See the Remarks section for more details.</param>
1249         <param name="stream">The <c>FILE</c> stream to reopen.</param>
1250         <summary>Reopen a <c>FILE</c> stream.</summary>
1251         <returns>
1252           <para>Upon successful completion, returns a <c>FILE</c> pointer.  Otherwise, <see cref="F:System.IntPtr.Zero" /> is returned and <see cref="M:Mono.Unix.Native.Stdlib.GetLastError" /> indicates the error.</para>
1253           <block subset="none" type="usage">
1254             <para>The following errors are specified:</para>
1255             <list type="table">
1256               <listheader>
1257                 <term>Error</term>
1258                 <description>Details</description>
1259               </listheader>
1260               <item>
1261                 <term>
1262                   <see cref="F:Mono.Unix.Native.Errno.EINVAL" />
1263                 </term>
1264                 <description>The <paramref name="mode" /> argument was invalid.</description>
1265               </item>
1266             </list>
1267           </block>
1268           <para>
1269             <c>freopen</c> may also fail for any of the error specified for the routines <see cref="M:Mono.Unix.Native.Stdlib.malloc" />(3),
1270 <see cref="M:Mono.Unix.Native.Syscall.open" />(2), 
1271 <see cref="M:Mono.Unix.Native.Stdlib.fclose" />(3), and
1272 <see cref="M:Mono.Unix.Native.Stdlib.fflush" />(3).
1273 </para>
1274         </returns>
1275         <remarks>
1276           <para>The <c>freopen</c>() function opens the file whose name is the string pointed to by <paramref name="path" /> and associates the stream pointed to by <paramref name="stream" /> with it.  The original stream (if it exists) is closed.
1277 </para>
1278           <para>Use <see cref="M:Mono.Unix.Native.Stdlib.fclose" /> to close the returned <c>FILE</c> stream.</para>
1279           <para>The argument <paramref name="mode" /> points to a string beginning with one of the following sequences (Additional characters may follow these sequences.):
1280 </para>
1281           <list type="table">
1282             <listheader>
1283               <term>
1284                 <paramref name="mode" />
1285               </term>
1286               <description>Description</description>
1287             </listheader>
1288             <item>
1289               <term>
1290                 <c>"r"</c>
1291               </term>
1292               <description> Open text file for reading.  The stream is positioned at the beginning of the file.</description>
1293             </item>
1294             <item>
1295               <term>
1296                 <c>"r+"</c>
1297               </term>
1298               <description>Open for reading and writing.  The stream is positioned at the beginning of the file.</description>
1299             </item>
1300             <item>
1301               <term>
1302                 <c>"w"</c>
1303               </term>
1304               <description>Truncate file to zero length or create text file for writing.  The stream is positioned at the beginning of the file.</description>
1305             </item>
1306             <item>
1307               <term>
1308                 <c>"w+"</c>
1309               </term>
1310               <description>Open for reading and writing.  The file is created if it does not exist, otherwise it is truncated.  The stream is positioned at the beginning of the file.</description>
1311             </item>
1312             <item>
1313               <term>
1314                 <c>"a"</c>
1315               </term>
1316               <description>Open for writing.  The file is created if it does not exist.  The stream is positioned at the end of the file.  Subsequent writes to the file will always end up at the then current end of file, irrespective of any intervening <see cref="M:Mono.Unix.Native.Stdlib.fseek" />(3) or similar.</description>
1317             </item>
1318             <item>
1319               <term>
1320                 <c>"a+"</c>
1321               </term>
1322               <description>Open for reading and writing.  The file is created if it does not exist.  The stream is positioned at the end of the file.  Subsequent writes to the file will always end up at the then current end of file, irrespective of any intervening <see cref="M:Mono.Unix.Native.Stdlib.fseek" />(3) or similar.</description>
1323             </item>
1324           </list>
1325           <para>The <paramref name="mode" /> string can also include the letter "b" either as a third character or as a character between the characters in any of the two-character strings described above, and is used to enable <i>binary</i> reading/writing on platforms which have different text/binary encodings (read: Microsoft Windows).  The default (non-<c>b</c><paramref name="mode" />) is text encoding.</para>
1326           <para>If the <paramref name="path" /> argument is <see langword="null" />, <c>freopen</c>() attempts to re-open the file associated with <paramref name="stream" /> with a new mode.  The new mode must be compatible with the mode that the stream was originally opened with:
1327 </para>
1328           <list type="bullet">
1329             <item>
1330               <term>Streams originally opened with mode <c>"r"</c> can only be reopened with that same mode.</term>
1331             </item>
1332             <item>
1333               <term>Streams originally opened with mode <c>"a"</c> can be reopened with the same mode, or mode <c>"w"</c>.</term>
1334             </item>
1335             <item>
1336               <term>Streams originally opened with mode <c>"w"</c> can be reopened with the same mode, or mode <c>"a"</c>.</term>
1337             </item>
1338             <item>
1339               <term>Streams originally opened with mode <c>"r+"</c>, <c>"w+"</c>, or <c>"a+"</c> can be reopened with any mode.</term>
1340             </item>
1341           </list>
1342           <para>The primary use of the <c>freopen</c>() function is to change the file associated with a standard text stream (<see cref="F:Mono.Unix.Native.Stdlib.stderr" />, <see cref="F:Mono.Unix.Native.Stdlib.stdin" />, or <see cref="F:Mono.Unix.Native.Stdlib.stdout" />).
1343 </para>
1344         </remarks>
1345       </Docs>
1346     </Member>
1347     <Member MemberName="fseek">
1348       <MemberSignature Language="C#" Value="public static int fseek (IntPtr stream, long offset, Mono.Unix.Native.SeekFlags origin);" />
1349       <MemberSignature Language="ILAsm" Value=".method public static hidebysig int32 fseek(native int stream, int64 offset, valuetype Mono.Unix.Native.SeekFlags origin) cil managed" />
1350       <MemberType>Method</MemberType>
1351       <AssemblyInfo>
1352         <AssemblyVersion>1.0.5000.0</AssemblyVersion>
1353         <AssemblyVersion>2.0.0.0</AssemblyVersion>
1354         <AssemblyVersion>4.0.0.0</AssemblyVersion>
1355       </AssemblyInfo>
1356       <Attributes>
1357         <Attribute>
1358           <AttributeName>System.CLSCompliant(false)</AttributeName>
1359         </Attribute>
1360       </Attributes>
1361       <ReturnValue>
1362         <ReturnType>System.Int32</ReturnType>
1363       </ReturnValue>
1364       <Parameters>
1365         <Parameter Name="stream" Type="System.IntPtr" />
1366         <Parameter Name="offset" Type="System.Int64" />
1367         <Parameter Name="origin" Type="Mono.Unix.Native.SeekFlags" />
1368       </Parameters>
1369       <Docs>
1370         <param name="stream">
1371           <c>FILE</c> stream to seek.</param>
1372         <param name="offset">Number of bytes to add to the the file offset specified by <paramref name="whence" />.</param>
1373         <param name="origin">File offset to add <paramref name="offset" /> to.</param>
1374         <summary>Set file position for a <c>FILE</c> stream.</summary>
1375         <returns>
1376           <para>Returns <c>0</c> if successful; otherwise <c>-1</c> is returned and <see cref="M:Mono.Unix.Native.Stdlib.GetLastError" /> indicates the error.</para>
1377           <block subset="none" type="usage">
1378             <para>The following errors are specified:</para>
1379             <list type="table">
1380               <listheader>
1381                 <term>Error</term>
1382                 <description>Details</description>
1383               </listheader>
1384               <item>
1385                 <term>
1386                   <see cref="F:Mono.Unix.Native.Errno.EBADF" />
1387                 </term>
1388                 <description>The <paramref name="stream" /> argument is not not a seekable stream</description>
1389               </item>
1390               <item>
1391                 <term>
1392                   <see cref="F:Mono.Unix.Native.Errno.EINVAL" />
1393                 </term>
1394                 <description>The <paramref name="whence" /> argument is invalid or the resulting file-position indicator would be set to a negative value.</description>
1395               </item>
1396               <item>
1397                 <term>
1398                   <see cref="F:Mono.Unix.Native.Errno.EOVERFLOW" />
1399                 </term>
1400                 <description>The resulting file offset would be a value which cannot be represented correctly in an object of type <see cref="System.Int64" /> for <see cref="M:Mono.Unix.Native.Stdlib.fseek" />() and <see cref="M:Mono.Unix.Native.Stdlib.ftell" />().</description>
1401               </item>
1402               <item>
1403                 <term>
1404                   <see cref="F:Mono.Unix.Native.Errno.ESPIPE" />
1405                 </term>
1406                 <description>The file descriptor underlying stream is associated with a pipe or FIFO or file-position indicator value is unspecified (see <see cref="M:Mono.Unix.Native.Stdlib.ungetc" />(3)).</description>
1407               </item>
1408             </list>
1409           </block>
1410           <para>
1411             <c>fseek</c> may also fail for any of the error specified for the routines <see cref="M:Mono.Unix.Native.Stdlib.fflush" />(3), <see cref="M:Mono.Unix.Native.Syscall.fstat" />(2), <see cref="M:Mono.Unix.Native.Syscall.lseek" />(2), and <see cref="M:Mono.Unix.Native.Stdlib.malloc" />(3)
1412 </para>
1413         </returns>
1414         <remarks>The <c>fseek</c>() function sets the file position indicator for the stream pointed to by <paramref name="stream" />.  The new position, measured in bytes, is obtained by adding <paramref name="offset" /> bytes to the position specified by <paramref name="whence" />.  If whence is set to <see cref="F:Mono.Unix.Native.SeekFlags.SEEK_SET" />, <see cref="F:Mono.Unix.Native.SeekFlags.SEEK_CUR" />, or <see cref="F:Mono.Unix.Native.SeekFlags.SEEK_END" />, the offset is relative to the start of the file, the current position indicator, or end-of-file, respectively.  A successful call to the <c>fseek</c>() function clears the end-of-file indicator for the stream and undoes any effects of the <see cref="M:Mono.Unix.Native.Stdlib.ungetc" />(3) and <see cref="M:Mono.Unix.Native.Stdlib.ungetwc" />(3) functions on the same stream.</remarks>
1415       </Docs>
1416     </Member>
1417     <Member MemberName="fsetpos">
1418       <MemberSignature Language="C#" Value="public static int fsetpos (IntPtr stream, Mono.Unix.Native.FilePosition pos);" />
1419       <MemberSignature Language="ILAsm" Value=".method public static hidebysig int32 fsetpos(native int stream, class Mono.Unix.Native.FilePosition pos) cil managed" />
1420       <MemberType>Method</MemberType>
1421       <AssemblyInfo>
1422         <AssemblyVersion>1.0.5000.0</AssemblyVersion>
1423         <AssemblyVersion>2.0.0.0</AssemblyVersion>
1424         <AssemblyVersion>4.0.0.0</AssemblyVersion>
1425       </AssemblyInfo>
1426       <ReturnValue>
1427         <ReturnType>System.Int32</ReturnType>
1428       </ReturnValue>
1429       <Parameters>
1430         <Parameter Name="stream" Type="System.IntPtr" />
1431         <Parameter Name="pos" Type="Mono.Unix.Native.FilePosition" />
1432       </Parameters>
1433       <Docs>
1434         <param name="stream">
1435           <c>FILE</c> stream to set the current file position for.</param>
1436         <param name="pos">The file position to seek to.</param>
1437         <summary>Sets the current file position of a <c>FILE</c> stream.</summary>
1438         <returns>
1439           <para>Returns <c>0</c> if successful; otherwise <c>-1</c> is returned and <see cref="M:Mono.Unix.Native.Stdlib.GetLastError" /> indicates the error.</para>
1440           <block subset="none" type="usage">
1441             <para>The following errors are specified:</para>
1442             <list type="table">
1443               <listheader>
1444                 <term>Error</term>
1445                 <description>Details</description>
1446               </listheader>
1447               <item>
1448                 <term>
1449                   <see cref="F:Mono.Unix.Native.Errno.EBADF" />
1450                 </term>
1451                 <description>The <paramref name="stream" /> argument is not not a seekable stream</description>
1452               </item>
1453               <item>
1454                 <term>
1455                   <see cref="F:Mono.Unix.Native.Errno.EINVAL" />
1456                 </term>
1457                 <description>The <paramref name="whence" /> argument is invalid or the resulting file-position indicator would be set to a negative value.</description>
1458               </item>
1459               <item>
1460                 <term>
1461                   <see cref="F:Mono.Unix.Native.Errno.EOVERFLOW" />
1462                 </term>
1463                 <description>The resulting file offset would be a value which cannot be represented correctly in an object of type <see cref="System.Int64" /> for <see cref="M:Mono.Unix.Native.Stdlib.fseek" />() and <see cref="M:Mono.Unix.Native.Stdlib.ftell" />().</description>
1464               </item>
1465               <item>
1466                 <term>
1467                   <see cref="F:Mono.Unix.Native.Errno.ESPIPE" />
1468                 </term>
1469                 <description>The file descriptor underlying stream is associated with a pipe or FIFO or file-position indicator value is unspecified (see <see cref="M:Mono.Unix.Native.Stdlib.ungetc" />(3)).</description>
1470               </item>
1471             </list>
1472           </block>
1473           <para>
1474             <c>fsetpos</c> may also fail for any of the error specified for the routines <see cref="M:Mono.Unix.Native.Stdlib.fflush" />(3), <see cref="M:Mono.Unix.Native.Syscall.fstat" />(2), <see cref="M:Mono.Unix.Native.Syscall.lseek" />(2), and <see cref="M:Mono.Unix.Native.Stdlib.malloc" />(3)
1475 </para>
1476         </returns>
1477         <remarks>The <c>fsetpos</c>() function is an alternate interfaces for setting the current position in the file, similar to <see cref="M:Mono.Unix.Native.Stdlib.fseek" />(), except that the current position is stored in an opaque object of type <see cref="T:Mono.Unix.Native.FilePosition" /> pointed to by pos.  This provides a portable way to seek to offsets larger than those that can be represented by a long int.  It may also store additional state information in the <see cref="T:Mono.Unix.Native.FilePosition" /> object to facilitate seeking within files containing multibyte characters with state-dependent encodings.
1478 </remarks>
1479       </Docs>
1480     </Member>
1481     <Member MemberName="ftell">
1482       <MemberSignature Language="C#" Value="public static long ftell (IntPtr stream);" />
1483       <MemberSignature Language="ILAsm" Value=".method public static hidebysig pinvokeimpl (&quot;MonoPosixHelper&quot; as &quot;Mono_Posix_Stdlib_ftell&quot; cdecl lasterr)int64 ftell(native int stream) cil managed" />
1484       <MemberType>Method</MemberType>
1485       <AssemblyInfo>
1486         <AssemblyVersion>1.0.5000.0</AssemblyVersion>
1487         <AssemblyVersion>2.0.0.0</AssemblyVersion>
1488         <AssemblyVersion>4.0.0.0</AssemblyVersion>
1489       </AssemblyInfo>
1490       <ReturnValue>
1491         <ReturnType>System.Int64</ReturnType>
1492       </ReturnValue>
1493       <Parameters>
1494         <Parameter Name="stream" Type="System.IntPtr" />
1495       </Parameters>
1496       <Docs>
1497         <param name="stream">
1498           <c>FILE</c> stream to get the file position from.</param>
1499         <summary>Get current file position for <c>FILE</c> stream.</summary>
1500         <returns>
1501           <para>Returns the current file offset if successful; otherwise <c>-1</c> is returned and <see cref="M:Mono.Unix.Native.Stdlib.GetLastError" /> indicates the error.</para>
1502           <block subset="none" type="usage">
1503             <para>The following errors are specified:</para>
1504             <list type="table">
1505               <listheader>
1506                 <term>Error</term>
1507                 <description>Details</description>
1508               </listheader>
1509               <item>
1510                 <term>
1511                   <see cref="F:Mono.Unix.Native.Errno.EBADF" />
1512                 </term>
1513                 <description>The <paramref name="stream" /> argument is not not a seekable stream</description>
1514               </item>
1515               <item>
1516                 <term>
1517                   <see cref="F:Mono.Unix.Native.Errno.EINVAL" />
1518                 </term>
1519                 <description>The <paramref name="whence" /> argument is invalid or the resulting file-position indicator would be set to a negative value.</description>
1520               </item>
1521               <item>
1522                 <term>
1523                   <see cref="F:Mono.Unix.Native.Errno.EOVERFLOW" />
1524                 </term>
1525                 <description>The resulting file offset would be a value which cannot be represented correctly in an object of type <see cref="System.Int64" /> for <see cref="M:Mono.Unix.Native.Stdlib.fseek" />() and <see cref="M:Mono.Unix.Native.Stdlib.ftell" />().</description>
1526               </item>
1527               <item>
1528                 <term>
1529                   <see cref="F:Mono.Unix.Native.Errno.ESPIPE" />
1530                 </term>
1531                 <description>The file descriptor underlying stream is associated with a pipe or FIFO or file-position indicator value is unspecified (see <see cref="M:Mono.Unix.Native.Stdlib.ungetc" />(3)).</description>
1532               </item>
1533             </list>
1534           </block>
1535           <para>
1536             <c>ftell</c> may also fail for any of the error specified for the routines <see cref="M:Mono.Unix.Native.Stdlib.fflush" />(3), <see cref="M:Mono.Unix.Native.Syscall.fstat" />(2), <see cref="M:Mono.Unix.Native.Syscall.lseek" />(2), and <see cref="M:Mono.Unix.Native.Stdlib.malloc" />(3)
1537 </para>
1538         </returns>
1539         <remarks>The <c>ftell</c>() function obtains the current value of the file position indicator for the stream pointed to by <paramref name="stream" />.</remarks>
1540       </Docs>
1541     </Member>
1542     <Member MemberName="fwrite">
1543       <MemberSignature Language="C#" Value="public static ulong fwrite (byte[] ptr, IntPtr stream);" />
1544       <MemberSignature Language="ILAsm" Value=".method public static hidebysig unsigned int64 fwrite(unsigned int8[] ptr, native int stream) cil managed" />
1545       <MemberType>Method</MemberType>
1546       <AssemblyInfo>
1547         <AssemblyVersion>1.0.5000.0</AssemblyVersion>
1548         <AssemblyVersion>2.0.0.0</AssemblyVersion>
1549         <AssemblyVersion>4.0.0.0</AssemblyVersion>
1550       </AssemblyInfo>
1551       <Attributes>
1552         <Attribute>
1553           <AttributeName>System.CLSCompliant(false)</AttributeName>
1554         </Attribute>
1555       </Attributes>
1556       <ReturnValue>
1557         <ReturnType>System.UInt64</ReturnType>
1558       </ReturnValue>
1559       <Parameters>
1560         <Parameter Name="ptr" Type="System.Byte[]" />
1561         <Parameter Name="stream" Type="System.IntPtr" />
1562       </Parameters>
1563       <Docs>
1564         <param name="ptr">The data to write.</param>
1565         <param name="stream">The binary <c>FILE</c> stream to write to.</param>
1566         <summary>Write to a binary <c>FILE</c> stream.</summary>
1567         <returns>
1568           <para>The function <c>fwrite</c>() advance the file position indicator for the stream by the number of bytes written.  It returns the number of objects written. If an error occurs, or the end-of-file is reached, the return value is a short object count (or zero).</para>
1569           <para>The function <c>fwrite</c>() returns a value less than <paramref name="nmemb" /> only if a write error has occurred.
1570 </para>
1571         </returns>
1572         <remarks>
1573           <para>The function <c>fwrite</c>() writes <c><paramref name="ptr" />.Length</c> bytes to the stream pointed to by <paramref name="stream" />, obtaining them from the location given by <paramref name="ptr" />.
1574 </para>
1575         </remarks>
1576       </Docs>
1577     </Member>
1578     <Member MemberName="fwrite">
1579       <MemberSignature Language="C#" Value="public static ulong fwrite (byte[] ptr, ulong size, ulong nmemb, IntPtr stream);" />
1580       <MemberSignature Language="ILAsm" Value=".method public static hidebysig unsigned int64 fwrite(unsigned int8[] ptr, unsigned int64 size, unsigned int64 nmemb, native int stream) cil managed" />
1581       <MemberType>Method</MemberType>
1582       <AssemblyInfo>
1583         <AssemblyVersion>1.0.5000.0</AssemblyVersion>
1584         <AssemblyVersion>2.0.0.0</AssemblyVersion>
1585         <AssemblyVersion>4.0.0.0</AssemblyVersion>
1586       </AssemblyInfo>
1587       <Attributes>
1588         <Attribute>
1589           <AttributeName>System.CLSCompliant(false)</AttributeName>
1590         </Attribute>
1591       </Attributes>
1592       <ReturnValue>
1593         <ReturnType>System.UInt64</ReturnType>
1594       </ReturnValue>
1595       <Parameters>
1596         <Parameter Name="ptr" Type="System.Byte[]" />
1597         <Parameter Name="size" Type="System.UInt64" />
1598         <Parameter Name="nmemb" Type="System.UInt64" />
1599         <Parameter Name="stream" Type="System.IntPtr" />
1600       </Parameters>
1601       <Docs>
1602         <param name="ptr">The data to write.</param>
1603         <param name="size">The size of each object to write.</param>
1604         <param name="nmemb">The number of objects to write.</param>
1605         <param name="stream">The binary <c>FILE</c> stream to write to.</param>
1606         <summary>Write to a binary <c>FILE</c> stream.</summary>
1607         <returns>
1608           <para>The function <c>fwrite</c>() advance the file position indicator for the stream by the number of bytes written.  It returns the number of objects written. If an error occurs, or the end-of-file is reached, the return value is a short object count (or zero).</para>
1609           <para>The function <c>fwrite</c>() returns a value less than <paramref name="nmemb" /> only if a write error has occurred.
1610 </para>
1611         </returns>
1612         <remarks>
1613           <para>The function <c>fwrite</c>() writes <paramref name="nmemb" /> objects, each <paramref name="size" /> bytes long, to the stream pointed to by <paramref name="stream" />, obtaining them from the location given by <paramref name="ptr" />.
1614 </para>
1615         </remarks>
1616       </Docs>
1617     </Member>
1618     <Member MemberName="fwrite">
1619       <MemberSignature Language="C#" Value="public static ulong fwrite (IntPtr ptr, ulong size, ulong nmemb, IntPtr stream);" />
1620       <MemberSignature Language="ILAsm" Value=".method public static hidebysig pinvokeimpl (&quot;MonoPosixHelper&quot; as &quot;Mono_Posix_Stdlib_fwrite&quot; cdecl lasterr)unsigned int64 fwrite(native int ptr, unsigned int64 size, unsigned int64 nmemb, native int stream) cil managed" />
1621       <MemberType>Method</MemberType>
1622       <AssemblyInfo>
1623         <AssemblyVersion>1.0.5000.0</AssemblyVersion>
1624         <AssemblyVersion>2.0.0.0</AssemblyVersion>
1625         <AssemblyVersion>4.0.0.0</AssemblyVersion>
1626       </AssemblyInfo>
1627       <Attributes>
1628         <Attribute>
1629           <AttributeName>System.CLSCompliant(false)</AttributeName>
1630         </Attribute>
1631       </Attributes>
1632       <ReturnValue>
1633         <ReturnType>System.UInt64</ReturnType>
1634       </ReturnValue>
1635       <Parameters>
1636         <Parameter Name="ptr" Type="System.IntPtr" />
1637         <Parameter Name="size" Type="System.UInt64" />
1638         <Parameter Name="nmemb" Type="System.UInt64" />
1639         <Parameter Name="stream" Type="System.IntPtr" />
1640       </Parameters>
1641       <Docs>
1642         <param name="ptr">The data to write.</param>
1643         <param name="size">The size of each object to write.</param>
1644         <param name="nmemb">The number of objects to write.</param>
1645         <param name="stream">The binary <c>FILE</c> stream to write to.</param>
1646         <summary>Write to a binary <c>FILE</c> stream.</summary>
1647         <returns>
1648           <para>The function <c>fwrite</c>() advance the file position indicator for the stream by the number of bytes written.  It returns the number of objects written. If an error occurs, or the end-of-file is reached, the return value is a short object count (or zero).</para>
1649           <para>The function <c>fwrite</c>() returns a value less than <paramref name="nmemb" /> only if a write error has occurred.
1650 </para>
1651         </returns>
1652         <remarks>
1653           <para>The function <c>fwrite</c>() writes <paramref name="nmemb" /> objects, each <paramref name="size" /> bytes long, to the stream pointed to by <paramref name="stream" />, obtaining them from the location given by <paramref name="ptr" />.
1654 </para>
1655         </remarks>
1656       </Docs>
1657     </Member>
1658     <Member MemberName="fwrite">
1659       <MemberSignature Language="C#" Value="public static ulong fwrite (void* ptr, ulong size, ulong nmemb, IntPtr stream);" />
1660       <MemberSignature Language="ILAsm" Value=".method public static hidebysig unsigned int64 fwrite(void* ptr, unsigned int64 size, unsigned int64 nmemb, native int stream) cil managed" />
1661       <MemberType>Method</MemberType>
1662       <AssemblyInfo>
1663         <AssemblyVersion>1.0.5000.0</AssemblyVersion>
1664         <AssemblyVersion>2.0.0.0</AssemblyVersion>
1665         <AssemblyVersion>4.0.0.0</AssemblyVersion>
1666       </AssemblyInfo>
1667       <Attributes>
1668         <Attribute>
1669           <AttributeName>System.CLSCompliant(false)</AttributeName>
1670         </Attribute>
1671       </Attributes>
1672       <ReturnValue>
1673         <ReturnType>System.UInt64</ReturnType>
1674       </ReturnValue>
1675       <Parameters>
1676         <Parameter Name="ptr" Type="System.Void*" />
1677         <Parameter Name="size" Type="System.UInt64" />
1678         <Parameter Name="nmemb" Type="System.UInt64" />
1679         <Parameter Name="stream" Type="System.IntPtr" />
1680       </Parameters>
1681       <Docs>
1682         <param name="ptr">The data to write.</param>
1683         <param name="size">The size of each object to write.</param>
1684         <param name="nmemb">The number of objects to write.</param>
1685         <param name="stream">The binary <c>FILE</c> stream to write to.</param>
1686         <summary>Write to a binary <c>FILE</c> stream.</summary>
1687         <returns>
1688           <para>The function <c>fwrite</c>() advance the file position indicator for the stream by the number of bytes written.  It returns the number of objects written. If an error occurs, or the end-of-file is reached, the return value is a short object count (or zero).</para>
1689           <para>The function <c>fwrite</c>() returns a value less than <paramref name="nmemb" /> only if a write error has occurred.
1690 </para>
1691         </returns>
1692         <remarks>
1693           <para>The function <c>fwrite</c>() writes <paramref name="nmemb" /> objects, each <paramref name="size" /> bytes long, to the stream pointed to by <paramref name="stream" />, obtaining them from the location given by <paramref name="ptr" />.
1694 </para>
1695         </remarks>
1696       </Docs>
1697     </Member>
1698     <Member MemberName="getc">
1699       <MemberSignature Language="C#" Value="public static int getc (IntPtr stream);" />
1700       <MemberSignature Language="ILAsm" Value=".method public static hidebysig pinvokeimpl (&quot;msvcrt&quot; as &quot;getc&quot; cdecl lasterr)int32 getc(native int stream) cil managed" />
1701       <MemberType>Method</MemberType>
1702       <AssemblyInfo>
1703         <AssemblyVersion>1.0.5000.0</AssemblyVersion>
1704         <AssemblyVersion>2.0.0.0</AssemblyVersion>
1705         <AssemblyVersion>4.0.0.0</AssemblyVersion>
1706       </AssemblyInfo>
1707       <ReturnValue>
1708         <ReturnType>System.Int32</ReturnType>
1709       </ReturnValue>
1710       <Parameters>
1711         <Parameter Name="stream" Type="System.IntPtr" />
1712       </Parameters>
1713       <Docs>
1714         <param name="stream">
1715           <c>FILE</c> stream to read a character from.</param>
1716         <summary>Get next character from a <c>FILE</c> input stream.</summary>
1717         <returns>If successful, returns the next requested object from the stream.  Character values are returned as an unsigned char converted to an int.  If the stream is at end-of-file or a read error occurs, the routines return <see cref="M:Mono.Unix.Native.Stdlib.EOF" />.  The routines <see cref="M:Mono.Unix.Native.Stdlib.feof" />(3) and <see cref="M:Mono.Unix.Native.Stdlib.ferror" />(3) must be used to distinguish between end-of-file and error.  If an error occurs, use <see cref="M:Mono.Unix.Native.Stdlib.GetLastError" /> indicates the error.  The end-of-file condition is remembered, even on a terminal, and all subsequent attempts to read will return <see cref="M:Mono.Unix.Native.Stdlib.EOF" /> until the condition is cleared with <see cref="M:Mono.Unix.Native.Stdlib.clearerr" />(3).</returns>
1718         <remarks>The <c>getc</c>() function obtains the next input character (if present) from the stream pointed at by stream, or the next character pushed back on the stream via <see cref="M:Mono.Unix.Native.Stdlib.ungetc" />(3).</remarks>
1719       </Docs>
1720     </Member>
1721     <Member MemberName="getchar">
1722       <MemberSignature Language="C#" Value="public static int getchar ();" />
1723       <MemberSignature Language="ILAsm" Value=".method public static hidebysig pinvokeimpl (&quot;msvcrt&quot; as &quot;getchar&quot; cdecl lasterr)int32 getchar() cil managed" />
1724       <MemberType>Method</MemberType>
1725       <AssemblyInfo>
1726         <AssemblyVersion>1.0.5000.0</AssemblyVersion>
1727         <AssemblyVersion>2.0.0.0</AssemblyVersion>
1728         <AssemblyVersion>4.0.0.0</AssemblyVersion>
1729       </AssemblyInfo>
1730       <ReturnValue>
1731         <ReturnType>System.Int32</ReturnType>
1732       </ReturnValue>
1733       <Parameters />
1734       <Docs>
1735         <summary>Get next character from standard input.</summary>
1736         <returns>If successful, returns the next requested object from the stream.  Character values are returned as an unsigned char converted to an int.  If the stream is at end-of-file or a read error occurs, the routines return <see cref="M:Mono.Unix.Native.Stdlib.EOF" />.  The routines <see cref="M:Mono.Unix.Native.Stdlib.feof" />(3) and <see cref="M:Mono.Unix.Native.Stdlib.ferror" />(3) must be used to distinguish between end-of-file and error.  If an error occurs, use <see cref="M:Mono.Unix.Native.Stdlib.GetLastError" /> indicates the error.  The end-of-file condition is remembered, even on a terminal, and all subsequent attempts to read will return <see cref="M:Mono.Unix.Native.Stdlib.EOF" /> until the condition is cleared with <see cref="M:Mono.Unix.Native.Stdlib.clearerr" />(3).</returns>
1737         <remarks>The <c>getchar</c>() function is equivalent to <c><see cref="M:Mono.Unix.Native.Stdlib.getc" /> (<see cref="F:Mono.Unix.Native.Stdlib.stdin" />)</c>, 
1738 obtaining the next input character (if present) from <see cref="F:Mono.Unix.Native.Stdlib.stdin" />, or the next character pushed back on <c>stdin</c> via <see cref="M:Mono.Unix.Native.Stdlib.ungetc" />(3).</remarks>
1739       </Docs>
1740     </Member>
1741     <Member MemberName="getenv">
1742       <MemberSignature Language="C#" Value="public static string getenv (string name);" />
1743       <MemberSignature Language="ILAsm" Value=".method public static hidebysig string getenv(string name) cil managed" />
1744       <MemberType>Method</MemberType>
1745       <AssemblyInfo>
1746         <AssemblyVersion>1.0.5000.0</AssemblyVersion>
1747         <AssemblyVersion>2.0.0.0</AssemblyVersion>
1748         <AssemblyVersion>4.0.0.0</AssemblyVersion>
1749       </AssemblyInfo>
1750       <ReturnValue>
1751         <ReturnType>System.String</ReturnType>
1752       </ReturnValue>
1753       <Parameters>
1754         <Parameter Name="name" Type="System.String" />
1755       </Parameters>
1756       <Docs>
1757         <param name="name">The environment variable to read.</param>
1758         <summary>Read an environment variable.</summary>
1759         <returns>The <c>getenv</c>() function returns the value of the environment variable as a string.  If the variable name is not in the current environment, <see langword="null" /> is returned.</returns>
1760         <remarks>The <c>getenv</c>() function obtains the current value of the environment variable, <paramref name="name" />.</remarks>
1761       </Docs>
1762     </Member>
1763     <Member MemberName="GetLastError">
1764       <MemberSignature Language="C#" Value="public static Mono.Unix.Native.Errno GetLastError ();" />
1765       <MemberSignature Language="ILAsm" Value=".method public static hidebysig valuetype Mono.Unix.Native.Errno GetLastError() cil managed" />
1766       <MemberType>Method</MemberType>
1767       <AssemblyInfo>
1768         <AssemblyVersion>1.0.5000.0</AssemblyVersion>
1769         <AssemblyVersion>2.0.0.0</AssemblyVersion>
1770         <AssemblyVersion>4.0.0.0</AssemblyVersion>
1771       </AssemblyInfo>
1772       <ReturnValue>
1773         <ReturnType>Mono.Unix.Native.Errno</ReturnType>
1774       </ReturnValue>
1775       <Parameters />
1776       <Docs>
1777         <summary>Reads and translates <c>errno</c>.</summary>
1778         <returns>To be added.</returns>
1779         <remarks>To be added.</remarks>
1780       </Docs>
1781     </Member>
1782     <Member MemberName="L_tmpnam">
1783       <MemberSignature Language="C#" Value="public static readonly int L_tmpnam;" />
1784       <MemberSignature Language="ILAsm" Value=".field public static initonly int32 L_tmpnam" />
1785       <MemberType>Field</MemberType>
1786       <AssemblyInfo>
1787         <AssemblyVersion>1.0.5000.0</AssemblyVersion>
1788         <AssemblyVersion>2.0.0.0</AssemblyVersion>
1789         <AssemblyVersion>4.0.0.0</AssemblyVersion>
1790       </AssemblyInfo>
1791       <Attributes>
1792         <Attribute>
1793           <AttributeName>System.CLSCompliant(false)</AttributeName>
1794         </Attribute>
1795       </Attributes>
1796       <ReturnValue>
1797         <ReturnType>System.Int32</ReturnType>
1798       </ReturnValue>
1799       <MemberValue>20</MemberValue>
1800       <Docs>
1801         <summary>The number of characters filled by <see cref="M:Mono.Unix.Native.Stdlib.tmpnam" />(3).</summary>
1802         <remarks>To be added.</remarks>
1803       </Docs>
1804     </Member>
1805     <Member MemberName="malloc">
1806       <MemberSignature Language="C#" Value="public static IntPtr malloc (ulong size);" />
1807       <MemberSignature Language="ILAsm" Value=".method public static hidebysig pinvokeimpl (&quot;MonoPosixHelper&quot; as &quot;Mono_Posix_Stdlib_malloc&quot; cdecl lasterr)native int malloc(unsigned int64 size) cil managed" />
1808       <MemberType>Method</MemberType>
1809       <AssemblyInfo>
1810         <AssemblyVersion>1.0.5000.0</AssemblyVersion>
1811         <AssemblyVersion>2.0.0.0</AssemblyVersion>
1812         <AssemblyVersion>4.0.0.0</AssemblyVersion>
1813       </AssemblyInfo>
1814       <Attributes>
1815         <Attribute>
1816           <AttributeName>System.CLSCompliant(false)</AttributeName>
1817         </Attribute>
1818       </Attributes>
1819       <ReturnValue>
1820         <ReturnType>System.IntPtr</ReturnType>
1821       </ReturnValue>
1822       <Parameters>
1823         <Parameter Name="size" Type="System.UInt64" />
1824       </Parameters>
1825       <Docs>
1826         <param name="size">Amount of memory to allocate.</param>
1827         <summary>Allocate memory.</summary>
1828         <returns>The <c>malloc</c>() function returns a pointer to the allocated memory if successful; otherwise a <see cref="F:System.IntPtr.Zero" /> pointer is returned and <see cref="M:Mono.Unix.Native.Stdlib.GetLastError" /> returns <see cref="F:Mono.Unix.Native.Errno.ENOMEM" />.</returns>
1829         <remarks>
1830           <para>The <c>malloc</c>() function allocates <paramref name="size" /> bytes of memory.  The allocated space is suitably aligned (after possible pointer coercion) for storage of any type of object.  If the space is at least <paramref name="pagesize" /> bytes in length (see <see cref="M:Mono.Unix.Native.Syscall.getpagesize" />(3)), the returned memory will be page boundary aligned as well.  If <c>malloc</c>() fails, <see cref="F:System.IntPtr.Zero" /> is returned.</para>
1831           <para>You should <see cref="M:Mono.Unix.Native.Stdlib.free" /> the return value to avoid a memory leak.</para>
1832           <para>Note that <c>malloc</c>() does NOT normally initialize the returned memory to zero bytes.
1833 </para>
1834         </remarks>
1835       </Docs>
1836     </Member>
1837     <Member MemberName="MB_CUR_MAX">
1838       <MemberSignature Language="C#" Value="public static readonly int MB_CUR_MAX;" />
1839       <MemberSignature Language="ILAsm" Value=".field public static initonly int32 MB_CUR_MAX" />
1840       <MemberType>Field</MemberType>
1841       <AssemblyInfo>
1842         <AssemblyVersion>1.0.5000.0</AssemblyVersion>
1843         <AssemblyVersion>2.0.0.0</AssemblyVersion>
1844         <AssemblyVersion>4.0.0.0</AssemblyVersion>
1845       </AssemblyInfo>
1846       <Attributes>
1847         <Attribute>
1848           <AttributeName>System.CLSCompliant(false)</AttributeName>
1849         </Attribute>
1850       </Attributes>
1851       <ReturnValue>
1852         <ReturnType>System.Int32</ReturnType>
1853       </ReturnValue>
1854       <MemberValue>6</MemberValue>
1855       <Docs>
1856         <summary>To be added.</summary>
1857         <remarks>To be added.</remarks>
1858       </Docs>
1859     </Member>
1860     <Member MemberName="perror">
1861       <MemberSignature Language="C#" Value="public static int perror (string s);" />
1862       <MemberSignature Language="ILAsm" Value=".method public static hidebysig int32 perror(string s) cil managed" />
1863       <MemberType>Method</MemberType>
1864       <AssemblyInfo>
1865         <AssemblyVersion>1.0.5000.0</AssemblyVersion>
1866         <AssemblyVersion>2.0.0.0</AssemblyVersion>
1867         <AssemblyVersion>4.0.0.0</AssemblyVersion>
1868       </AssemblyInfo>
1869       <ReturnValue>
1870         <ReturnType>System.Int32</ReturnType>
1871       </ReturnValue>
1872       <Parameters>
1873         <Parameter Name="s" Type="System.String" />
1874       </Parameters>
1875       <Docs>
1876         <param name="s">The error message prefix to print.</param>
1877         <summary>Print an error message to <see cref="F:Mono.Unix.Native.Stdlib.stderr" />.</summary>
1878         <returns>The <c>perror</c>() function returns the value 0 if successful; otherwise the value -1 is returned and <see cref="M:Mono.Unix.Native.Stdlib.GetLastError" /> indicates the error.</returns>
1879         <remarks>The <c>perror</c>() function finds the error message corresponding to the current value of <see cref="M:Mono.Unix.Native.Stdlib.GetLastError" /> and writes it, followed by a newline, to the standard error file descriptor.  If the argument string is not <see langword="null" /> and does not point to the null character, this string is prepended to the message string and separated from it by a colon and space ("<c>: </c>"); otherwise, only the error message string is printed.</remarks>
1880       </Docs>
1881     </Member>
1882     <Member MemberName="printf">
1883       <MemberSignature Language="C#" Value="public static int printf (string message);" />
1884       <MemberSignature Language="ILAsm" Value=".method public static hidebysig int32 printf(string message) cil managed" />
1885       <MemberType>Method</MemberType>
1886       <AssemblyInfo>
1887         <AssemblyVersion>1.0.5000.0</AssemblyVersion>
1888         <AssemblyVersion>2.0.0.0</AssemblyVersion>
1889         <AssemblyVersion>4.0.0.0</AssemblyVersion>
1890       </AssemblyInfo>
1891       <ReturnValue>
1892         <ReturnType>System.Int32</ReturnType>
1893       </ReturnValue>
1894       <Parameters>
1895         <Parameter Name="message" Type="System.String" />
1896       </Parameters>
1897       <Docs>
1898         <param name="message">The message to print.</param>
1899         <summary>Prints a message on <see cref="F:Mono.Unix.Native.Stdlib.stdout" />.</summary>
1900         <returns>Returns the number of characters printed or a negative value if an error occurs, and <see cref="M:Mono.Unix.Native.Stdlib.GetLastError" /> indicates the error.
1901
1902 <block subset="none" type="usage"><para>The following errors are specified:
1903   </para><list type="table"><listheader><term>Error</term><description>Details</description></listheader><item><term><see cref="F:Mono.Unix.Native.Errno.EILSEQ" /></term><description>An invalid wide character code was encountered</description></item><item><term><see cref="F:Mono.Unix.Native.Errno.ENOMEM" /></term><description>Insufficient storage space is available.</description></item></list><para>Any of the errors documented for the <see cref="M:Mono.Unix.Native.Syscall.write" /> system call may also be returned.
1904 </para></block></returns>
1905         <remarks />
1906       </Docs>
1907     </Member>
1908     <Member MemberName="printf">
1909       <MemberSignature Language="C#" Value="public static int printf (string format, object[] parameters);" />
1910       <MemberSignature Language="ILAsm" Value=".method public static hidebysig int32 printf(string format, object[] parameters) cil managed" />
1911       <MemberType>Method</MemberType>
1912       <AssemblyInfo>
1913         <AssemblyVersion>1.0.5000.0</AssemblyVersion>
1914         <AssemblyVersion>2.0.0.0</AssemblyVersion>
1915         <AssemblyVersion>4.0.0.0</AssemblyVersion>
1916       </AssemblyInfo>
1917       <Attributes>
1918         <Attribute>
1919           <AttributeName>System.Obsolete("Not necessarily portable due to cdecl restrictions.
1920 Use printf (string) instead.")</AttributeName>
1921         </Attribute>
1922       </Attributes>
1923       <ReturnValue>
1924         <ReturnType>System.Int32</ReturnType>
1925       </ReturnValue>
1926       <Parameters>
1927         <Parameter Name="format" Type="System.String" />
1928         <Parameter Name="parameters" Type="System.Object[]">
1929           <Attributes>
1930             <Attribute>
1931               <AttributeName>System.ParamArray</AttributeName>
1932             </Attribute>
1933           </Attributes>
1934         </Parameter>
1935       </Parameters>
1936       <Docs>
1937         <param name="format">The message format.</param>
1938         <param name="parameters">Arguments for the message format.</param>
1939         <summary>Prints a message on <see cref="F:Mono.Unix.Native.Stdlib.stdout" />.</summary>
1940         <returns>Returns the number of characters printed or a negative value if an error occurs, and <see cref="M:Mono.Unix.Native.Stdlib.GetLastError" /> indicates the error.
1941
1942 <block subset="none" type="usage"><para>The following errors are specified:
1943   </para><list type="table"><listheader><term>Error</term><description>Details</description></listheader><item><term><see cref="F:Mono.Unix.Native.Errno.EILSEQ" /></term><description>An invalid wide character code was encountered</description></item><item><term><see cref="F:Mono.Unix.Native.Errno.ENOMEM" /></term><description>Insufficient storage space is available.</description></item></list><para>Any of the errors documented for the <see cref="M:Mono.Unix.Native.Syscall.write" /> system call may also be returned.
1944 </para></block></returns>
1945         <remarks>
1946           <para>The <c>printf</c>() family of functions produces output according to a format as described below.  <c>printf</c>() writes output to the given output <paramref name="stream" />.</para>
1947           <para>These functions write the output under the control of a <paramref name="format" /> string that specifies how subsequent arguments (or arguments accessed via the variable-length argument facilities of <c>stdarg</c>(3)) are converted for output.
1948 </para>
1949           <para>The format string is composed of zero or more directives: ordinary characters (not %), which are copied unchanged to the output stream; and conversion specifications, each of which results in fetching zero or more subsequent arguments.  Each conversion specification is introduced by the % character.  The arguments must correspond properly (after type promotion) with the conversion specifier.  After the %, the following appear in sequence:</para>
1950           <list type="bullet">
1951             <item>
1952               <term>An optional field, consisting of a decimal digit string followed by a <c>$</c>, specifying the next argument to access.  If this field is not provided, the argument following the last argument accessed will be used.  Arguments are numbered starting at <c>1</c>.  If unaccessed arguments in the format string are interspersed with ones that are accessed the results will be indeterminate.</term>
1953             </item>
1954             <item>
1955               <term>Zero or more of the following flags:
1956
1957 <list type="table"><listheader><term>Flag</term><description>Description</description></listheader><item><term>'<c>#</c>'</term><description>The value should be converted to an "alternate form".  For <c>c</c>, <c>d</c>, <c>i</c>, <c>n</c>, <c>p</c>, <c>s</c>, and <c>u</c> conversions, this option has no effect.  For <c>o</c> conversions, the precision of the number is increased to force the first character of the output string to a zero (except if a zero value is printed with an explicit precision of zero).  For <c>x</c> and <c>X</c> conversions, a non-zero result has the string '<c>0x</c>' (or '<c>0X</c>' for <c>X</c> conversions) prepended to it. For <c>a</c>, <c>A</c>, <c>e</c>, <c>E</c>, <c>f</c>, <c>F</c>, <c>g</c>, and <c>G</c> conversions, the result will always contain a decimal point, even if no digits follow it (normally, a decimal point appears in the results of those conversions only if a digit follows).  For <c>g</c> and <c>G</c> conversions, trailing zeros are not removed from the result as they would otherwise be.</description></item><item><term>'<c>0</c>' (zero)</term><description>Zero padding.  For all conversions except <c>n</c>, the converted value is padded on the left with zeros rather than blanks.  If a precision is given with a numeric conversion (<c>d</c>, <c>i</c>, <c>o</c>, <c>u</c>, <c>i</c>, <c>x</c>, and <c>X</c>), the 0 flag is ignored.</description></item><item><term>'<c>-</c>'</term><description>A negative field width flag; the converted value is to be left adjusted on the field boundary.  Except for <c>n</c> conversions, the converted value is padded on the right with blanks, rather than on the left with blanks or zeros.  A <c>-</c> overrides a <c>0</c> if both are given.</description></item><item><term>'<c />' (space)</term><description>A blank should be left before a positive number produced by a signed conversion (<c>a</c>, <c>A</c>, <c>d</c>, <c>e</c>, <c>E</c>, <c>f</c>, <c>F</c>, <c>g</c>, <c>G</c>, or <c>i</c>).</description></item><item><term>'<c>+</c>'</term><description>A sign must always be placed before a number produced by a signed conversion.  A <c>+</c> overrides a space if both are used.</description></item><item><term>'<c>'</c>'</term><description>Decimal conversions (<c>d</c>, <c>u</c>, or <c>i</c>) or the integral portion of a floating point conversion (<c>f</c> or <c>F</c>) should be grouped and separated by thousands using the non-monetary separator returned by <see cref="M:Mono.Unix.Native.Syscall.localeconv" />(3).</description></item></list></term>
1958             </item>
1959             <item>
1960               <term>An optional decimal digit string specifying a minimum field width.  If the converted value has fewer characters than the field width, it will be padded with spaces on the left (or right, if the left-adjustment flag has been given) to fill out the field width.</term>
1961             </item>
1962             <item>
1963               <term>An optional precision, in the form of a period . followed by an optional digit string.  If the digit string is omitted, the precision is taken as zero.  This gives the minimum number of digits to appear for <c>d</c>, <c>i</c>, <c>o</c>, <c>u</c>, <c>x</c>, and <c>X</c> conversions, the number of digits to appear after the decimal-point for <c>a</c>, <c>A</c>, <c>e</c>, <c>E</c>, <c>f</c>, and <c>F</c> conversions, the maximum number of significant digits for <c>g</c> and <c>G</c> conversions, or the maximum number of characters to be printed from a string for <c>s</c> conversions.</term>
1964             </item>
1965             <item>
1966               <term>An optional length modifier, that specifies the size of the argument.  The following length modifiers are valid for the <c>d</c>, <c>i</c>, <c>n</c>, <c>o</c>, <c>u</c>, <c>x</c>, or <c>X</c> conversion:
1967
1968 <list type="table"><listheader><term>Modifier</term><description><c>d</c>, <c>i</c></description><description><c>o, u, x, X</c></description><description><c>n</c></description></listheader><item><term><c>hh</c></term><description><c>signed char</c></description><description><c>unsigned char</c></description><description><c>signed char *</c></description></item><item><term><c>h</c></term><description><c>short</c></description><description><c>unsigned short</c></description><description><c>short *</c></description></item><item><term><c>l</c> (ell)</term><description><c>long</c></description><description><c>unsigned long</c></description><description><c>unsigned long *</c></description></item><item><term><c>ll</c> (ell ell)</term><description><c>long long</c></description><description><c>unsigned long long</c></description><description><c>long long *</c></description></item><item><term><c>j</c></term><description><c>intmax_t</c></description><description><c>uintmax_t</c></description><description><c>intmax_t *</c></description></item><item><term><c>t</c></term><description><c>ptrdiff_t</c></description><description>(see note)</description><description><c>ptrdiff_t *</c></description></item><item><term><c>z</c></term><description>(see note)</description><description><c>size_t</c></description><description>(see note)</description></item><item><term><c>q</c><i>(deprecated)</i></term><description><c>quad_t</c></description><description><c>u_quad_t</c></description><description><c>quad_t *</c></description></item></list><block subset="none" type="note"><para>the <c>t</c> modifier, when applied to a <c>o</c>, <c>u</c>, <c>x</c>, or <c>X</c> conversion, indicates that the argument is of an unsigned type equivalent in size to a <c>ptrdiff_t</c>.  The <c>z</c> modifier, when applied to a <c>d</c> or <c>i</c> conversion, indicates that the argument is of a signed type equivalent in size to a <c>size_t</c>.  Similarly, when applied to an <c>n</c> conversion, it indicates that the argument is a pointer to a signed type equivalent in size to a <c>size_t</c>.
1969   </para></block><para>The following length modifier is valid for the <c>a</c>, <c>A</c>, <c>e</c>, <c>E</c>, <c>f</c>, <c>F</c>, <c>g</c>, or <c>G</c> conversion:</para><list type="table"><listheader><term>Modifier</term><description><c>a, A, e, E, f, F, g, G</c></description></listheader><item><term><c>L</c></term><description><c>long double</c></description></item></list><para>The following length modifier is valid for the <c>c</c> or <c>s</c> conversion:</para><list type="table"><listheader><term>Modifier</term><description><c>c</c></description><description><c>s</c></description></listheader><item><term><c>l</c> (ell)</term><description><c>wint_t</c></description><description><c>wchar_t *</c></description></item></list></term>
1970             </item>
1971             <item>
1972               <term>A character that specifies the type of conversion to be applied.</term>
1973             </item>
1974           </list>
1975           <para>A field width or precision, or both, may be indicated by an asterisk '<c>*</c>' or an asterisk followed by one or more decimal digits and a '<c>$</c>' instead of a digit string.  In this case, an <i>int</i> argument supplies the field width or precision.  A negative field width is treated as a left adjustment flag followed by a positive field width; a negative precision is treated as though it were missing.  If a single format directive mixes positional (<c>nn$</c>) and non-positional arguments, the results are undefined
1976 </para>
1977           <para>The conversion specifiers and their meanings are:</para>
1978           <list type="table">
1979             <listheader>
1980               <term>Specifier</term>
1981               <description>Meaning</description>
1982             </listheader>
1983             <item>
1984               <term>
1985                 <c>diouxX</c>
1986               </term>
1987               <description>The <c>int</c> (or appropriate variant) argument is converted to signed decimal (<c>d</c> and <c>i</c>), unsigned octal (<c>o</c>), unsigned decimal (<c>u</c>), or unsigned hexadecimal (<c>x</c> and <c>X</c>) notation.  The letters "<c>abcdef</c>" are used for <c>x</c> conversions; the letters "<c>ABCDEF</c>" are used for <c>X</c> conversions.  The precision, if any, gives the minimum number of digits that must appear; if the converted value requires fewer digits, it is padded on the left with zeros.</description>
1988             </item>
1989             <item>
1990               <term>
1991                 <c>DOU</c>
1992               </term>
1993               <description>The <c>long int</c> argument is converted to signed decimal, unsigned octal, or unsigned decimal, as if the format had been <c>ld</c>, <c>lo</c>, or <c>lu</c> respectively.  These conversion characters are deprecated, and will eventually disappear.</description>
1994             </item>
1995             <item>
1996               <term>
1997                 <c>eE</c>
1998               </term>
1999               <description>The <c>double</c> argument is rounded and converted in the style <c>[-]d.ddde±dd</c> where there is one digit before the decimal-point character and the number of digits after it is equal to the precision; if the precision is missing, it is taken as 6; if the precision is zero, no decimal-point character appears.  An <c>E</c> conversion uses the letter '<c>E</c>' (rather than '<c>e</c>') to introduce the exponent.  The exponent always contains at least two digits; if the value is zero, the exponent is 00.</description>
2000               <para>For <c>a</c>, <c>A</c>, <c>e</c>, <c>E</c>, <c>f</c>, <c>F</c>, <c>g</c>, and <c>G</c> conversions, positive and negative infinity are represented as <c>inf</c> and <c>-inf</c> respectively when using the lowercase conversion character, and <c>INF</c> and <c>-INF</c> respectively when using the uppercase conversion character.  Similarly, <c>NaN</c> is represented as <c>nan</c> when using the lowercase conversion, and <c>NAN</c> when using the uppercase conversion.</para>
2001             </item>
2002             <item>
2003               <term>
2004                 <c>fF</c>
2005               </term>
2006               <description>The <c>double</c> argument is rounded and converted to decimal notation in the style <c>[-]ddd.ddd</c>, where the number of digits after the decimal-point character is equal to the precision specification.  If the precision is missing, it is taken as 6; if the precision is explicitly zero, no decimal-point character appears. If a decimal point appears, at least one digit appears before it.</description>
2007             </item>
2008             <item>
2009               <term>
2010                 <c>gG</c>
2011               </term>
2012               <description>The <c>double</c> argument is converted in style <c>f</c> or <c>e</c> (or <c>F</c> or <c>E</c> for <c>G</c> conversions). The precision specifies the number of significant digits.  If the precision is missing, 6 digits are given; if the precision is zero, it is treated as 1. Style <c>e</c> is used if the exponent from its conversion is less than -4 or greater than or equal to the precision.  Trailing zeros are removed from the fractional part of the result; a decimal point appears only if it is followed by at least one digit.</description>
2013             </item>
2014             <item>
2015               <term>
2016                 <c>aA</c>
2017               </term>
2018               <description>The <c>double</c> argument is rounded and converted to hexadecimal notation in the style <c>[-]0xh.hhhp[±]d</c>, where the number of digits after the hexadecimal-point character is equal to the precision specification.  If the precision is missing, it is taken as enough to represent the floating-point number exactly, and no rounding occurs.  If the precision is zero, no hexadecimal-point character appears.  The <c>p</c> is a literal character '<c>p</c>', and the exponent consists of a positive or negative sign followed by a decimal number representing an exponent of 2.  The <c>A</c> conversion uses the prefix "<c>0X</c>" (rather than "<c>0x</c>"), the letters "<c>ABCDEF</c>" (rather than "<c>abcdef</c>") to represent the hex digits, and the letter '<c>P</c>' (rather than '<c>p</c>') to separate the mantissa and exponent.
2019
2020 <para>Note that there may be multiple valid ways to represent floating-point numbers in this hexadecimal format.  For example, <c>0x3.24p+0</c>, <c>0x6.48p-1</c> and <c>0xc.9p-2</c> are all equivalent.  The format chosen depends on the internal representation of the number, but the implementation guarantees that the length of the mantissa will be minimized.  Zeroes are always represented with a mantissa of 0 (preceded by a '<c>-</c>' if appropriate) and an exponent of +0.
2021 </para></description>
2022             </item>
2023             <item>
2024               <term>
2025                 <c>C</c>
2026               </term>
2027               <description>Treated as <c>c</c> with the <c>l</c> (ell) modifier.</description>
2028             </item>
2029             <item>
2030               <term>
2031                 <c>c</c>
2032               </term>
2033               <description>The <c>int</c> argument is converted to an <c>unsigned char</c>, and the resulting character is written.
2034
2035 <para>If the <c>l</c> (ell) modifier is used, the <c>wint_t</c> argument shall be converted to a <c>wchar_t</c>, and the (potentially multi-byte) sequence representing the single wide character is written, including any shift sequences.  If a shift sequence is used, the shift state is also restored to the original state after the character.
2036 </para></description>
2037             </item>
2038             <item>
2039               <term>
2040                 <c>S</c>
2041               </term>
2042               <description>Treated as <c>s</c> with the <c>l</c> (ell) modifier.</description>
2043             </item>
2044             <item>
2045               <term>
2046                 <c>s</c>
2047               </term>
2048               <description>
2049 The <c>char *</c> argument is expected to be a pointer to an array of character type (pointer to a string).  Characters from the array are written up to (but not including) a terminating NUL character; if a precision is specified, no more than the number specified are written.  If a precision is given, no null character need be present; if the precision is not specified, or is greater than the size of the array, the array must contain a terminating NUL character.
2050
2051 <para>If the <c>l</c> (ell) modifier is used, the <c>wchar_t *</c> argument is expected to be a pointer to an array of wide characters (pointer to a wide string).  For each wide character in the string, the (potentially multi-byte) sequence representing the wide character is written, including any shift sequences.  If any shift sequence is used, the shift state is also restored to the original state after the string.  Wide characters from the array are written up to (but not including) a terminating wide NUL character; if a precision is specified, no more than the number of bytes specified are written (including shift sequences).  Partial characters are never written.  If a precision is given, no null character need be present; if the precision is not specified, or is greater than the number of bytes required to render the multibyte representation of the string, the array must contain a terminating wide NUL character.</para></description>
2052             </item>
2053             <item>
2054               <term>
2055                 <c>p</c>
2056               </term>
2057               <description>The <c>void *</c> pointer argument is printed in hexadecimal (as if by '<c>%#x</c>' or '<c>%#lx</c>').</description>
2058             </item>
2059             <item>
2060               <term>
2061                 <c>n</c>
2062               </term>
2063               <description>The number of characters written so far is stored into the integer indicated by the <c>int *</c> (or variant) pointer argument.  No argument is converted.</description>
2064             </item>
2065             <item>
2066               <term>
2067                 <c>%</c>
2068               </term>
2069               <description> A '<c>%</c>' is written.  No argument is converted.  The complete conversion specification is '<c>%%</c>'.</description>
2070             </item>
2071           </list>
2072           <para>The decimal point character is defined in the program's locale (category <c>LC_NUMERIC</c>)
2073 </para>
2074           <para>In no case does a non-existent or small field width cause truncation of a numeric field; if the result of a conversion is wider than the field width, the field is expanded to contain the conversion result.</para>
2075         </remarks>
2076       </Docs>
2077     </Member>
2078     <Member MemberName="putc">
2079       <MemberSignature Language="C#" Value="public static int putc (int c, IntPtr stream);" />
2080       <MemberSignature Language="ILAsm" Value=".method public static hidebysig pinvokeimpl (&quot;msvcrt&quot; as &quot;putc&quot; cdecl lasterr)int32 putc(int32 c, native int stream) cil managed" />
2081       <MemberType>Method</MemberType>
2082       <AssemblyInfo>
2083         <AssemblyVersion>1.0.5000.0</AssemblyVersion>
2084         <AssemblyVersion>2.0.0.0</AssemblyVersion>
2085         <AssemblyVersion>4.0.0.0</AssemblyVersion>
2086       </AssemblyInfo>
2087       <ReturnValue>
2088         <ReturnType>System.Int32</ReturnType>
2089       </ReturnValue>
2090       <Parameters>
2091         <Parameter Name="c" Type="System.Int32" />
2092         <Parameter Name="stream" Type="System.IntPtr" />
2093       </Parameters>
2094       <Docs>
2095         <param name="c">The charater to write.</param>
2096         <param name="stream">The <c>FILE</c> stream to write to.</param>
2097         <summary>Output a character to a <c>FILE</c> stream.</summary>
2098         <returns>Returns the character written.  If an error occurrs, the value <see cref="F:Mono.Unix.Native.Stdlib.EOF" /> is returned.</returns>
2099         <remarks>The <c>putc</c>() function writes the character <paramref name="c" /> (converted to an "unsigned char") to the output stream pointed to by <paramref name="stream" />.</remarks>
2100       </Docs>
2101     </Member>
2102     <Member MemberName="putchar">
2103       <MemberSignature Language="C#" Value="public static int putchar (int c);" />
2104       <MemberSignature Language="ILAsm" Value=".method public static hidebysig pinvokeimpl (&quot;msvcrt&quot; as &quot;putchar&quot; cdecl lasterr)int32 putchar(int32 c) cil managed" />
2105       <MemberType>Method</MemberType>
2106       <AssemblyInfo>
2107         <AssemblyVersion>1.0.5000.0</AssemblyVersion>
2108         <AssemblyVersion>2.0.0.0</AssemblyVersion>
2109         <AssemblyVersion>4.0.0.0</AssemblyVersion>
2110       </AssemblyInfo>
2111       <ReturnValue>
2112         <ReturnType>System.Int32</ReturnType>
2113       </ReturnValue>
2114       <Parameters>
2115         <Parameter Name="c" Type="System.Int32" />
2116       </Parameters>
2117       <Docs>
2118         <param name="c">The charater to write.</param>
2119         <summary>Output a character to a <see cref="F:Mono.Unix.Native.Stdlib.stdout" />.</summary>
2120         <returns>Returns the character written.  If an error occurrs, the value <see cref="F:Mono.Unix.Native.Stdlib.EOF" /> is returned.</returns>
2121         <remarks>The <c>putchar</c>() function is identical to <see cref="M:Mono.Unix.Native.Stdlib.putc" />() with an output stream of <see cref="F:Mono.Unix.Native.Stdlib.stdout" />.</remarks>
2122       </Docs>
2123     </Member>
2124     <Member MemberName="puts">
2125       <MemberSignature Language="C#" Value="public static int puts (string s);" />
2126       <MemberSignature Language="ILAsm" Value=".method public static hidebysig pinvokeimpl (&quot;msvcrt&quot; as &quot;puts&quot; cdecl lasterr)int32 puts(string s) cil managed" />
2127       <MemberType>Method</MemberType>
2128       <AssemblyInfo>
2129         <AssemblyVersion>1.0.5000.0</AssemblyVersion>
2130         <AssemblyVersion>2.0.0.0</AssemblyVersion>
2131         <AssemblyVersion>4.0.0.0</AssemblyVersion>
2132       </AssemblyInfo>
2133       <ReturnValue>
2134         <ReturnType>System.Int32</ReturnType>
2135       </ReturnValue>
2136       <Parameters>
2137         <Parameter Name="s" Type="System.String" />
2138       </Parameters>
2139       <Docs>
2140         <param name="s">To be added.</param>
2141         <summary>Output a line to <see cref="F:Mono.Unix.Native.Stdlib.stdout" />.</summary>
2142         <returns>
2143           <para>The <c>fputs</c> function returns <c>0</c> on success and <see cref="F:Mono.Unix.Native.Stdlib.EOF" /> on error, and <see cref="M:Mono.Unix.Native.Stdlib.GetLastError" /> indicates the error.</para>
2144           <block subset="none" type="usage">
2145             <para>The following errors are specified:</para>
2146             <list type="table">
2147               <listheader>
2148                 <term>Error</term>
2149                 <description>Details</description>
2150               </listheader>
2151               <item>
2152                 <term>
2153                   <see cref="F:Mono.Unix.Native.Errno.EBADF" />
2154                 </term>
2155                 <description>The <paramref name="stream" /> argument not a writable stream.</description>
2156               </item>
2157             </list>
2158           </block>
2159           <para>
2160             <c>fputs</c> may also fail for any of the errors specified for the routines <see cref="M:Mono.Unix.Native.Syscall.write" />(2).
2161 </para>
2162         </returns>
2163         <remarks>The function <c>puts</c>() writes the string <paramref name="s" />, and a terminating newline character, to the stream <see cref="F:Mono.Unix.Native.Stdlib.stdout" />.</remarks>
2164       </Docs>
2165     </Member>
2166     <Member MemberName="raise">
2167       <MemberSignature Language="C#" Value="public static int raise (Mono.Unix.Native.RealTimeSignum rts);" />
2168       <MemberSignature Language="ILAsm" Value=".method public static hidebysig int32 raise(valuetype Mono.Unix.Native.RealTimeSignum rts) cil managed" />
2169       <MemberType>Method</MemberType>
2170       <AssemblyInfo>
2171         <AssemblyVersion>2.0.0.0</AssemblyVersion>
2172         <AssemblyVersion>4.0.0.0</AssemblyVersion>
2173       </AssemblyInfo>
2174       <ReturnValue>
2175         <ReturnType>System.Int32</ReturnType>
2176       </ReturnValue>
2177       <Parameters>
2178         <Parameter Name="rts" Type="Mono.Unix.Native.RealTimeSignum" />
2179       </Parameters>
2180       <Docs>
2181         <param name="rts">A realtime signal to send to the current process.</param>
2182         <summary>Send a realtime signal to the current process.</summary>
2183         <returns>The <c>raise</c>() function returns the value 0 if successful; otherwise the value -1 is returned and <see cref="M:Mono.Unix.Native.Stdlib.GetLastError" /> indicates the error.
2184         </returns>
2185         <remarks>The <c>raise</c>() function sends the signal <paramref name="sig" /> to the current process.</remarks>
2186       </Docs>
2187     </Member>
2188     <Member MemberName="raise">
2189       <MemberSignature Language="C#" Value="public static int raise (Mono.Unix.Native.Signum sig);" />
2190       <MemberSignature Language="ILAsm" Value=".method public static hidebysig int32 raise(valuetype Mono.Unix.Native.Signum sig) cil managed" />
2191       <MemberType>Method</MemberType>
2192       <AssemblyInfo>
2193         <AssemblyVersion>1.0.5000.0</AssemblyVersion>
2194         <AssemblyVersion>2.0.0.0</AssemblyVersion>
2195         <AssemblyVersion>4.0.0.0</AssemblyVersion>
2196       </AssemblyInfo>
2197       <Attributes>
2198         <Attribute>
2199           <AttributeName>System.CLSCompliant(false)</AttributeName>
2200         </Attribute>
2201       </Attributes>
2202       <ReturnValue>
2203         <ReturnType>System.Int32</ReturnType>
2204       </ReturnValue>
2205       <Parameters>
2206         <Parameter Name="sig" Type="Mono.Unix.Native.Signum" />
2207       </Parameters>
2208       <Docs>
2209         <param name="sig">A signal to send to the current process.</param>
2210         <summary>Send a signal to the current process.</summary>
2211         <returns>The <c>raise</c>() function returns the value 0 if successful; otherwise the value -1 is returned and <see cref="M:Mono.Unix.Native.Stdlib.GetLastError" /> indicates the error.
2212 </returns>
2213         <remarks>The <c>raise</c>() function sends the signal <paramref name="sig" /> to the current process.</remarks>
2214       </Docs>
2215     </Member>
2216     <Member MemberName="rand">
2217       <MemberSignature Language="C#" Value="public static int rand ();" />
2218       <MemberSignature Language="ILAsm" Value=".method public static hidebysig pinvokeimpl (&quot;msvcrt&quot; as &quot;rand&quot; cdecl)int32 rand() cil managed" />
2219       <MemberType>Method</MemberType>
2220       <AssemblyInfo>
2221         <AssemblyVersion>1.0.5000.0</AssemblyVersion>
2222         <AssemblyVersion>2.0.0.0</AssemblyVersion>
2223         <AssemblyVersion>4.0.0.0</AssemblyVersion>
2224       </AssemblyInfo>
2225       <ReturnValue>
2226         <ReturnType>System.Int32</ReturnType>
2227       </ReturnValue>
2228       <Parameters />
2229       <Docs>
2230         <summary>Generates a random number.</summary>
2231         <returns>To be added.</returns>
2232         <remarks>The <c>rand</c>() function computes a sequence of pseudo-random integers in the range of 0 to <see cref="F:Mono.Unix.Native.Stdlib.RAND_MAX" /></remarks>
2233       </Docs>
2234     </Member>
2235     <Member MemberName="RAND_MAX">
2236       <MemberSignature Language="C#" Value="public static readonly int RAND_MAX;" />
2237       <MemberSignature Language="ILAsm" Value=".field public static initonly int32 RAND_MAX" />
2238       <MemberType>Field</MemberType>
2239       <AssemblyInfo>
2240         <AssemblyVersion>1.0.5000.0</AssemblyVersion>
2241         <AssemblyVersion>2.0.0.0</AssemblyVersion>
2242         <AssemblyVersion>4.0.0.0</AssemblyVersion>
2243       </AssemblyInfo>
2244       <Attributes>
2245         <Attribute>
2246           <AttributeName>System.CLSCompliant(false)</AttributeName>
2247         </Attribute>
2248       </Attributes>
2249       <ReturnValue>
2250         <ReturnType>System.Int32</ReturnType>
2251       </ReturnValue>
2252       <MemberValue>2147483647</MemberValue>
2253       <Docs>
2254         <summary>The maximum value returned by <see cref="M:Mono.Unix.Native.Stdlib.rand" />(3).</summary>
2255         <remarks>The maximum value returned by <see cref="M:Mono.Unix.Native.Stdlib.rand" />(3).</remarks>
2256       </Docs>
2257     </Member>
2258     <Member MemberName="realloc">
2259       <MemberSignature Language="C#" Value="public static IntPtr realloc (IntPtr ptr, ulong size);" />
2260       <MemberSignature Language="ILAsm" Value=".method public static hidebysig pinvokeimpl (&quot;MonoPosixHelper&quot; as &quot;Mono_Posix_Stdlib_realloc&quot; cdecl lasterr)native int realloc(native int ptr, unsigned int64 size) cil managed" />
2261       <MemberType>Method</MemberType>
2262       <AssemblyInfo>
2263         <AssemblyVersion>1.0.5000.0</AssemblyVersion>
2264         <AssemblyVersion>2.0.0.0</AssemblyVersion>
2265         <AssemblyVersion>4.0.0.0</AssemblyVersion>
2266       </AssemblyInfo>
2267       <Attributes>
2268         <Attribute>
2269           <AttributeName>System.CLSCompliant(false)</AttributeName>
2270         </Attribute>
2271       </Attributes>
2272       <ReturnValue>
2273         <ReturnType>System.IntPtr</ReturnType>
2274       </ReturnValue>
2275       <Parameters>
2276         <Parameter Name="ptr" Type="System.IntPtr" />
2277         <Parameter Name="size" Type="System.UInt64" />
2278       </Parameters>
2279       <Docs>
2280         <param name="ptr">Pointer to the start of a memory area to reallocate.</param>
2281         <param name="size">The new size for the allocated memory.</param>
2282         <summary>Reallocate a memory block.</summary>
2283         <returns>The <c>realloc</c>() function returns a pointer, possibly identical to <paramref name="ptr" />, to the allocated memory if successful; otherwise a <see cref="F:System.IntPtr.Zero" /> pointer is returned and <see cref="M:Mono.Unix.Native.Stdlib.GetLastError" /> returns <see cref="F:Mono.Unix.Native.Errno.ENOMEM" />. The <c>realloc</c>() function always leaves the original buffer intact when an error occurs.</returns>
2284         <remarks>The <c>realloc</c>() function changes the size of the previously allocated memory referenced by <paramref name="ptr" /> to <paramref name="size" /> bytes.  The contents of the memory are unchanged up to the lesser of the new and old sizes.  If the new size is larger, the value of the newly allocated portion of the memory is undefined.  If the requested memory cannot be allocated, <see cref="F:System.IntPtr.Zero" /> is returned and the memory referenced by <paramref name="ptr" /> is valid and unchanged.  If memory can be allocated, the memory referenced by <paramref name="ptr" /> is freed and a pointer to the newly allocated memory is returned.  Note that this may be different from the value passed as <paramref name="ptr" />.  If <paramref name="ptr" /> is <see cref="F:System.IntPtr.Zero" />, the <c>realloc</c>() function behaves identically to <see cref="M:Mono.Unix.Native.Stdlib.malloc" />() for the specified size.</remarks>
2285       </Docs>
2286     </Member>
2287     <Member MemberName="remove">
2288       <MemberSignature Language="C#" Value="public static int remove (string filename);" />
2289       <MemberSignature Language="ILAsm" Value=".method public static hidebysig pinvokeimpl (&quot;msvcrt&quot; as &quot;remove&quot; cdecl lasterr)int32 remove(string filename) cil managed" />
2290       <MemberType>Method</MemberType>
2291       <AssemblyInfo>
2292         <AssemblyVersion>1.0.5000.0</AssemblyVersion>
2293         <AssemblyVersion>2.0.0.0</AssemblyVersion>
2294         <AssemblyVersion>4.0.0.0</AssemblyVersion>
2295       </AssemblyInfo>
2296       <ReturnValue>
2297         <ReturnType>System.Int32</ReturnType>
2298       </ReturnValue>
2299       <Parameters>
2300         <Parameter Name="filename" Type="System.String" />
2301       </Parameters>
2302       <Docs>
2303         <param name="filename">To be added.</param>
2304         <summary>Remove a directory entry.</summary>
2305         <returns>The <c>remove</c>() function returns the value 0 if successful; otherwise the value -1 is returned and <see cref="M:Mono.Unix.Native.Stdlib.GetLastError" /> indicates the error.</returns>
2306         <remarks>
2307           <para>The <c>remove</c>() function removes the file or directory specified by <paramref name="path" />.</para>
2308           <para>If <paramref name="path" /> specifies a directory, <c>remove(<paramref name="path" />)</c> is the equivalent of <c><see cref="M:Mono.Unix.Native.Syscall.rmdir" />(<paramref name="path" />)</c>.  Otherwise, it is the equivalent of <c><see cref="M:Mono.Unix.Native.Syscall.unlink" />(<paramref name="path" />)</c>.
2309 </para>
2310         </remarks>
2311       </Docs>
2312     </Member>
2313     <Member MemberName="rename">
2314       <MemberSignature Language="C#" Value="public static int rename (string oldpath, string newpath);" />
2315       <MemberSignature Language="ILAsm" Value=".method public static hidebysig pinvokeimpl (&quot;msvcrt&quot; as &quot;rename&quot; cdecl lasterr)int32 rename(string oldpath, string newpath) cil managed" />
2316       <MemberType>Method</MemberType>
2317       <AssemblyInfo>
2318         <AssemblyVersion>1.0.5000.0</AssemblyVersion>
2319         <AssemblyVersion>2.0.0.0</AssemblyVersion>
2320         <AssemblyVersion>4.0.0.0</AssemblyVersion>
2321       </AssemblyInfo>
2322       <ReturnValue>
2323         <ReturnType>System.Int32</ReturnType>
2324       </ReturnValue>
2325       <Parameters>
2326         <Parameter Name="oldpath" Type="System.String" />
2327         <Parameter Name="newpath" Type="System.String" />
2328       </Parameters>
2329       <Docs>
2330         <param name="oldpath">The old path name.</param>
2331         <param name="newpath">The new path name.</param>
2332         <summary>Rename oldpath to newpath.</summary>
2333         <returns>The <c>rename</c>() function returns the value 0 if successful; otherwise the value -1 is returned and <see cref="M:Mono.Unix.Native.Stdlib.GetLastError" /> indicates the error.</returns>
2334         <remarks>
2335           <para>The <c>rename</c>() system call causes the link named <paramref name="oldpath" /> to be renamed as <paramref name="newpath" />.  If <paramref name="newpath" /> exists, it is first removed.  Both <paramref name="oldpath" /> and <paramref name="newpath" /> must be of the same type (that is, both directories or both non-directories), and must reside on the same file system.</para>
2336           <para>The <c>rename</c>() system call guarantees that if <paramref name="newpath" /> already exists, an instance of <paramref name="newpath" /> will always exist, even if the system should crash in the middle of the operation.</para>
2337           <para>If the final component of <paramref name="oldpath" /> is a symbolic link, the symbolic link is renamed, not the file or directory to which it points.</para>
2338         </remarks>
2339       </Docs>
2340     </Member>
2341     <Member MemberName="rewind">
2342       <MemberSignature Language="C#" Value="public static int rewind (IntPtr stream);" />
2343       <MemberSignature Language="ILAsm" Value=".method public static hidebysig pinvokeimpl (&quot;MonoPosixHelper&quot; as &quot;Mono_Posix_Stdlib_rewind&quot; cdecl lasterr)int32 rewind(native int stream) cil managed" />
2344       <MemberType>Method</MemberType>
2345       <AssemblyInfo>
2346         <AssemblyVersion>1.0.5000.0</AssemblyVersion>
2347         <AssemblyVersion>2.0.0.0</AssemblyVersion>
2348         <AssemblyVersion>4.0.0.0</AssemblyVersion>
2349       </AssemblyInfo>
2350       <ReturnValue>
2351         <ReturnType>System.Int32</ReturnType>
2352       </ReturnValue>
2353       <Parameters>
2354         <Parameter Name="stream" Type="System.IntPtr" />
2355       </Parameters>
2356       <Docs>
2357         <param name="stream">
2358           <c>FILE</c> stream to set file position indicator to the beginning of the file.</param>
2359         <summary>Set the file position indicator of the <c>FILE</c> stream to the beginning of the file.</summary>
2360         <returns>To be added.</returns>
2361         <remarks>
2362           <para>The <c>rewind</c>() function sets the file position indicator for the stream pointed to by <paramref name="stream" /> to the beginning of the file.  It is equivalent to:</para>
2363           <para>
2364             <see cref="M:Mono.Unix.Native.Stdlib.fseek" />(<paramref name="stream" />, 0, <see cref="F:Mono.Unix.Native.SeekFlags.SEEK_SET" />)
2365 </para>
2366           <para>except that the error indicator for the stream is also cleared (see <see cref="M:Mono.Unix.Native.Stdlib.clearerr" />(3)).</para>
2367           <para>Since <c>rewind</c>() does not return a value, an application wishing to detect errors should call <c><see cref="M:Mono.Unix.Native.Stdlib.SetLastError" />((<see cref="T:Mono.Unix.Native.Error" />)0)</c>, then call <c>rewind</c>(), and if <see cref="M:Mono.Unix.Native.Stdlib.GetLastError" /> is non-zero, assume an error has occurred.</para>
2368         </remarks>
2369       </Docs>
2370     </Member>
2371     <Member MemberName="setbuf">
2372       <MemberSignature Language="C#" Value="public static int setbuf (IntPtr stream, byte* buf);" />
2373       <MemberSignature Language="ILAsm" Value=".method public static hidebysig int32 setbuf(native int stream, unsigned int8* buf) cil managed" />
2374       <MemberType>Method</MemberType>
2375       <AssemblyInfo>
2376         <AssemblyVersion>1.0.5000.0</AssemblyVersion>
2377         <AssemblyVersion>2.0.0.0</AssemblyVersion>
2378         <AssemblyVersion>4.0.0.0</AssemblyVersion>
2379       </AssemblyInfo>
2380       <Attributes>
2381         <Attribute>
2382           <AttributeName>System.CLSCompliant(false)</AttributeName>
2383         </Attribute>
2384       </Attributes>
2385       <ReturnValue>
2386         <ReturnType>System.Int32</ReturnType>
2387       </ReturnValue>
2388       <Parameters>
2389         <Parameter Name="stream" Type="System.IntPtr" />
2390         <Parameter Name="buf" Type="System.Byte*" />
2391       </Parameters>
2392       <Docs>
2393         <param name="stream">The <c>FILE</c> stream to set buffering operations on.</param>
2394         <param name="buf">The buffer to use for buffering.</param>
2395         <summary>Control <c>FILE</c> stream buffering operations.</summary>
2396         <returns>The <c>setbuf</c>() function returns the value 0 if successful; otherwise the value -1 is returned and <see cref="M:Mono.Unix.Native.Stdlib.GetLastError" /> indicates the error.</returns>
2397         <remarks>
2398           <para>The <c>setbuf</c> function disables <c>FILE</c> stream buffering if <paramref name="buf" /> is <see cref="F:System.IntPtr.Zero" />, otherwise full buffering is enabled (and <paramref name="buf" /> is used as the buffer).
2399 </para>
2400           <para>The <c>setbuf</c> function is an alias for calls to <see /><see cref="M:Mono.Unix.Native.Stdlib.setvbuf" />.  Except for the lack of a return value, the <c>setbuf</c> function is exactly equivalent to the call:</para>
2401           <para>
2402             <see cref="M:Mono.Unix.Native.Stdlib.setvbuf" /> (<paramref name="stream" />, <paramref name="buf" />, <paramref name="buf" /> ? <see cref="M:Mono.Unix.Native.Stdlib._IOFBF" /> : <see cref="M:Mono.Unix.Native.Stdlib._IONBF" />, <see cref="M:Mono.Unix.Native.Stdlib.BUFSIZ" />);
2403 </para>
2404           <para>This function requires that <paramref name="buf" /> refer to at least <see cref="M:Mono.Unix.Native.Stdlib.BUFSIZ" /> bytes of memory.  This memory must remain valid until the next <c>setbuf</c>, <see cref="M:Mono.Unix.Native.Stdlib.setvbuf" />, or <see cref="M:Mono.Unix.Native.Stdlib.fclose" /> call.
2405 </para>
2406         </remarks>
2407       </Docs>
2408     </Member>
2409     <Member MemberName="setbuf">
2410       <MemberSignature Language="C#" Value="public static int setbuf (IntPtr stream, IntPtr buf);" />
2411       <MemberSignature Language="ILAsm" Value=".method public static hidebysig pinvokeimpl (&quot;MonoPosixHelper&quot; as &quot;Mono_Posix_Stdlib_setbuf&quot; cdecl lasterr)int32 setbuf(native int stream, native int buf) cil managed" />
2412       <MemberType>Method</MemberType>
2413       <AssemblyInfo>
2414         <AssemblyVersion>1.0.5000.0</AssemblyVersion>
2415         <AssemblyVersion>2.0.0.0</AssemblyVersion>
2416         <AssemblyVersion>4.0.0.0</AssemblyVersion>
2417       </AssemblyInfo>
2418       <ReturnValue>
2419         <ReturnType>System.Int32</ReturnType>
2420       </ReturnValue>
2421       <Parameters>
2422         <Parameter Name="stream" Type="System.IntPtr" />
2423         <Parameter Name="buf" Type="System.IntPtr" />
2424       </Parameters>
2425       <Docs>
2426         <param name="stream">The <c>FILE</c> stream to set buffering operations on.</param>
2427         <param name="buf">The buffer to use for buffering.</param>
2428         <summary>Control <c>FILE</c> stream buffering operations.</summary>
2429         <returns>The <c>setbuf</c>() function returns the value 0 if successful; otherwise the value -1 is returned and <see cref="M:Mono.Unix.Native.Stdlib.GetLastError" /> indicates the error.</returns>
2430         <remarks>
2431           <para>The <c>setbuf</c> function disables <c>FILE</c> stream buffering if <paramref name="buf" /> is <see cref="F:System.IntPtr.Zero" />, otherwise full buffering is enabled (and <paramref name="buf" /> is used as the buffer).
2432 </para>
2433           <para>The <c>setbuf</c> function is an alias for calls to <see /><see cref="M:Mono.Unix.Native.Stdlib.setvbuf" />.  Except for the lack of a return value, the <c>setbuf</c> function is exactly equivalent to the call:</para>
2434           <para>
2435             <see cref="M:Mono.Unix.Native.Stdlib.setvbuf" /> (<paramref name="stream" />, <paramref name="buf" />, <paramref name="buf" /> ? <see cref="M:Mono.Unix.Native.Stdlib._IOFBF" /> : <see cref="M:Mono.Unix.Native.Stdlib._IONBF" />, <see cref="M:Mono.Unix.Native.Stdlib.BUFSIZ" />);
2436 </para>
2437           <para>This function requires that <paramref name="buf" /> refer to at least <see cref="M:Mono.Unix.Native.Stdlib.BUFSIZ" /> bytes of memory.  This memory must remain valid until the next <c>setbuf</c>, <see cref="M:Mono.Unix.Native.Stdlib.setvbuf" />, or <see cref="M:Mono.Unix.Native.Stdlib.fclose" /> call.
2438 </para>
2439         </remarks>
2440       </Docs>
2441     </Member>
2442     <Member MemberName="SetLastError">
2443       <MemberSignature Language="C#" Value="protected static void SetLastError (Mono.Unix.Native.Errno error);" />
2444       <MemberSignature Language="ILAsm" Value=".method familystatic hidebysig void SetLastError(valuetype Mono.Unix.Native.Errno error) cil managed" />
2445       <MemberType>Method</MemberType>
2446       <AssemblyInfo>
2447         <AssemblyVersion>1.0.5000.0</AssemblyVersion>
2448         <AssemblyVersion>2.0.0.0</AssemblyVersion>
2449         <AssemblyVersion>4.0.0.0</AssemblyVersion>
2450       </AssemblyInfo>
2451       <ReturnValue>
2452         <ReturnType>System.Void</ReturnType>
2453       </ReturnValue>
2454       <Parameters>
2455         <Parameter Name="error" Type="Mono.Unix.Native.Errno" />
2456       </Parameters>
2457       <Docs>
2458         <param name="error">To be added.</param>
2459         <summary>Writes <c>errno</c>.</summary>
2460         <remarks>To be added.</remarks>
2461       </Docs>
2462     </Member>
2463     <Member MemberName="SetSignalAction">
2464       <MemberSignature Language="C#" Value="public static int SetSignalAction (Mono.Unix.Native.RealTimeSignum rts, Mono.Unix.Native.SignalAction action);" />
2465       <MemberSignature Language="ILAsm" Value=".method public static hidebysig int32 SetSignalAction(valuetype Mono.Unix.Native.RealTimeSignum rts, valuetype Mono.Unix.Native.SignalAction action) cil managed" />
2466       <MemberType>Method</MemberType>
2467       <AssemblyInfo>
2468         <AssemblyVersion>2.0.0.0</AssemblyVersion>
2469         <AssemblyVersion>4.0.0.0</AssemblyVersion>
2470       </AssemblyInfo>
2471       <ReturnValue>
2472         <ReturnType>System.Int32</ReturnType>
2473       </ReturnValue>
2474       <Parameters>
2475         <Parameter Name="rts" Type="Mono.Unix.Native.RealTimeSignum" />
2476         <Parameter Name="action" Type="Mono.Unix.Native.SignalAction" />
2477       </Parameters>
2478       <Docs>
2479         <param name="rts">To be added.</param>
2480         <param name="action">
2481           A <see cref="T:Mono.Unix.Native.SignalAction" /> specifying what to
2482           do when the <paramref name="signum" /> signal is emitted.
2483         </param>
2484         <summary>
2485           Specifies what should happen when a signal is emitted.
2486         </summary>
2487         <returns>
2488           <para>
2489             A <see cref="T:System.Int32" />; if equal to <c>0</c>, the call
2490             was successful.  <c>-1</c> is returned on failure, and sets 
2491             <see cref="M:Mono.Unix.Native.Stdlib.GetLastError" />
2492             to indicate the error.
2493           </para>
2494           <block subset="none" type="usage">
2495             <para>
2496               Possible errors include:
2497             </para>
2498             <list type="table">
2499               <listheader>
2500                 <term>
2501                   Error
2502                 </term>
2503                 <description>
2504                   Details
2505                 </description>
2506               </listheader>
2507               <item>
2508                 <term>
2509                   <see cref="F:Mono.Unix.Native.Errno.EINVAL" />
2510                 </term>
2511                 <description>
2512                   <para>
2513                     <paramref name="signum" /> is invalid.
2514                   </para>
2515                 </description>
2516               </item>
2517             </list>
2518           </block>
2519         </returns>
2520         <remarks>
2521           <para>
2522             This is the safer, restricted form of 
2523             <see cref="M:Mono.Unix.Native.Stdlib.signal(Mono.Unix.Native.RealTimeSignum,Mono.Unix.Native.SignalHandler)" />.
2524             While <c>signal</c>(2) permits an arbitrary method to be set as
2525             the signal handler, this method permits specifying only the
2526             default, ignore, or error handlers.
2527           </para>
2528           <block subset="none" type="behaviors">
2529             <para>
2530               If <paramref name="action" /> is
2531               <see cref="F:Mono.Unix.Native.SignalAction.Default" />, then
2532               this method is equivalent to 
2533               <c>signal(<paramref name="signum" />, SIG_DFL)</c>.
2534             </para>
2535             <para>
2536               If <paramref name="action" /> is
2537               <see cref="F:Mono.Unix.Native.SignalAction.Ignore" />, then
2538               this method is equivalent to 
2539               <c>signal(<paramref name="signum" />, SIG_IGN)</c>.
2540             </para>
2541             <para>
2542               If <paramref name="action" /> is
2543               <see cref="F:Mono.Unix.Native.SignalAction.Error" />, then
2544               this method is equivalent to 
2545               <c>signal(<paramref name="signum" />, SIG_ERR)</c>.
2546             </para>
2547           </block>
2548         </remarks>
2549       </Docs>
2550     </Member>
2551     <Member MemberName="SetSignalAction">
2552       <MemberSignature Language="C#" Value="public static int SetSignalAction (Mono.Unix.Native.Signum signal, Mono.Unix.Native.SignalAction action);" />
2553       <MemberSignature Language="ILAsm" Value=".method public static hidebysig int32 SetSignalAction(valuetype Mono.Unix.Native.Signum signal, valuetype Mono.Unix.Native.SignalAction action) cil managed" />
2554       <MemberType>Method</MemberType>
2555       <AssemblyInfo>
2556         <AssemblyVersion>1.0.5000.0</AssemblyVersion>
2557         <AssemblyVersion>2.0.0.0</AssemblyVersion>
2558         <AssemblyVersion>4.0.0.0</AssemblyVersion>
2559       </AssemblyInfo>
2560       <ReturnValue>
2561         <ReturnType>System.Int32</ReturnType>
2562       </ReturnValue>
2563       <Parameters>
2564         <Parameter Name="signal" Type="Mono.Unix.Native.Signum" />
2565         <Parameter Name="action" Type="Mono.Unix.Native.SignalAction" />
2566       </Parameters>
2567       <Docs>
2568         <param name="signal">To be added.</param>
2569         <param name="action">
2570           A <see cref="T:Mono.Unix.Native.SignalAction" /> specifying what to
2571           do when the <paramref name="signum" /> signal is emitted.
2572         </param>
2573         <summary>
2574           Specifies what should happen when a signal is emitted.
2575         </summary>
2576         <returns>
2577           <para>
2578             A <see cref="T:System.Int32" />; if equal to <c>0</c>, the call
2579             was successful.  <c>-1</c> is returned on failure, and sets 
2580             <see cref="M:Mono.Unix.Native.Stdlib.GetLastError" />
2581             to indicate the error.
2582           </para>
2583           <block subset="none" type="usage">
2584             <para>
2585               Possible errors include:
2586             </para>
2587             <list type="table">
2588               <listheader>
2589                 <term>
2590                   Error
2591                 </term>
2592                 <description>
2593                   Details
2594                 </description>
2595               </listheader>
2596               <item>
2597                 <term>
2598                   <see cref="F:Mono.Unix.Native.Errno.EINVAL" />
2599                 </term>
2600                 <description>
2601                   <para>
2602                     <paramref name="signum" /> is invalid.
2603                   </para>
2604                 </description>
2605               </item>
2606             </list>
2607           </block>
2608         </returns>
2609         <remarks>
2610           <para>
2611             This is the safer, restricted form of 
2612             <see cref="M:Mono.Unix.Native.Stdlib.signal(Mono.Unix.Native.Signum,Mono.Unix.Native.SignalHandler)" />.
2613             While <c>signal</c>(2) permits an arbitrary method to be set as
2614             the signal handler, this method permits specifying only the
2615             default, ignore, or error handlers.
2616           </para>
2617           <block subset="none" type="behaviors">
2618             <para>
2619               If <paramref name="action" /> is
2620               <see cref="F:Mono.Unix.Native.SignalAction.Default" />, then
2621               this method is equivalent to 
2622               <c>signal(<paramref name="signum" />, SIG_DFL)</c>.
2623             </para>
2624             <para>
2625               If <paramref name="action" /> is
2626               <see cref="F:Mono.Unix.Native.SignalAction.Ignore" />, then
2627               this method is equivalent to 
2628               <c>signal(<paramref name="signum" />, SIG_IGN)</c>.
2629             </para>
2630             <para>
2631               If <paramref name="action" /> is
2632               <see cref="F:Mono.Unix.Native.SignalAction.Error" />, then
2633               this method is equivalent to 
2634               <c>signal(<paramref name="signum" />, SIG_ERR)</c>.
2635             </para>
2636           </block>
2637         </remarks>
2638       </Docs>
2639     </Member>
2640     <Member MemberName="setvbuf">
2641       <MemberSignature Language="C#" Value="public static int setvbuf (IntPtr stream, byte* buf, int mode, ulong size);" />
2642       <MemberSignature Language="ILAsm" Value=".method public static hidebysig int32 setvbuf(native int stream, unsigned int8* buf, int32 mode, unsigned int64 size) cil managed" />
2643       <MemberType>Method</MemberType>
2644       <AssemblyInfo>
2645         <AssemblyVersion>1.0.5000.0</AssemblyVersion>
2646         <AssemblyVersion>2.0.0.0</AssemblyVersion>
2647         <AssemblyVersion>4.0.0.0</AssemblyVersion>
2648       </AssemblyInfo>
2649       <Attributes>
2650         <Attribute>
2651           <AttributeName>System.CLSCompliant(false)</AttributeName>
2652         </Attribute>
2653       </Attributes>
2654       <ReturnValue>
2655         <ReturnType>System.Int32</ReturnType>
2656       </ReturnValue>
2657       <Parameters>
2658         <Parameter Name="stream" Type="System.IntPtr" />
2659         <Parameter Name="buf" Type="System.Byte*" />
2660         <Parameter Name="mode" Type="System.Int32" />
2661         <Parameter Name="size" Type="System.UInt64" />
2662       </Parameters>
2663       <Docs>
2664         <param name="stream">The <c>FILE</c> stream to set buffering behavior on.</param>
2665         <param name="buf">The buffer to use for buffering.</param>
2666         <param name="mode">The type of buffering to start using with <paramref name="stream" />.</param>
2667         <param name="size">The size of the buffer <paramref name="buf" />.</param>
2668         <summary>Control <c>FILE</c> stream buffering operations.</summary>
2669         <returns>The <c>setvbuf</c>() function returns 0 on success, or <see cref="F:Mono.Unix.Native.Stdlib.EOF" /> if the request cannot be honored (note that the stream is still functional in this case).</returns>
2670         <remarks>
2671           <para>The three types of buffering available are unbuffered, block buffered, and line buffered.  When an output stream is unbuffered, information appears on the destination file or terminal as soon as written; when it is block buffered many characters are saved up and written as a block; when it is line buffered characters are saved up until a new- line is output or input is read from any stream attached to a terminal device (typically <see cref="F:Mono.Unix.Native.Stdlib.stdin" />).  The function <see cref="M:Mono.Unix.Native.Stdlib.fflush" />(3) may be used to force the block out early.  (See <see cref="M:Mono.Unix.Native.Stdlib.fclose" />(3).)
2672 </para>
2673           <para>Normally all files are block buffered.  When the first I/O operation occurs on a file, <see cref="M:Mono.Unix.Native.Stdlib.malloc" />(3) is called, and an optimally-sized buffer is obtained.  If a stream refers to a terminal (as <see cref="F:Mono.Unix.Native.Stdlib.stdout" /> normally does) it is line buffered.  The standard error stream <see cref="F:Mono.Unix.Native.Stdlib.stderr" /> is always unbuffered.</para>
2674           <para>The <c>setvbuf</c> function may be used to alter the buffering behavior of a stream.  The <paramref name="mode" /> argument must be one of the following three values:
2675 </para>
2676           <list type="table">
2677             <listheader>
2678               <term>Value</term>
2679               <description>Description</description>
2680             </listheader>
2681             <item>
2682               <term>
2683                 <see cref="F:Mono.Unix.Native.Stdlib._IONBF" />
2684               </term>
2685               <description>unbuffered</description>
2686             </item>
2687             <item>
2688               <term>
2689                 <see cref="F:Mono.Unix.Native.Stdlib._IOLBF" />
2690               </term>
2691               <description>line buffered</description>
2692             </item>
2693             <item>
2694               <term>
2695                 <see cref="F:Mono.Unix.Native.Stdlib._IOFBF" />
2696               </term>
2697               <description>fully buffered</description>
2698             </item>
2699           </list>
2700           <para>The <paramref name="size" /> argument may be given as zero to obtain deferred optimal-size buffer allocation as usual.  If it is not zero, then except for unbuffered files, the <paramref name="buf" /> argument should point to a buffer at least <paramref name="size" /> bytes long; this buffer will be used instead of the current buffer.  If <paramref name="buf" /> is not <see langword="null" />, it is the caller's responsibility to <see cref="M:Mono.Unix.Native.Stdlib.free" />(3) this buffer after closing the stream.
2701 </para>
2702           <para>The <c>setvbuf</c>() function may be used at any time, but may have peculiar side effects (such as discarding input or flushing output) if the stream is ''active''.  Portable applications should call it only once on any given stream, and before any I/O is performed.
2703 </para>
2704         </remarks>
2705       </Docs>
2706     </Member>
2707     <Member MemberName="setvbuf">
2708       <MemberSignature Language="C#" Value="public static int setvbuf (IntPtr stream, IntPtr buf, int mode, ulong size);" />
2709       <MemberSignature Language="ILAsm" Value=".method public static hidebysig pinvokeimpl (&quot;MonoPosixHelper&quot; as &quot;Mono_Posix_Stdlib_setvbuf&quot; cdecl lasterr)int32 setvbuf(native int stream, native int buf, int32 mode, unsigned int64 size) cil managed" />
2710       <MemberType>Method</MemberType>
2711       <AssemblyInfo>
2712         <AssemblyVersion>1.0.5000.0</AssemblyVersion>
2713         <AssemblyVersion>2.0.0.0</AssemblyVersion>
2714         <AssemblyVersion>4.0.0.0</AssemblyVersion>
2715       </AssemblyInfo>
2716       <Attributes>
2717         <Attribute>
2718           <AttributeName>System.CLSCompliant(false)</AttributeName>
2719         </Attribute>
2720       </Attributes>
2721       <ReturnValue>
2722         <ReturnType>System.Int32</ReturnType>
2723       </ReturnValue>
2724       <Parameters>
2725         <Parameter Name="stream" Type="System.IntPtr" />
2726         <Parameter Name="buf" Type="System.IntPtr" />
2727         <Parameter Name="mode" Type="System.Int32" />
2728         <Parameter Name="size" Type="System.UInt64" />
2729       </Parameters>
2730       <Docs>
2731         <param name="stream">The <c>FILE</c> stream to set buffering behavior on.</param>
2732         <param name="buf">The buffer to use for buffering.</param>
2733         <param name="mode">The type of buffering to start using with <paramref name="stream" />.</param>
2734         <param name="size">The size of the buffer <paramref name="buf" />.</param>
2735         <summary>Control <c>FILE</c> stream buffering.</summary>
2736         <returns>The <c>setvbuf</c>() function returns 0 on success, or <see cref="F:Mono.Unix.Native.Stdlib.EOF" /> if the request cannot be honored (note that the stream is still functional in this case).</returns>
2737         <remarks>
2738           <para>The three types of buffering available are unbuffered, block buffered, and line buffered.  When an output stream is unbuffered, information appears on the destination file or terminal as soon as written; when it is block buffered many characters are saved up and written as a block; when it is line buffered characters are saved up until a new- line is output or input is read from any stream attached to a terminal device (typically <see cref="F:Mono.Unix.Native.Stdlib.stdin" />).  The function <see cref="M:Mono.Unix.Native.Stdlib.fflush" />(3) may be used to force the block out early.  (See <see cref="M:Mono.Unix.Native.Stdlib.fclose" />(3).)
2739 </para>
2740           <para>Normally all files are block buffered.  When the first I/O operation occurs on a file, <see cref="M:Mono.Unix.Native.Stdlib.malloc" />(3) is called, and an optimally-sized buffer is obtained.  If a stream refers to a terminal (as <see cref="F:Mono.Unix.Native.Stdlib.stdout" /> normally does) it is line buffered.  The standard error stream <see cref="F:Mono.Unix.Native.Stdlib.stderr" /> is always unbuffered.</para>
2741           <para>The <c>setvbuf</c> function may be used to alter the buffering behavior of a stream.  The <paramref name="mode" /> argument must be one of the following three values:
2742 </para>
2743           <list type="table">
2744             <listheader>
2745               <term>Value</term>
2746               <description>Description</description>
2747             </listheader>
2748             <item>
2749               <term>
2750                 <see cref="F:Mono.Unix.Native.Stdlib._IONBF" />
2751               </term>
2752               <description>unbuffered</description>
2753             </item>
2754             <item>
2755               <term>
2756                 <see cref="F:Mono.Unix.Native.Stdlib._IOLBF" />
2757               </term>
2758               <description>line buffered</description>
2759             </item>
2760             <item>
2761               <term>
2762                 <see cref="F:Mono.Unix.Native.Stdlib._IOFBF" />
2763               </term>
2764               <description>fully buffered</description>
2765             </item>
2766           </list>
2767           <para>The <paramref name="size" /> argument may be given as zero to obtain deferred optimal-size buffer allocation as usual.  If it is not zero, then except for unbuffered files, the <paramref name="buf" /> argument should point to a buffer at least <paramref name="size" /> bytes long; this buffer will be used instead of the current buffer.  If <paramref name="buf" /> is not <see cref="System.IntPtr.Zero" />, it is the caller's responsibility to <see cref="M:Mono.Unix.Native.Stdlib.free" />(3) this buffer after closing the stream.
2768 </para>
2769           <para>The <c>setvbuf</c>() function may be used at any time, but may have peculiar side effects (such as discarding input or flushing output) if the stream is ''active''.  Portable applications should call it only once on any given stream, and before any I/O is performed.
2770 </para>
2771         </remarks>
2772       </Docs>
2773     </Member>
2774     <Member MemberName="SIG_DFL">
2775       <MemberSignature Language="C#" Value="public static readonly Mono.Unix.Native.SignalHandler SIG_DFL;" />
2776       <MemberSignature Language="ILAsm" Value=".field public static initonly class Mono.Unix.Native.SignalHandler SIG_DFL" />
2777       <MemberType>Field</MemberType>
2778       <AssemblyInfo>
2779         <AssemblyVersion>1.0.5000.0</AssemblyVersion>
2780         <AssemblyVersion>2.0.0.0</AssemblyVersion>
2781         <AssemblyVersion>4.0.0.0</AssemblyVersion>
2782       </AssemblyInfo>
2783       <Attributes>
2784         <Attribute>
2785           <AttributeName>System.CLSCompliant(false)</AttributeName>
2786         </Attribute>
2787       </Attributes>
2788       <ReturnValue>
2789         <ReturnType>Mono.Unix.Native.SignalHandler</ReturnType>
2790       </ReturnValue>
2791       <Docs>
2792         <summary>Default signal behavior.</summary>
2793         <remarks>To be added.</remarks>
2794       </Docs>
2795     </Member>
2796     <Member MemberName="SIG_ERR">
2797       <MemberSignature Language="C#" Value="public static readonly Mono.Unix.Native.SignalHandler SIG_ERR;" />
2798       <MemberSignature Language="ILAsm" Value=".field public static initonly class Mono.Unix.Native.SignalHandler SIG_ERR" />
2799       <MemberType>Field</MemberType>
2800       <AssemblyInfo>
2801         <AssemblyVersion>1.0.5000.0</AssemblyVersion>
2802         <AssemblyVersion>2.0.0.0</AssemblyVersion>
2803         <AssemblyVersion>4.0.0.0</AssemblyVersion>
2804       </AssemblyInfo>
2805       <Attributes>
2806         <Attribute>
2807           <AttributeName>System.CLSCompliant(false)</AttributeName>
2808         </Attribute>
2809       </Attributes>
2810       <ReturnValue>
2811         <ReturnType>Mono.Unix.Native.SignalHandler</ReturnType>
2812       </ReturnValue>
2813       <Docs>
2814         <summary>Error signal.</summary>
2815         <remarks>This value is returned by <see cref="M:Mono.Unix.Native.Stdlib.signal" />(3) when an error occurs.</remarks>
2816       </Docs>
2817     </Member>
2818     <Member MemberName="SIG_IGN">
2819       <MemberSignature Language="C#" Value="public static readonly Mono.Unix.Native.SignalHandler SIG_IGN;" />
2820       <MemberSignature Language="ILAsm" Value=".field public static initonly class Mono.Unix.Native.SignalHandler SIG_IGN" />
2821       <MemberType>Field</MemberType>
2822       <AssemblyInfo>
2823         <AssemblyVersion>1.0.5000.0</AssemblyVersion>
2824         <AssemblyVersion>2.0.0.0</AssemblyVersion>
2825         <AssemblyVersion>4.0.0.0</AssemblyVersion>
2826       </AssemblyInfo>
2827       <Attributes>
2828         <Attribute>
2829           <AttributeName>System.CLSCompliant(false)</AttributeName>
2830         </Attribute>
2831       </Attributes>
2832       <ReturnValue>
2833         <ReturnType>Mono.Unix.Native.SignalHandler</ReturnType>
2834       </ReturnValue>
2835       <Docs>
2836         <summary>Ignore the signal.</summary>
2837         <remarks>To be added.</remarks>
2838       </Docs>
2839     </Member>
2840     <Member MemberName="signal">
2841       <MemberSignature Language="C#" Value="public static Mono.Unix.Native.SignalHandler signal (Mono.Unix.Native.Signum signum, Mono.Unix.Native.SignalHandler handler);" />
2842       <MemberSignature Language="ILAsm" Value=".method public static hidebysig class Mono.Unix.Native.SignalHandler signal(valuetype Mono.Unix.Native.Signum signum, class Mono.Unix.Native.SignalHandler handler) cil managed" />
2843       <MemberType>Method</MemberType>
2844       <AssemblyInfo>
2845         <AssemblyVersion>1.0.5000.0</AssemblyVersion>
2846         <AssemblyVersion>2.0.0.0</AssemblyVersion>
2847         <AssemblyVersion>4.0.0.0</AssemblyVersion>
2848       </AssemblyInfo>
2849       <Attributes>
2850         <Attribute>
2851           <AttributeName>System.CLSCompliant(false)</AttributeName>
2852         </Attribute>
2853         <Attribute>
2854           <AttributeName>System.Obsolete("This is not safe; use Mono.Unix.UnixSignal for signal delivery or SetSignalAction()")</AttributeName>
2855         </Attribute>
2856       </Attributes>
2857       <ReturnValue>
2858         <ReturnType>Mono.Unix.Native.SignalHandler</ReturnType>
2859       </ReturnValue>
2860       <Parameters>
2861         <Parameter Name="signum" Type="Mono.Unix.Native.Signum" />
2862         <Parameter Name="handler" Type="Mono.Unix.Native.SignalHandler" />
2863       </Parameters>
2864       <Docs>
2865         <param name="signum">The signal to handle.</param>
2866         <param name="handler">The handler to invoke when the process receives a <paramref name="signum" /> signal.</param>
2867         <summary>Register a handler for a given signal.</summary>
2868         <returns>
2869           <para>The previous value of the signal handler, or <see cref="F:Mono.Unix.Native.Stdlib.SIG_ERR" /> on error and <see cref="M:Mono.Unix.Native.Stdlib.GetLastError" /> indicates the error.</para>
2870           <block subset="none" type="usage">
2871             <para>The following errors are specified:</para>
2872             <list type="table">
2873               <listheader>
2874                 <term>Error</term>
2875                 <description>Details</description>
2876               </listheader>
2877               <item>
2878                 <term>
2879                   <see cref="F:Mono.Unix.Native.Errno.EINVAL" />
2880                 </term>
2881                 <description>The <paramref name="signum" /> argument is not a valid signal number.</description>
2882               </item>
2883               <item>
2884                 <term>
2885                   <see cref="F:Mono.Unix.Native.Errno.EINVAL" />
2886                 </term>
2887                 <description>An attempt is made to ignore or supply a handler for <see cref="F:Mono.Unix.Native.Signum.SIGKILL" /> or <see cref="F:Mono.Unix.Native.Signum.SIGSTOP" />.</description>
2888               </item>
2889             </list>
2890           </block>
2891         </returns>
2892         <remarks>
2893           <block subset="none" type="note">
2894             <para>
2895               This method should not be used in new code, as the Platform Invoke
2896               mechanism is not signal-safe, yet the Platform Invoke mechanism is
2897               required for unmanaged code to invoke managed code.
2898             </para>
2899             <para>
2900               New code should use the replacement method
2901               <see cref="M:Mono.Unix.Native.Stdlib.SetSignalAction" /> or the
2902               type <see cref="T:Mono.Unix.UnixSignal" />.
2903             </para>
2904           </block>
2905           <para>This signal() facility is a simplified interface to the more general <see cref="M:Mono.Unix.Native.Syscall.sigaction" />(2) facility.</para>
2906           <para>Signals allow the manipulation of a process from outside its domain as well as allowing the process to manipulate itself or copies of itself (children).  There are two general types of signals: those that cause termination of a process and those that do not.  Signals which cause termination of a program might result from an irrecoverable error or might be the result of a user at a terminal typing the 'interrupt' character.  Signals are used when a process is stopped because it wishes to access its control terminal while in the background (see <c>tty</c>(4)).  Signals are optionally generated when a process resumes after being stopped, when the status of child processes changes, or when input is ready at the control terminal.  Most signals result in the termination of the process receiving them if no action is taken; some signals instead cause the process receiving them to be stopped, or are simply discarded if the process has not requested otherwise. Except for the <see cref="F:Mono.Unix.Native.Signum.SIGKILL" /> and <see cref="F:Mono.Unix.Native.Signum.SIGSTOP" /> signals, the <c>signal</c>() function allows for a signal to be caught, to be ignored, or to generate an interrupt.
2907 </para>
2908           <para>The <paramref name="sig" /> argument specifies which signal was received.  The <paramref name="func" /> procedure allows a user to choose the action upon receipt of a signal.  To set the default action of the signal to occur as listed above, <paramref name="func" /> should be <see cref="F:Mono.Unix.Native.Stdlib.SIG_DFL" />.  A <see cref="F:Mono.Unix.Native.Stdlib.SIG_DFL" /> resets the default action. To ignore the signal func should be <see cref="F:Mono.Unix.Native.Stdlib.SIG_IGN" />.  This will cause subsequent instances of the signal to be ignored and pending instances to be discarded.  If <see cref="F:Mono.Unix.Native.Stdlib.SIG_IGN" /> is not used, further occurrences of the signal are automatically blocked and <paramref name="func" /> is called.
2909 </para>
2910           <para>The handled signal is unblocked when the function returns and the process continues from where it left off when the signal occurred.
2911 </para>
2912           <para>For some system calls, if a signal is caught while the call is executing and the call is prematurely terminated, the call is automatically restarted.  (The handler is installed using the SA_RESTART flag with <see cref="M:Mono.Unix.Native.Syscall.sigaction" />(2).)  The affected system calls include <see cref="M:Mono.Unix.Native.Syscall.read" />(2), <see cref="M:Mono.Unix.Native.Syscall.write" />(2), <see cref="M:Mono.Unix.Native.Syscall.sendto" />(2), <see cref="M:Mono.Unix.Native.Syscall.recvfrom" />(2), <see cref="M:Mono.Unix.Native.Syscall.sendmsg" />(2) and <see cref="M:Mono.Unix.Native.Syscall.recvmsg" />(2) on a communications channel or a low speed device and during a <see cref="M:Mono.Unix.Native.Syscall.ioctl" />(2) or <see cref="M:Mono.Unix.Native.Syscall.wait" />(2).  However, calls that have already committed are not restarted, but instead return a partial success (for example, a short read count).  These semantics could be changed with <see cref="M:Mono.Unix.Native.Syscall.siginterrupt" />(3)
2913 </para>
2914           <para>When a process which has installed signal handlers forks, the child process inherits the signals.  All caught signals may be reset to their default action by a call to the <see cref="M:Mono.Unix.Native.Syscall.execve" />(2) function; ignored signals remain ignored.
2915 </para>
2916           <para>If a process explicitly specifies <see cref="F:Mono.Unix.Native.Stdlib.SIG_IGN" /> as the action for the signal <see cref="F:Mono.Unix.Native.Stdlib.SIGCHLD" />, the system will not create zombie processes when children of the calling process exit.  As a consequence, the system will discard the exit status from the child processes.  If the calling process subsequently issues a call to <see cref="M:Mono.Unix.Native.Syscall.wait" />(2) or equivalent, it will block until all of the calling process's children terminate, and then return a value of -1 with <see cref="M:Mono.Unix.Native.Stdlib.GetLastError" /> returning <see cref="F:Mono.Unix.Native.Errno.ECHILD" />.
2917 </para>
2918         </remarks>
2919         <altmember cref="M:Mono.Unix.Native.Stdlib.SetSignalAction" />
2920         <altmember cref="T:Mono.Unix.UnixSignal" />
2921       </Docs>
2922     </Member>
2923     <Member MemberName="snprintf">
2924       <MemberSignature Language="C#" Value="public static int snprintf (System.Text.StringBuilder s, string message);" />
2925       <MemberSignature Language="ILAsm" Value=".method public static hidebysig int32 snprintf(class System.Text.StringBuilder s, string message) cil managed" />
2926       <MemberType>Method</MemberType>
2927       <AssemblyInfo>
2928         <AssemblyVersion>1.0.5000.0</AssemblyVersion>
2929         <AssemblyVersion>2.0.0.0</AssemblyVersion>
2930         <AssemblyVersion>4.0.0.0</AssemblyVersion>
2931       </AssemblyInfo>
2932       <ReturnValue>
2933         <ReturnType>System.Int32</ReturnType>
2934       </ReturnValue>
2935       <Parameters>
2936         <Parameter Name="s" Type="System.Text.StringBuilder" />
2937         <Parameter Name="message" Type="System.String" />
2938       </Parameters>
2939       <Docs>
2940         <param name="s">The buffer to print the message into.</param>
2941         <param name="message">The message to print.</param>
2942         <summary>Print a string into a buffer.</summary>
2943         <returns>Returns the number of characters printed or the number of characters that would have been printed if the <paramref name="size" /> were unlimited (again, not including the final '<c>\0</c>').</returns>
2944         <remarks>The <c>snprintf</c> function will fill at most <see cref="P:System.Text.StringBuilder.Capacity" /> characters of the input buffer with the string <paramref name="message" />.</remarks>
2945       </Docs>
2946     </Member>
2947     <Member MemberName="snprintf">
2948       <MemberSignature Language="C#" Value="public static int snprintf (System.Text.StringBuilder s, string format, object[] parameters);" />
2949       <MemberSignature Language="ILAsm" Value=".method public static hidebysig int32 snprintf(class System.Text.StringBuilder s, string format, object[] parameters) cil managed" />
2950       <MemberType>Method</MemberType>
2951       <AssemblyInfo>
2952         <AssemblyVersion>1.0.5000.0</AssemblyVersion>
2953         <AssemblyVersion>2.0.0.0</AssemblyVersion>
2954         <AssemblyVersion>4.0.0.0</AssemblyVersion>
2955       </AssemblyInfo>
2956       <Attributes>
2957         <Attribute>
2958           <AttributeName>System.CLSCompliant(false)</AttributeName>
2959         </Attribute>
2960         <Attribute>
2961           <AttributeName>System.Obsolete("Not necessarily portable due to cdecl restrictions.
2962 Use snprintf (StringBuilder, string) instead.")</AttributeName>
2963         </Attribute>
2964       </Attributes>
2965       <ReturnValue>
2966         <ReturnType>System.Int32</ReturnType>
2967       </ReturnValue>
2968       <Parameters>
2969         <Parameter Name="s" Type="System.Text.StringBuilder" />
2970         <Parameter Name="format" Type="System.String" />
2971         <Parameter Name="parameters" Type="System.Object[]">
2972           <Attributes>
2973             <Attribute>
2974               <AttributeName>System.ParamArray</AttributeName>
2975             </Attribute>
2976           </Attributes>
2977         </Parameter>
2978       </Parameters>
2979       <Docs>
2980         <param name="s">The buffer to print the message into.</param>
2981         <param name="format">The message format string.</param>
2982         <param name="parameters">Arguments for the message format string.</param>
2983         <summary>Print a string into a buffer.</summary>
2984         <returns>Returns the number of characters printed or the number of characters that would have been printed if the <paramref name="size" /> were unlimited (again, not including the final '<c>\0</c>').</returns>
2985         <remarks>
2986           <para>The <c>snprintf</c>() family of functions produces output according to a format as described below.  <c>snprintf</c>() writes output to the given output <paramref name="stream" />.</para>
2987           <para>These functions write the output under the control of a <paramref name="format" /> string that specifies how subsequent arguments (or arguments accessed via the variable-length argument facilities of <c>stdarg</c>(3)) are converted for output.
2988 </para>
2989           <para>The format string is composed of zero or more directives: ordinary characters (not %), which are copied unchanged to the output stream; and conversion specifications, each of which results in fetching zero or more subsequent arguments.  Each conversion specification is introduced by the % character.  The arguments must correspond properly (after type promotion) with the conversion specifier.  After the %, the following appear in sequence:</para>
2990           <list type="bullet">
2991             <item>
2992               <term>An optional field, consisting of a decimal digit string followed by a <c>$</c>, specifying the next argument to access.  If this field is not provided, the argument following the last argument accessed will be used.  Arguments are numbered starting at <c>1</c>.  If unaccessed arguments in the format string are interspersed with ones that are accessed the results will be indeterminate.</term>
2993             </item>
2994             <item>
2995               <term>Zero or more of the following flags:
2996
2997 <list type="table"><listheader><term>Flag</term><description>Description</description></listheader><item><term>'<c>#</c>'</term><description>The value should be converted to an "alternate form".  For <c>c</c>, <c>d</c>, <c>i</c>, <c>n</c>, <c>p</c>, <c>s</c>, and <c>u</c> conversions, this option has no effect.  For <c>o</c> conversions, the precision of the number is increased to force the first character of the output string to a zero (except if a zero value is printed with an explicit precision of zero).  For <c>x</c> and <c>X</c> conversions, a non-zero result has the string '<c>0x</c>' (or '<c>0X</c>' for <c>X</c> conversions) prepended to it. For <c>a</c>, <c>A</c>, <c>e</c>, <c>E</c>, <c>f</c>, <c>F</c>, <c>g</c>, and <c>G</c> conversions, the result will always contain a decimal point, even if no digits follow it (normally, a decimal point appears in the results of those conversions only if a digit follows).  For <c>g</c> and <c>G</c> conversions, trailing zeros are not removed from the result as they would otherwise be.</description></item><item><term>'<c>0</c>' (zero)</term><description>Zero padding.  For all conversions except <c>n</c>, the converted value is padded on the left with zeros rather than blanks.  If a precision is given with a numeric conversion (<c>d</c>, <c>i</c>, <c>o</c>, <c>u</c>, <c>i</c>, <c>x</c>, and <c>X</c>), the 0 flag is ignored.</description></item><item><term>'<c>-</c>'</term><description>A negative field width flag; the converted value is to be left adjusted on the field boundary.  Except for <c>n</c> conversions, the converted value is padded on the right with blanks, rather than on the left with blanks or zeros.  A <c>-</c> overrides a <c>0</c> if both are given.</description></item><item><term>'<c />' (space)</term><description>A blank should be left before a positive number produced by a signed conversion (<c>a</c>, <c>A</c>, <c>d</c>, <c>e</c>, <c>E</c>, <c>f</c>, <c>F</c>, <c>g</c>, <c>G</c>, or <c>i</c>).</description></item><item><term>'<c>+</c>'</term><description>A sign must always be placed before a number produced by a signed conversion.  A <c>+</c> overrides a space if both are used.</description></item><item><term>'<c>'</c>'</term><description>Decimal conversions (<c>d</c>, <c>u</c>, or <c>i</c>) or the integral portion of a floating point conversion (<c>f</c> or <c>F</c>) should be grouped and separated by thousands using the non-monetary separator returned by <see cref="M:Mono.Unix.Native.Syscall.localeconv" />(3).</description></item></list></term>
2998             </item>
2999             <item>
3000               <term>An optional decimal digit string specifying a minimum field width.  If the converted value has fewer characters than the field width, it will be padded with spaces on the left (or right, if the left-adjustment flag has been given) to fill out the field width.</term>
3001             </item>
3002             <item>
3003               <term>An optional precision, in the form of a period . followed by an optional digit string.  If the digit string is omitted, the precision is taken as zero.  This gives the minimum number of digits to appear for <c>d</c>, <c>i</c>, <c>o</c>, <c>u</c>, <c>x</c>, and <c>X</c> conversions, the number of digits to appear after the decimal-point for <c>a</c>, <c>A</c>, <c>e</c>, <c>E</c>, <c>f</c>, and <c>F</c> conversions, the maximum number of significant digits for <c>g</c> and <c>G</c> conversions, or the maximum number of characters to be printed from a string for <c>s</c> conversions.</term>
3004             </item>
3005             <item>
3006               <term>An optional length modifier, that specifies the size of the argument.  The following length modifiers are valid for the <c>d</c>, <c>i</c>, <c>n</c>, <c>o</c>, <c>u</c>, <c>x</c>, or <c>X</c> conversion:
3007
3008 <list type="table"><listheader><term>Modifier</term><description><c>d</c>, <c>i</c></description><description><c>o, u, x, X</c></description><description><c>n</c></description></listheader><item><term><c>hh</c></term><description><c>signed char</c></description><description><c>unsigned char</c></description><description><c>signed char *</c></description></item><item><term><c>h</c></term><description><c>short</c></description><description><c>unsigned short</c></description><description><c>short *</c></description></item><item><term><c>l</c> (ell)</term><description><c>long</c></description><description><c>unsigned long</c></description><description><c>unsigned long *</c></description></item><item><term><c>ll</c> (ell ell)</term><description><c>long long</c></description><description><c>unsigned long long</c></description><description><c>long long *</c></description></item><item><term><c>j</c></term><description><c>intmax_t</c></description><description><c>uintmax_t</c></description><description><c>intmax_t *</c></description></item><item><term><c>t</c></term><description><c>ptrdiff_t</c></description><description>(see note)</description><description><c>ptrdiff_t *</c></description></item><item><term><c>z</c></term><description>(see note)</description><description><c>size_t</c></description><description>(see note)</description></item><item><term><c>q</c><i>(deprecated)</i></term><description><c>quad_t</c></description><description><c>u_quad_t</c></description><description><c>quad_t *</c></description></item></list><block subset="none" type="note"><para>the <c>t</c> modifier, when applied to a <c>o</c>, <c>u</c>, <c>x</c>, or <c>X</c> conversion, indicates that the argument is of an unsigned type equivalent in size to a <c>ptrdiff_t</c>.  The <c>z</c> modifier, when applied to a <c>d</c> or <c>i</c> conversion, indicates that the argument is of a signed type equivalent in size to a <c>size_t</c>.  Similarly, when applied to an <c>n</c> conversion, it indicates that the argument is a pointer to a signed type equivalent in size to a <c>size_t</c>.
3009   </para></block><para>The following length modifier is valid for the <c>a</c>, <c>A</c>, <c>e</c>, <c>E</c>, <c>f</c>, <c>F</c>, <c>g</c>, or <c>G</c> conversion:</para><list type="table"><listheader><term>Modifier</term><description><c>a, A, e, E, f, F, g, G</c></description></listheader><item><term><c>L</c></term><description><c>long double</c></description></item></list><para>The following length modifier is valid for the <c>c</c> or <c>s</c> conversion:</para><list type="table"><listheader><term>Modifier</term><description><c>c</c></description><description><c>s</c></description></listheader><item><term><c>l</c> (ell)</term><description><c>wint_t</c></description><description><c>wchar_t *</c></description></item></list></term>
3010             </item>
3011             <item>
3012               <term>A character that specifies the type of conversion to be applied.</term>
3013             </item>
3014           </list>
3015           <para>A field width or precision, or both, may be indicated by an asterisk '<c>*</c>' or an asterisk followed by one or more decimal digits and a '<c>$</c>' instead of a digit string.  In this case, an <i>int</i> argument supplies the field width or precision.  A negative field width is treated as a left adjustment flag followed by a positive field width; a negative precision is treated as though it were missing.  If a single format directive mixes positional (<c>nn$</c>) and non-positional arguments, the results are undefined
3016 </para>
3017           <para>The conversion specifiers and their meanings are:</para>
3018           <list type="table">
3019             <listheader>
3020               <term>Specifier</term>
3021               <description>Meaning</description>
3022             </listheader>
3023             <item>
3024               <term>
3025                 <c>diouxX</c>
3026               </term>
3027               <description>The <c>int</c> (or appropriate variant) argument is converted to signed decimal (<c>d</c> and <c>i</c>), unsigned octal (<c>o</c>), unsigned decimal (<c>u</c>), or unsigned hexadecimal (<c>x</c> and <c>X</c>) notation.  The letters "<c>abcdef</c>" are used for <c>x</c> conversions; the letters "<c>ABCDEF</c>" are used for <c>X</c> conversions.  The precision, if any, gives the minimum number of digits that must appear; if the converted value requires fewer digits, it is padded on the left with zeros.</description>
3028             </item>
3029             <item>
3030               <term>
3031                 <c>DOU</c>
3032               </term>
3033               <description>The <c>long int</c> argument is converted to signed decimal, unsigned octal, or unsigned decimal, as if the format had been <c>ld</c>, <c>lo</c>, or <c>lu</c> respectively.  These conversion characters are deprecated, and will eventually disappear.</description>
3034             </item>
3035             <item>
3036               <term>
3037                 <c>eE</c>
3038               </term>
3039               <description>The <c>double</c> argument is rounded and converted in the style <c>[-]d.ddde±dd</c> where there is one digit before the decimal-point character and the number of digits after it is equal to the precision; if the precision is missing, it is taken as 6; if the precision is zero, no decimal-point character appears.  An <c>E</c> conversion uses the letter '<c>E</c>' (rather than '<c>e</c>') to introduce the exponent.  The exponent always contains at least two digits; if the value is zero, the exponent is 00.</description>
3040               <para>For <c>a</c>, <c>A</c>, <c>e</c>, <c>E</c>, <c>f</c>, <c>F</c>, <c>g</c>, and <c>G</c> conversions, positive and negative infinity are represented as <c>inf</c> and <c>-inf</c> respectively when using the lowercase conversion character, and <c>INF</c> and <c>-INF</c> respectively when using the uppercase conversion character.  Similarly, <c>NaN</c> is represented as <c>nan</c> when using the lowercase conversion, and <c>NAN</c> when using the uppercase conversion.</para>
3041             </item>
3042             <item>
3043               <term>
3044                 <c>fF</c>
3045               </term>
3046               <description>The <c>double</c> argument is rounded and converted to decimal notation in the style <c>[-]ddd.ddd</c>, where the number of digits after the decimal-point character is equal to the precision specification.  If the precision is missing, it is taken as 6; if the precision is explicitly zero, no decimal-point character appears. If a decimal point appears, at least one digit appears before it.</description>
3047             </item>
3048             <item>
3049               <term>
3050                 <c>gG</c>
3051               </term>
3052               <description>The <c>double</c> argument is converted in style <c>f</c> or <c>e</c> (or <c>F</c> or <c>E</c> for <c>G</c> conversions). The precision specifies the number of significant digits.  If the precision is missing, 6 digits are given; if the precision is zero, it is treated as 1. Style <c>e</c> is used if the exponent from its conversion is less than -4 or greater than or equal to the precision.  Trailing zeros are removed from the fractional part of the result; a decimal point appears only if it is followed by at least one digit.</description>
3053             </item>
3054             <item>
3055               <term>
3056                 <c>aA</c>
3057               </term>
3058               <description>The <c>double</c> argument is rounded and converted to hexadecimal notation in the style <c>[-]0xh.hhhp[±]d</c>, where the number of digits after the hexadecimal-point character is equal to the precision specification.  If the precision is missing, it is taken as enough to represent the floating-point number exactly, and no rounding occurs.  If the precision is zero, no hexadecimal-point character appears.  The <c>p</c> is a literal character '<c>p</c>', and the exponent consists of a positive or negative sign followed by a decimal number representing an exponent of 2.  The <c>A</c> conversion uses the prefix "<c>0X</c>" (rather than "<c>0x</c>"), the letters "<c>ABCDEF</c>" (rather than "<c>abcdef</c>") to represent the hex digits, and the letter '<c>P</c>' (rather than '<c>p</c>') to separate the mantissa and exponent.
3059
3060 <para>Note that there may be multiple valid ways to represent floating-point numbers in this hexadecimal format.  For example, <c>0x3.24p+0</c>, <c>0x6.48p-1</c> and <c>0xc.9p-2</c> are all equivalent.  The format chosen depends on the internal representation of the number, but the implementation guarantees that the length of the mantissa will be minimized.  Zeroes are always represented with a mantissa of 0 (preceded by a '<c>-</c>' if appropriate) and an exponent of +0.
3061 </para></description>
3062             </item>
3063             <item>
3064               <term>
3065                 <c>C</c>
3066               </term>
3067               <description>Treated as <c>c</c> with the <c>l</c> (ell) modifier.</description>
3068             </item>
3069             <item>
3070               <term>
3071                 <c>c</c>
3072               </term>
3073               <description>The <c>int</c> argument is converted to an <c>unsigned char</c>, and the resulting character is written.
3074
3075 <para>If the <c>l</c> (ell) modifier is used, the <c>wint_t</c> argument shall be converted to a <c>wchar_t</c>, and the (potentially multi-byte) sequence representing the single wide character is written, including any shift sequences.  If a shift sequence is used, the shift state is also restored to the original state after the character.
3076 </para></description>
3077             </item>
3078             <item>
3079               <term>
3080                 <c>S</c>
3081               </term>
3082               <description>Treated as <c>s</c> with the <c>l</c> (ell) modifier.</description>
3083             </item>
3084             <item>
3085               <term>
3086                 <c>s</c>
3087               </term>
3088               <description>
3089 The <c>char *</c> argument is expected to be a pointer to an array of character type (pointer to a string).  Characters from the array are written up to (but not including) a terminating NUL character; if a precision is specified, no more than the number specified are written.  If a precision is given, no null character need be present; if the precision is not specified, or is greater than the size of the array, the array must contain a terminating NUL character.
3090
3091 <para>If the <c>l</c> (ell) modifier is used, the <c>wchar_t *</c> argument is expected to be a pointer to an array of wide characters (pointer to a wide string).  For each wide character in the string, the (potentially multi-byte) sequence representing the wide character is written, including any shift sequences.  If any shift sequence is used, the shift state is also restored to the original state after the string.  Wide characters from the array are written up to (but not including) a terminating wide NUL character; if a precision is specified, no more than the number of bytes specified are written (including shift sequences).  Partial characters are never written.  If a precision is given, no null character need be present; if the precision is not specified, or is greater than the number of bytes required to render the multibyte representation of the string, the array must contain a terminating wide NUL character.</para></description>
3092             </item>
3093             <item>
3094               <term>
3095                 <c>p</c>
3096               </term>
3097               <description>The <c>void *</c> pointer argument is printed in hexadecimal (as if by '<c>%#x</c>' or '<c>%#lx</c>').</description>
3098             </item>
3099             <item>
3100               <term>
3101                 <c>n</c>
3102               </term>
3103               <description>The number of characters written so far is stored into the integer indicated by the <c>int *</c> (or variant) pointer argument.  No argument is converted.</description>
3104             </item>
3105             <item>
3106               <term>
3107                 <c>%</c>
3108               </term>
3109               <description> A '<c>%</c>' is written.  No argument is converted.  The complete conversion specification is '<c>%%</c>'.</description>
3110             </item>
3111           </list>
3112           <para>The decimal point character is defined in the program's locale (category <c>LC_NUMERIC</c>)
3113 </para>
3114           <para>In no case does a non-existent or small field width cause truncation of a numeric field; if the result of a conversion is wider than the field width, the field is expanded to contain the conversion result.</para>
3115         </remarks>
3116       </Docs>
3117     </Member>
3118     <Member MemberName="snprintf">
3119       <MemberSignature Language="C#" Value="public static int snprintf (System.Text.StringBuilder s, ulong n, string message);" />
3120       <MemberSignature Language="ILAsm" Value=".method public static hidebysig int32 snprintf(class System.Text.StringBuilder s, unsigned int64 n, string message) cil managed" />
3121       <MemberType>Method</MemberType>
3122       <AssemblyInfo>
3123         <AssemblyVersion>1.0.5000.0</AssemblyVersion>
3124         <AssemblyVersion>2.0.0.0</AssemblyVersion>
3125         <AssemblyVersion>4.0.0.0</AssemblyVersion>
3126       </AssemblyInfo>
3127       <Attributes>
3128         <Attribute>
3129           <AttributeName>System.CLSCompliant(false)</AttributeName>
3130         </Attribute>
3131       </Attributes>
3132       <ReturnValue>
3133         <ReturnType>System.Int32</ReturnType>
3134       </ReturnValue>
3135       <Parameters>
3136         <Parameter Name="s" Type="System.Text.StringBuilder" />
3137         <Parameter Name="n" Type="System.UInt64" />
3138         <Parameter Name="message" Type="System.String" />
3139       </Parameters>
3140       <Docs>
3141         <param name="s">The buffer to print the message into.</param>
3142         <param name="n">The size of the buffer.</param>
3143         <param name="message">The message to print.</param>
3144         <summary>Print a string into a buffer.</summary>
3145         <returns>Returns the number of characters printed or the number of characters that would have been printed if the <paramref name="size" /> were unlimited (again, not including the final '<c>\0</c>').</returns>
3146         <remarks>The <c>snprintf</c> function will fill at most <paramref name="n" /> characters of the input buffer with the string <paramref name="message" />.</remarks>
3147       </Docs>
3148     </Member>
3149     <Member MemberName="snprintf">
3150       <MemberSignature Language="C#" Value="public static int snprintf (System.Text.StringBuilder s, ulong n, string format, object[] parameters);" />
3151       <MemberSignature Language="ILAsm" Value=".method public static hidebysig int32 snprintf(class System.Text.StringBuilder s, unsigned int64 n, string format, object[] parameters) cil managed" />
3152       <MemberType>Method</MemberType>
3153       <AssemblyInfo>
3154         <AssemblyVersion>1.0.5000.0</AssemblyVersion>
3155         <AssemblyVersion>2.0.0.0</AssemblyVersion>
3156         <AssemblyVersion>4.0.0.0</AssemblyVersion>
3157       </AssemblyInfo>
3158       <Attributes>
3159         <Attribute>
3160           <AttributeName>System.CLSCompliant(false)</AttributeName>
3161         </Attribute>
3162         <Attribute>
3163           <AttributeName>System.Obsolete("Not necessarily portable due to cdecl restrictions.
3164 Use snprintf (StringBuilder, string) instead.")</AttributeName>
3165         </Attribute>
3166       </Attributes>
3167       <ReturnValue>
3168         <ReturnType>System.Int32</ReturnType>
3169       </ReturnValue>
3170       <Parameters>
3171         <Parameter Name="s" Type="System.Text.StringBuilder" />
3172         <Parameter Name="n" Type="System.UInt64" />
3173         <Parameter Name="format" Type="System.String" />
3174         <Parameter Name="parameters" Type="System.Object[]">
3175           <Attributes>
3176             <Attribute>
3177               <AttributeName>System.ParamArray</AttributeName>
3178             </Attribute>
3179           </Attributes>
3180         </Parameter>
3181       </Parameters>
3182       <Docs>
3183         <param name="s">The buffer to print the message into.</param>
3184         <param name="n">The size of the buffer.</param>
3185         <param name="format">The message format string.</param>
3186         <param name="parameters">Arguments for the message format string.</param>
3187         <summary>Print a string into a buffer.</summary>
3188         <returns>Returns the number of characters printed or the number of characters that would have been printed if the <paramref name="size" /> were unlimited (again, not including the final '<c>\0</c>').</returns>
3189         <remarks>
3190           <para>The <c>snprintf</c>() family of functions produces output according to a format as described below.  <c>snprintf</c>() writes output to the given output <paramref name="stream" />.</para>
3191           <para>These functions write the output under the control of a <paramref name="format" /> string that specifies how subsequent arguments (or arguments accessed via the variable-length argument facilities of <c>stdarg</c>(3)) are converted for output.
3192 </para>
3193           <para>The format string is composed of zero or more directives: ordinary characters (not %), which are copied unchanged to the output stream; and conversion specifications, each of which results in fetching zero or more subsequent arguments.  Each conversion specification is introduced by the % character.  The arguments must correspond properly (after type promotion) with the conversion specifier.  After the %, the following appear in sequence:</para>
3194           <list type="bullet">
3195             <item>
3196               <term>An optional field, consisting of a decimal digit string followed by a <c>$</c>, specifying the next argument to access.  If this field is not provided, the argument following the last argument accessed will be used.  Arguments are numbered starting at <c>1</c>.  If unaccessed arguments in the format string are interspersed with ones that are accessed the results will be indeterminate.</term>
3197             </item>
3198             <item>
3199               <term>Zero or more of the following flags:
3200
3201 <list type="table"><listheader><term>Flag</term><description>Description</description></listheader><item><term>'<c>#</c>'</term><description>The value should be converted to an "alternate form".  For <c>c</c>, <c>d</c>, <c>i</c>, <c>n</c>, <c>p</c>, <c>s</c>, and <c>u</c> conversions, this option has no effect.  For <c>o</c> conversions, the precision of the number is increased to force the first character of the output string to a zero (except if a zero value is printed with an explicit precision of zero).  For <c>x</c> and <c>X</c> conversions, a non-zero result has the string '<c>0x</c>' (or '<c>0X</c>' for <c>X</c> conversions) prepended to it. For <c>a</c>, <c>A</c>, <c>e</c>, <c>E</c>, <c>f</c>, <c>F</c>, <c>g</c>, and <c>G</c> conversions, the result will always contain a decimal point, even if no digits follow it (normally, a decimal point appears in the results of those conversions only if a digit follows).  For <c>g</c> and <c>G</c> conversions, trailing zeros are not removed from the result as they would otherwise be.</description></item><item><term>'<c>0</c>' (zero)</term><description>Zero padding.  For all conversions except <c>n</c>, the converted value is padded on the left with zeros rather than blanks.  If a precision is given with a numeric conversion (<c>d</c>, <c>i</c>, <c>o</c>, <c>u</c>, <c>i</c>, <c>x</c>, and <c>X</c>), the 0 flag is ignored.</description></item><item><term>'<c>-</c>'</term><description>A negative field width flag; the converted value is to be left adjusted on the field boundary.  Except for <c>n</c> conversions, the converted value is padded on the right with blanks, rather than on the left with blanks or zeros.  A <c>-</c> overrides a <c>0</c> if both are given.</description></item><item><term>'<c />' (space)</term><description>A blank should be left before a positive number produced by a signed conversion (<c>a</c>, <c>A</c>, <c>d</c>, <c>e</c>, <c>E</c>, <c>f</c>, <c>F</c>, <c>g</c>, <c>G</c>, or <c>i</c>).</description></item><item><term>'<c>+</c>'</term><description>A sign must always be placed before a number produced by a signed conversion.  A <c>+</c> overrides a space if both are used.</description></item><item><term>'<c>'</c>'</term><description>Decimal conversions (<c>d</c>, <c>u</c>, or <c>i</c>) or the integral portion of a floating point conversion (<c>f</c> or <c>F</c>) should be grouped and separated by thousands using the non-monetary separator returned by <see cref="M:Mono.Unix.Native.Syscall.localeconv" />(3).</description></item></list></term>
3202             </item>
3203             <item>
3204               <term>An optional decimal digit string specifying a minimum field width.  If the converted value has fewer characters than the field width, it will be padded with spaces on the left (or right, if the left-adjustment flag has been given) to fill out the field width.</term>
3205             </item>
3206             <item>
3207               <term>An optional precision, in the form of a period . followed by an optional digit string.  If the digit string is omitted, the precision is taken as zero.  This gives the minimum number of digits to appear for <c>d</c>, <c>i</c>, <c>o</c>, <c>u</c>, <c>x</c>, and <c>X</c> conversions, the number of digits to appear after the decimal-point for <c>a</c>, <c>A</c>, <c>e</c>, <c>E</c>, <c>f</c>, and <c>F</c> conversions, the maximum number of significant digits for <c>g</c> and <c>G</c> conversions, or the maximum number of characters to be printed from a string for <c>s</c> conversions.</term>
3208             </item>
3209             <item>
3210               <term>An optional length modifier, that specifies the size of the argument.  The following length modifiers are valid for the <c>d</c>, <c>i</c>, <c>n</c>, <c>o</c>, <c>u</c>, <c>x</c>, or <c>X</c> conversion:
3211
3212 <list type="table"><listheader><term>Modifier</term><description><c>d</c>, <c>i</c></description><description><c>o, u, x, X</c></description><description><c>n</c></description></listheader><item><term><c>hh</c></term><description><c>signed char</c></description><description><c>unsigned char</c></description><description><c>signed char *</c></description></item><item><term><c>h</c></term><description><c>short</c></description><description><c>unsigned short</c></description><description><c>short *</c></description></item><item><term><c>l</c> (ell)</term><description><c>long</c></description><description><c>unsigned long</c></description><description><c>unsigned long *</c></description></item><item><term><c>ll</c> (ell ell)</term><description><c>long long</c></description><description><c>unsigned long long</c></description><description><c>long long *</c></description></item><item><term><c>j</c></term><description><c>intmax_t</c></description><description><c>uintmax_t</c></description><description><c>intmax_t *</c></description></item><item><term><c>t</c></term><description><c>ptrdiff_t</c></description><description>(see note)</description><description><c>ptrdiff_t *</c></description></item><item><term><c>z</c></term><description>(see note)</description><description><c>size_t</c></description><description>(see note)</description></item><item><term><c>q</c><i>(deprecated)</i></term><description><c>quad_t</c></description><description><c>u_quad_t</c></description><description><c>quad_t *</c></description></item></list><block subset="none" type="note"><para>the <c>t</c> modifier, when applied to a <c>o</c>, <c>u</c>, <c>x</c>, or <c>X</c> conversion, indicates that the argument is of an unsigned type equivalent in size to a <c>ptrdiff_t</c>.  The <c>z</c> modifier, when applied to a <c>d</c> or <c>i</c> conversion, indicates that the argument is of a signed type equivalent in size to a <c>size_t</c>.  Similarly, when applied to an <c>n</c> conversion, it indicates that the argument is a pointer to a signed type equivalent in size to a <c>size_t</c>.
3213   </para></block><para>The following length modifier is valid for the <c>a</c>, <c>A</c>, <c>e</c>, <c>E</c>, <c>f</c>, <c>F</c>, <c>g</c>, or <c>G</c> conversion:</para><list type="table"><listheader><term>Modifier</term><description><c>a, A, e, E, f, F, g, G</c></description></listheader><item><term><c>L</c></term><description><c>long double</c></description></item></list><para>The following length modifier is valid for the <c>c</c> or <c>s</c> conversion:</para><list type="table"><listheader><term>Modifier</term><description><c>c</c></description><description><c>s</c></description></listheader><item><term><c>l</c> (ell)</term><description><c>wint_t</c></description><description><c>wchar_t *</c></description></item></list></term>
3214             </item>
3215             <item>
3216               <term>A character that specifies the type of conversion to be applied.</term>
3217             </item>
3218           </list>
3219           <para>A field width or precision, or both, may be indicated by an asterisk '<c>*</c>' or an asterisk followed by one or more decimal digits and a '<c>$</c>' instead of a digit string.  In this case, an <i>int</i> argument supplies the field width or precision.  A negative field width is treated as a left adjustment flag followed by a positive field width; a negative precision is treated as though it were missing.  If a single format directive mixes positional (<c>nn$</c>) and non-positional arguments, the results are undefined
3220 </para>
3221           <para>The conversion specifiers and their meanings are:</para>
3222           <list type="table">
3223             <listheader>
3224               <term>Specifier</term>
3225               <description>Meaning</description>
3226             </listheader>
3227             <item>
3228               <term>
3229                 <c>diouxX</c>
3230               </term>
3231               <description>The <c>int</c> (or appropriate variant) argument is converted to signed decimal (<c>d</c> and <c>i</c>), unsigned octal (<c>o</c>), unsigned decimal (<c>u</c>), or unsigned hexadecimal (<c>x</c> and <c>X</c>) notation.  The letters "<c>abcdef</c>" are used for <c>x</c> conversions; the letters "<c>ABCDEF</c>" are used for <c>X</c> conversions.  The precision, if any, gives the minimum number of digits that must appear; if the converted value requires fewer digits, it is padded on the left with zeros.</description>
3232             </item>
3233             <item>
3234               <term>
3235                 <c>DOU</c>
3236               </term>
3237               <description>The <c>long int</c> argument is converted to signed decimal, unsigned octal, or unsigned decimal, as if the format had been <c>ld</c>, <c>lo</c>, or <c>lu</c> respectively.  These conversion characters are deprecated, and will eventually disappear.</description>
3238             </item>
3239             <item>
3240               <term>
3241                 <c>eE</c>
3242               </term>
3243               <description>The <c>double</c> argument is rounded and converted in the style <c>[-]d.ddde±dd</c> where there is one digit before the decimal-point character and the number of digits after it is equal to the precision; if the precision is missing, it is taken as 6; if the precision is zero, no decimal-point character appears.  An <c>E</c> conversion uses the letter '<c>E</c>' (rather than '<c>e</c>') to introduce the exponent.  The exponent always contains at least two digits; if the value is zero, the exponent is 00.</description>
3244               <para>For <c>a</c>, <c>A</c>, <c>e</c>, <c>E</c>, <c>f</c>, <c>F</c>, <c>g</c>, and <c>G</c> conversions, positive and negative infinity are represented as <c>inf</c> and <c>-inf</c> respectively when using the lowercase conversion character, and <c>INF</c> and <c>-INF</c> respectively when using the uppercase conversion character.  Similarly, <c>NaN</c> is represented as <c>nan</c> when using the lowercase conversion, and <c>NAN</c> when using the uppercase conversion.</para>
3245             </item>
3246             <item>
3247               <term>
3248                 <c>fF</c>
3249               </term>
3250               <description>The <c>double</c> argument is rounded and converted to decimal notation in the style <c>[-]ddd.ddd</c>, where the number of digits after the decimal-point character is equal to the precision specification.  If the precision is missing, it is taken as 6; if the precision is explicitly zero, no decimal-point character appears. If a decimal point appears, at least one digit appears before it.</description>
3251             </item>
3252             <item>
3253               <term>
3254                 <c>gG</c>
3255               </term>
3256               <description>The <c>double</c> argument is converted in style <c>f</c> or <c>e</c> (or <c>F</c> or <c>E</c> for <c>G</c> conversions). The precision specifies the number of significant digits.  If the precision is missing, 6 digits are given; if the precision is zero, it is treated as 1. Style <c>e</c> is used if the exponent from its conversion is less than -4 or greater than or equal to the precision.  Trailing zeros are removed from the fractional part of the result; a decimal point appears only if it is followed by at least one digit.</description>
3257             </item>
3258             <item>
3259               <term>
3260                 <c>aA</c>
3261               </term>
3262               <description>The <c>double</c> argument is rounded and converted to hexadecimal notation in the style <c>[-]0xh.hhhp[±]d</c>, where the number of digits after the hexadecimal-point character is equal to the precision specification.  If the precision is missing, it is taken as enough to represent the floating-point number exactly, and no rounding occurs.  If the precision is zero, no hexadecimal-point character appears.  The <c>p</c> is a literal character '<c>p</c>', and the exponent consists of a positive or negative sign followed by a decimal number representing an exponent of 2.  The <c>A</c> conversion uses the prefix "<c>0X</c>" (rather than "<c>0x</c>"), the letters "<c>ABCDEF</c>" (rather than "<c>abcdef</c>") to represent the hex digits, and the letter '<c>P</c>' (rather than '<c>p</c>') to separate the mantissa and exponent.
3263
3264 <para>Note that there may be multiple valid ways to represent floating-point numbers in this hexadecimal format.  For example, <c>0x3.24p+0</c>, <c>0x6.48p-1</c> and <c>0xc.9p-2</c> are all equivalent.  The format chosen depends on the internal representation of the number, but the implementation guarantees that the length of the mantissa will be minimized.  Zeroes are always represented with a mantissa of 0 (preceded by a '<c>-</c>' if appropriate) and an exponent of +0.
3265 </para></description>
3266             </item>
3267             <item>
3268               <term>
3269                 <c>C</c>
3270               </term>
3271               <description>Treated as <c>c</c> with the <c>l</c> (ell) modifier.</description>
3272             </item>
3273             <item>
3274               <term>
3275                 <c>c</c>
3276               </term>
3277               <description>The <c>int</c> argument is converted to an <c>unsigned char</c>, and the resulting character is written.
3278
3279 <para>If the <c>l</c> (ell) modifier is used, the <c>wint_t</c> argument shall be converted to a <c>wchar_t</c>, and the (potentially multi-byte) sequence representing the single wide character is written, including any shift sequences.  If a shift sequence is used, the shift state is also restored to the original state after the character.
3280 </para></description>
3281             </item>
3282             <item>
3283               <term>
3284                 <c>S</c>
3285               </term>
3286               <description>Treated as <c>s</c> with the <c>l</c> (ell) modifier.</description>
3287             </item>
3288             <item>
3289               <term>
3290                 <c>s</c>
3291               </term>
3292               <description>
3293 The <c>char *</c> argument is expected to be a pointer to an array of character type (pointer to a string).  Characters from the array are written up to (but not including) a terminating NUL character; if a precision is specified, no more than the number specified are written.  If a precision is given, no null character need be present; if the precision is not specified, or is greater than the size of the array, the array must contain a terminating NUL character.
3294
3295 <para>If the <c>l</c> (ell) modifier is used, the <c>wchar_t *</c> argument is expected to be a pointer to an array of wide characters (pointer to a wide string).  For each wide character in the string, the (potentially multi-byte) sequence representing the wide character is written, including any shift sequences.  If any shift sequence is used, the shift state is also restored to the original state after the string.  Wide characters from the array are written up to (but not including) a terminating wide NUL character; if a precision is specified, no more than the number of bytes specified are written (including shift sequences).  Partial characters are never written.  If a precision is given, no null character need be present; if the precision is not specified, or is greater than the number of bytes required to render the multibyte representation of the string, the array must contain a terminating wide NUL character.</para></description>
3296             </item>
3297             <item>
3298               <term>
3299                 <c>p</c>
3300               </term>
3301               <description>The <c>void *</c> pointer argument is printed in hexadecimal (as if by '<c>%#x</c>' or '<c>%#lx</c>').</description>
3302             </item>
3303             <item>
3304               <term>
3305                 <c>n</c>
3306               </term>
3307               <description>The number of characters written so far is stored into the integer indicated by the <c>int *</c> (or variant) pointer argument.  No argument is converted.</description>
3308             </item>
3309             <item>
3310               <term>
3311                 <c>%</c>
3312               </term>
3313               <description> A '<c>%</c>' is written.  No argument is converted.  The complete conversion specification is '<c>%%</c>'.</description>
3314             </item>
3315           </list>
3316           <para>The decimal point character is defined in the program's locale (category <c>LC_NUMERIC</c>)
3317 </para>
3318           <para>In no case does a non-existent or small field width cause truncation of a numeric field; if the result of a conversion is wider than the field width, the field is expanded to contain the conversion result.</para>
3319         </remarks>
3320       </Docs>
3321     </Member>
3322     <Member MemberName="srand">
3323       <MemberSignature Language="C#" Value="public static void srand (uint seed);" />
3324       <MemberSignature Language="ILAsm" Value=".method public static hidebysig pinvokeimpl (&quot;msvcrt&quot; as &quot;srand&quot; cdecl)void srand(unsigned int32 seed) cil managed" />
3325       <MemberType>Method</MemberType>
3326       <AssemblyInfo>
3327         <AssemblyVersion>1.0.5000.0</AssemblyVersion>
3328         <AssemblyVersion>2.0.0.0</AssemblyVersion>
3329         <AssemblyVersion>4.0.0.0</AssemblyVersion>
3330       </AssemblyInfo>
3331       <Attributes>
3332         <Attribute>
3333           <AttributeName>System.CLSCompliant(false)</AttributeName>
3334         </Attribute>
3335       </Attributes>
3336       <ReturnValue>
3337         <ReturnType>System.Void</ReturnType>
3338       </ReturnValue>
3339       <Parameters>
3340         <Parameter Name="seed" Type="System.UInt32" />
3341       </Parameters>
3342       <Docs>
3343         <param name="seed">The value to seed the random number generator with.</param>
3344         <summary>Initialize the random number generator.</summary>
3345         <remarks>
3346           <para>The <c>srand</c>() function sets its argument <paramref name="seed" /> as the seed for a new sequence of pseudo-random numbers to be returned by <see cref="M:Mono.Unix.Native.Stdlib.rand" />().  These sequences are repeatable by calling <c>srand</c>() with the same seed value.</para>
3347           <para>If no <paramref name="seed" /> value is provided, the functions are automatically seeded with a value of 1.</para>
3348         </remarks>
3349       </Docs>
3350     </Member>
3351     <Member MemberName="stderr">
3352       <MemberSignature Language="C#" Value="public static readonly IntPtr stderr;" />
3353       <MemberSignature Language="ILAsm" Value=".field public static initonly native int stderr" />
3354       <MemberType>Field</MemberType>
3355       <AssemblyInfo>
3356         <AssemblyVersion>1.0.5000.0</AssemblyVersion>
3357         <AssemblyVersion>2.0.0.0</AssemblyVersion>
3358         <AssemblyVersion>4.0.0.0</AssemblyVersion>
3359       </AssemblyInfo>
3360       <ReturnValue>
3361         <ReturnType>System.IntPtr</ReturnType>
3362       </ReturnValue>
3363       <Docs>
3364         <summary>Standard error <c>FILE</c> stream.</summary>
3365         <remarks>To be added.</remarks>
3366       </Docs>
3367     </Member>
3368     <Member MemberName="stdin">
3369       <MemberSignature Language="C#" Value="public static readonly IntPtr stdin;" />
3370       <MemberSignature Language="ILAsm" Value=".field public static initonly native int stdin" />
3371       <MemberType>Field</MemberType>
3372       <AssemblyInfo>
3373         <AssemblyVersion>1.0.5000.0</AssemblyVersion>
3374         <AssemblyVersion>2.0.0.0</AssemblyVersion>
3375         <AssemblyVersion>4.0.0.0</AssemblyVersion>
3376       </AssemblyInfo>
3377       <ReturnValue>
3378         <ReturnType>System.IntPtr</ReturnType>
3379       </ReturnValue>
3380       <Docs>
3381         <summary>Standard input <c>FILE</c> stream.</summary>
3382         <remarks>To be added.</remarks>
3383       </Docs>
3384     </Member>
3385     <Member MemberName="stdout">
3386       <MemberSignature Language="C#" Value="public static readonly IntPtr stdout;" />
3387       <MemberSignature Language="ILAsm" Value=".field public static initonly native int stdout" />
3388       <MemberType>Field</MemberType>
3389       <AssemblyInfo>
3390         <AssemblyVersion>1.0.5000.0</AssemblyVersion>
3391         <AssemblyVersion>2.0.0.0</AssemblyVersion>
3392         <AssemblyVersion>4.0.0.0</AssemblyVersion>
3393       </AssemblyInfo>
3394       <ReturnValue>
3395         <ReturnType>System.IntPtr</ReturnType>
3396       </ReturnValue>
3397       <Docs>
3398         <summary>Standard output <c>FILE</c> stream.</summary>
3399         <remarks>To be added.</remarks>
3400       </Docs>
3401     </Member>
3402     <Member MemberName="strerror">
3403       <MemberSignature Language="C#" Value="public static string strerror (Mono.Unix.Native.Errno errnum);" />
3404       <MemberSignature Language="ILAsm" Value=".method public static hidebysig string strerror(valuetype Mono.Unix.Native.Errno errnum) cil managed" />
3405       <MemberType>Method</MemberType>
3406       <AssemblyInfo>
3407         <AssemblyVersion>1.0.5000.0</AssemblyVersion>
3408         <AssemblyVersion>2.0.0.0</AssemblyVersion>
3409         <AssemblyVersion>4.0.0.0</AssemblyVersion>
3410       </AssemblyInfo>
3411       <Attributes>
3412         <Attribute>
3413           <AttributeName>System.CLSCompliant(false)</AttributeName>
3414         </Attribute>
3415       </Attributes>
3416       <ReturnValue>
3417         <ReturnType>System.String</ReturnType>
3418       </ReturnValue>
3419       <Parameters>
3420         <Parameter Name="errnum" Type="Mono.Unix.Native.Errno" />
3421       </Parameters>
3422       <Docs>
3423         <param name="errnum">Error number to get a message for.</param>
3424         <summary>Get error message string for 'errnum'.</summary>
3425         <returns>A string describing <paramref name="errnum" />.</returns>
3426         <remarks>
3427           <para>The strerror() function accepts an error number argument errnum and returns a pointer to the corresponding message string.</para>
3428           <para>If the error number is not recognized, these functions return an error message string containing "<c>Unknown error: </c>" followed by the error number in decimal.
3429 </para>
3430         </remarks>
3431       </Docs>
3432     </Member>
3433     <Member MemberName="strlen">
3434       <MemberSignature Language="C#" Value="public static ulong strlen (IntPtr s);" />
3435       <MemberSignature Language="ILAsm" Value=".method public static hidebysig pinvokeimpl (&quot;MonoPosixHelper&quot; as &quot;Mono_Posix_Stdlib_strlen&quot; cdecl lasterr)unsigned int64 strlen(native int s) cil managed" />
3436       <MemberType>Method</MemberType>
3437       <AssemblyInfo>
3438         <AssemblyVersion>1.0.5000.0</AssemblyVersion>
3439         <AssemblyVersion>2.0.0.0</AssemblyVersion>
3440         <AssemblyVersion>4.0.0.0</AssemblyVersion>
3441       </AssemblyInfo>
3442       <Attributes>
3443         <Attribute>
3444           <AttributeName>System.CLSCompliant(false)</AttributeName>
3445         </Attribute>
3446       </Attributes>
3447       <ReturnValue>
3448         <ReturnType>System.UInt64</ReturnType>
3449       </ReturnValue>
3450       <Parameters>
3451         <Parameter Name="s" Type="System.IntPtr" />
3452       </Parameters>
3453       <Docs>
3454         <param name="s">To be added.</param>
3455         <summary>To be added.</summary>
3456         <returns>To be added.</returns>
3457         <remarks>To be added.</remarks>
3458       </Docs>
3459     </Member>
3460     <Member MemberName="system">
3461       <MemberSignature Language="C#" Value="public static int system (string string);" />
3462       <MemberSignature Language="ILAsm" Value=".method public static hidebysig pinvokeimpl (&quot;msvcrt&quot; as &quot;system&quot; cdecl lasterr)int32 system(string string) cil managed" />
3463       <MemberType>Method</MemberType>
3464       <AssemblyInfo>
3465         <AssemblyVersion>1.0.5000.0</AssemblyVersion>
3466         <AssemblyVersion>2.0.0.0</AssemblyVersion>
3467         <AssemblyVersion>4.0.0.0</AssemblyVersion>
3468       </AssemblyInfo>
3469       <Attributes>
3470         <Attribute>
3471           <AttributeName>System.CLSCompliant(false)</AttributeName>
3472         </Attribute>
3473       </Attributes>
3474       <ReturnValue>
3475         <ReturnType>System.Int32</ReturnType>
3476       </ReturnValue>
3477       <Parameters>
3478         <Parameter Name="string" Type="System.String" />
3479       </Parameters>
3480       <Docs>
3481         <param name="string">The command to execute.</param>
3482         <summary>Pass a command to the shell.</summary>
3483         <returns>
3484           <para>If <paramref name="string" /> is <see langword="null" />, <c>system</c> will return a non-zero value if the command interpreter <c>sh</c>(1) is available, and zero if it is not.</para>
3485           <para>Otherwise, the <c>system</c> function returns the exit status of the shell as returned by <see cref="M:Mono.Unix.Native.Syscall.waitpid" />(2), or -1 if an error occurred when invoking <see cref="M:Mono.Unix.Native.Syscall.fork" />(2) or <see cref="M:Mono.Unix.Native.Syscall.waitpid" />(2).  A return value of 127 means the execution of the shell failed.
3486 </para>
3487         </returns>
3488         <remarks>The <c>system</c>() function hands the argument <paramref name="string" /> to the command interpreter <c>sh</c>(1).  The calling process waits for the shell to finish executing the command, ignoring <see cref="F:Mono.Unix.Native.Signum.SIGINT" /> and <see cref="F:Mono.Unix.Native.Signum.SIGQUIT" />, and blocking <see cref="F:Mono.Unix.Native.Signum.SIGCHLD" />.</remarks>
3489       </Docs>
3490     </Member>
3491     <Member MemberName="TMP_MAX">
3492       <MemberSignature Language="C#" Value="public static readonly int TMP_MAX;" />
3493       <MemberSignature Language="ILAsm" Value=".field public static initonly int32 TMP_MAX" />
3494       <MemberType>Field</MemberType>
3495       <AssemblyInfo>
3496         <AssemblyVersion>1.0.5000.0</AssemblyVersion>
3497         <AssemblyVersion>2.0.0.0</AssemblyVersion>
3498         <AssemblyVersion>4.0.0.0</AssemblyVersion>
3499       </AssemblyInfo>
3500       <Attributes>
3501         <Attribute>
3502           <AttributeName>System.CLSCompliant(false)</AttributeName>
3503         </Attribute>
3504       </Attributes>
3505       <ReturnValue>
3506         <ReturnType>System.Int32</ReturnType>
3507       </ReturnValue>
3508       <MemberValue>238328</MemberValue>
3509       <Docs>
3510         <summary>Maximum number of times <see cref="M:Mono.Unix.Native.Stdlib.tmpnam" />(3) will return different strings.</summary>
3511         <remarks>If <see cref="M:Mono.Unix.Native.Stdlib.tmpnam" />(3) is called more than <c>TMP_MAX</c> times, the behavior is implementation defined.</remarks>
3512       </Docs>
3513     </Member>
3514     <Member MemberName="tmpfile">
3515       <MemberSignature Language="C#" Value="public static IntPtr tmpfile ();" />
3516       <MemberSignature Language="ILAsm" Value=".method public static hidebysig pinvokeimpl (&quot;msvcrt&quot; as &quot;tmpfile&quot; cdecl lasterr)native int tmpfile() cil managed" />
3517       <MemberType>Method</MemberType>
3518       <AssemblyInfo>
3519         <AssemblyVersion>1.0.5000.0</AssemblyVersion>
3520         <AssemblyVersion>2.0.0.0</AssemblyVersion>
3521         <AssemblyVersion>4.0.0.0</AssemblyVersion>
3522       </AssemblyInfo>
3523       <ReturnValue>
3524         <ReturnType>System.IntPtr</ReturnType>
3525       </ReturnValue>
3526       <Parameters />
3527       <Docs>
3528         <summary>Create a temporary file.</summary>
3529         <returns>The <c>tmpfile</c>() function returns a pointer to an open file stream on success, and <see cref="F:System.IntPtr.Zero" /> on error.</returns>
3530         <remarks>
3531           <para>The <c>tmpfile</c>() function returns a pointer to a stream associated with a file descriptor returned by the routine <see cref="M:Mono.Unix.Native.Syscall.mkstemp" />(3).  The created file is unlinked before <c>tmpfile</c>() returns, causing the file to be automatically deleted when the last reference to it is closed.  The file is opened with the access value '<c>w+</c>'.  The file is created in the directory determined by the environment variable <c>TMPDIR</c> if set.  The default location if <c>TMPDIR</c> is not set is <c>/tmp</c>.</para>
3532           <para />
3533         </remarks>
3534       </Docs>
3535     </Member>
3536     <Member MemberName="tmpnam">
3537       <MemberSignature Language="C#" Value="public static string tmpnam ();" />
3538       <MemberSignature Language="ILAsm" Value=".method public static hidebysig string tmpnam() cil managed" />
3539       <MemberType>Method</MemberType>
3540       <AssemblyInfo>
3541         <AssemblyVersion>1.0.5000.0</AssemblyVersion>
3542         <AssemblyVersion>2.0.0.0</AssemblyVersion>
3543         <AssemblyVersion>4.0.0.0</AssemblyVersion>
3544       </AssemblyInfo>
3545       <Attributes>
3546         <Attribute>
3547           <AttributeName>System.Obsolete("Syscall.mkstemp() should be preferred.")</AttributeName>
3548         </Attribute>
3549       </Attributes>
3550       <ReturnValue>
3551         <ReturnType>System.String</ReturnType>
3552       </ReturnValue>
3553       <Parameters />
3554       <Docs>
3555         <summary>Generate a temporary file name.</summary>
3556         <returns>Returns a file name on success, and <see langword="null" /> on error.</returns>
3557         <remarks>The <c>tmpnam</c>() function returns a pointer to a file name, in the <c>/tmp</c> directory, which did not reference an existing file at some indeterminate point in the past.</remarks>
3558       </Docs>
3559     </Member>
3560     <Member MemberName="tmpnam">
3561       <MemberSignature Language="C#" Value="public static string tmpnam (System.Text.StringBuilder s);" />
3562       <MemberSignature Language="ILAsm" Value=".method public static hidebysig string tmpnam(class System.Text.StringBuilder s) cil managed" />
3563       <MemberType>Method</MemberType>
3564       <AssemblyInfo>
3565         <AssemblyVersion>1.0.5000.0</AssemblyVersion>
3566         <AssemblyVersion>2.0.0.0</AssemblyVersion>
3567         <AssemblyVersion>4.0.0.0</AssemblyVersion>
3568       </AssemblyInfo>
3569       <Attributes>
3570         <Attribute>
3571           <AttributeName>System.Obsolete("Syscall.mkstemp() should be preferred.")</AttributeName>
3572         </Attribute>
3573       </Attributes>
3574       <ReturnValue>
3575         <ReturnType>System.String</ReturnType>
3576       </ReturnValue>
3577       <Parameters>
3578         <Parameter Name="s" Type="System.Text.StringBuilder" />
3579       </Parameters>
3580       <Docs>
3581         <param name="s">Buffer to store the temporary filename into</param>
3582         <summary>Generate a temporary file name.</summary>
3583         <returns>Returns a file name on success, and <see langword="null" /> on error.</returns>
3584         <remarks>
3585           <para>The <c>tmpnam</c>() function returns a pointer to a file name, in the <c>/tmp</c> directory, which did not reference an existing file at some indeterminate point in the past.  If the argument <paramref name="s" /> is not <see langword="null" />, the file name is copied into the buffer it references.</para>
3586           <para>The buffer referenced by <paramref name="s" /> is expected to be at least <see cref="F:Mono.Unix.Native.Stdlib.L_tmpnam" /> bytes in length.</para>
3587         </remarks>
3588       </Docs>
3589     </Member>
3590     <Member MemberName="ungetc">
3591       <MemberSignature Language="C#" Value="public static int ungetc (int c, IntPtr stream);" />
3592       <MemberSignature Language="ILAsm" Value=".method public static hidebysig pinvokeimpl (&quot;msvcrt&quot; as &quot;ungetc&quot; cdecl lasterr)int32 ungetc(int32 c, native int stream) cil managed" />
3593       <MemberType>Method</MemberType>
3594       <AssemblyInfo>
3595         <AssemblyVersion>1.0.5000.0</AssemblyVersion>
3596         <AssemblyVersion>2.0.0.0</AssemblyVersion>
3597         <AssemblyVersion>4.0.0.0</AssemblyVersion>
3598       </AssemblyInfo>
3599       <ReturnValue>
3600         <ReturnType>System.Int32</ReturnType>
3601       </ReturnValue>
3602       <Parameters>
3603         <Parameter Name="c" Type="System.Int32" />
3604         <Parameter Name="stream" Type="System.IntPtr" />
3605       </Parameters>
3606       <Docs>
3607         <param name="c">The character to unget.</param>
3608         <param name="stream">The <c>FILE</c> stream to unget <paramref name="c" /> on.</param>
3609         <summary>Un-get character from input <c>FILE</c> stream.</summary>
3610         <returns>The <c>ungetc</c>() function returns the character pushed-back after the conversion, or <see cref="F:Mono.Unix.Native.Stdlib.EOF" /> if the operation fails.  If the value of the argument <paramref name="c" /> character equals <see cref="F:Mono.Unix.Native.Stdlib.EOF" />, the operation will fail and the stream will remain unchanged.</returns>
3611         <remarks>
3612           <para>The <c>ungetc</c>() function pushes the character <paramref name="c" /> (converted to an unsigned char) back onto the input stream pointed to by <paramref name="stream" />.  The pushed-back characters will be returned by subsequent reads on the stream (in reverse order).  A successful intervening call, using the same stream, to one of the file positioning functions (<see cref="M:Mono.Unix.Native.Stdlib.fseek" />(3), <see cref="M:Mono.Unix.Native.Stdlib.fsetpos" />(3), or <see cref="M:Mono.Unix.Native.Stdlib.rewind" />(3)) will discard the pushed back characters.
3613 </para>
3614           <para>One character of push-back is guaranteed, but as long as there is sufficient memory, an effectively infinite amount of pushback is allowed.
3615 </para>
3616           <para>If a character is successfully pushed-back, the end-of-file indicator for the stream is cleared.  The file-position indicator is decremented by each successful call to <c>ungetc</c>(); if its value was 0 before a call, its value is unspecified after the call.
3617 </para>
3618         </remarks>
3619       </Docs>
3620     </Member>
3621   </Members>
3622 </Type>