OS_NS_stdio.h File Reference

#include "ace/os_include/os_stdio.h"
#include "ace/os_include/os_fcntl.h"
Include dependency graph for OS_NS_stdio.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  ACE_OS::ace_flock_t
 OS file locking structure. More...

Namespaces

namespace  ACE_OS
 

This namespace defines an OS independent programming API that shields developers from nonportable aspects of writing efficient system programs on Win32, POSIX and other versions of UNIX, and various real-time operating systems.


Defines

#define ACE_EXPORT_MACRO   ACE_Export

Functions

void ace_clearerr_helper (FILE *stream)
int ace_fgetc_helper (FILE *fp)
int ace_fputc_helper (int ch, FILE *fp)
int ace_getc_helper (FILE *fp)
int ace_putc_helper (int ch, FILE *fp)
int ace_ungetc_helper (int ch, FILE *fp)
ACE_HANDLE ace_fileno_helper (FILE *fp)
char * ace_cuserid (char *user)
 Helper for the ACE_OS::cuserid() function.
ACE_NAMESPACE_INLINE_FUNCTION void ACE_OS::clearerr (FILE *fp)
ACE_Export int ACE_OS::asprintf (char **bufp, const char *format,...)
ACE_NAMESPACE_INLINE_FUNCTION int ACE_OS::fclose (FILE *fp)
ACE_NAMESPACE_INLINE_FUNCTION
FILE * 
ACE_OS::fdopen (ACE_HANDLE handle, const ACE_TCHAR *mode)
ACE_NAMESPACE_INLINE_FUNCTION int ACE_OS::fflush (FILE *fp)
ACE_NAMESPACE_INLINE_FUNCTION int ACE_OS::fgetc (FILE *fp)
ACE_NAMESPACE_INLINE_FUNCTION int ACE_OS::getc (FILE *fp)
ACE_NAMESPACE_INLINE_FUNCTION int ACE_OS::fgetpos (FILE *fp, fpos_t *pos)
ACE_NAMESPACE_INLINE_FUNCTION
char * 
ACE_OS::fgets (char *buf, int size, FILE *fp)
ACE_NAMESPACE_INLINE_FUNCTION
ACE_HANDLE 
ACE_OS::fileno (FILE *stream)
ACE_NAMESPACE_INLINE_FUNCTION
FILE * 
ACE_OS::fopen (const char *filename, const char *mode)
ACE_Export int ACE_OS::fprintf (FILE *fp, const char *format,...)
ACE_NAMESPACE_INLINE_FUNCTION int ACE_OS::ungetc (int c, FILE *fp)
ACE_NAMESPACE_INLINE_FUNCTION int ACE_OS::fputc (int c, FILE *fp)
ACE_NAMESPACE_INLINE_FUNCTION int ACE_OS::putc (int c, FILE *fp)
ACE_NAMESPACE_INLINE_FUNCTION int ACE_OS::fputs (const char *s, FILE *stream)
ACE_NAMESPACE_INLINE_FUNCTION
size_t 
ACE_OS::fread (void *ptr, size_t size, size_t nelems, FILE *fp)
ACE_NAMESPACE_INLINE_FUNCTION
FILE * 
ACE_OS::freopen (const ACE_TCHAR *filename, const ACE_TCHAR *mode, FILE *stream)
ACE_NAMESPACE_INLINE_FUNCTION int ACE_OS::fseek (FILE *fp, long offset, int ptrname)
ACE_NAMESPACE_INLINE_FUNCTION int ACE_OS::fsetpos (FILE *fp, fpos_t *pos)
ACE_NAMESPACE_INLINE_FUNCTION long ACE_OS::ftell (FILE *fp)
ACE_NAMESPACE_INLINE_FUNCTION
size_t 
ACE_OS::fwrite (const void *ptr, size_t size, size_t nitems, FILE *fp)
ACE_NAMESPACE_INLINE_FUNCTION void ACE_OS::perror (const char *s)
ACE_Export int ACE_OS::printf (const char *format,...)
ACE_NAMESPACE_INLINE_FUNCTION int ACE_OS::puts (const char *s)
ACE_NAMESPACE_INLINE_FUNCTION int ACE_OS::rename (const char *old_name, const char *new_name, int flags=-1)
ACE_NAMESPACE_INLINE_FUNCTION void ACE_OS::rewind (FILE *fp)
ACE_Export int ACE_OS::snprintf (char *buf, size_t maxlen, const char *format,...)
ACE_Export int ACE_OS::sprintf (char *buf, const char *format,...)
ACE_NAMESPACE_INLINE_FUNCTION
char * 
ACE_OS::tempnam (const char *dir=0, const char *pfx=0)
ACE_NAMESPACE_INLINE_FUNCTION int ACE_OS::vasprintf (char **bufp, const char *format, va_list argptr)
ACE_NAMESPACE_INLINE_FUNCTION int ACE_OS::vprintf (const char *format, va_list argptr)
ACE_NAMESPACE_INLINE_FUNCTION int ACE_OS::vfprintf (FILE *fp, const char *format, va_list argptr)
ACE_NAMESPACE_INLINE_FUNCTION int ACE_OS::vsprintf (char *buffer, const char *format, va_list argptr)
ACE_NAMESPACE_INLINE_FUNCTION int ACE_OS::vsnprintf (char *buffer, size_t maxlen, const char *format, va_list argptr)
ACE_Export int ACE_OS::vasprintf_emulation (char **bufp, const char *format, va_list argptr)



ACE_NAMESPACE_INLINE_FUNCTION
char * 
ACE_OS::cuserid (char *user, size_t maxlen=ACE_MAX_USERID)
ACE_NAMESPACE_INLINE_FUNCTION int ACE_OS::flock_init (ace_flock_t *lock, int flags=0, const ACE_TCHAR *name=0, mode_t perms=0)
ACE_NAMESPACE_INLINE_FUNCTION int ACE_OS::flock_destroy (ace_flock_t *lock, int unlink_file=1)
ACE_NAMESPACE_INLINE_FUNCTION int ACE_OS::flock_rdlock (ace_flock_t *lock, short whence=0, ACE_OFF_T start=0, ACE_OFF_T len=0)
ACE_NAMESPACE_INLINE_FUNCTION int ACE_OS::flock_tryrdlock (ace_flock_t *lock, short whence=0, ACE_OFF_T start=0, ACE_OFF_T len=0)
ACE_NAMESPACE_INLINE_FUNCTION int ACE_OS::flock_trywrlock (ace_flock_t *lock, short whence=0, ACE_OFF_T start=0, ACE_OFF_T len=0)
ACE_NAMESPACE_INLINE_FUNCTION int ACE_OS::flock_unlock (ace_flock_t *lock, short whence=0, ACE_OFF_T start=0, ACE_OFF_T len=0)
ACE_NAMESPACE_INLINE_FUNCTION int ACE_OS::flock_wrlock (ace_flock_t *lock, short whence=0, ACE_OFF_T start=0, ACE_OFF_T len=0)

Detailed Description

Id
OS_NS_stdio.h 87143 2009-10-17 10:29:01Z olli
Author:
Douglas C. Schmidt <schmidt@cs.wustl.edu>
Jesper S. M|ller<stophph@diku.dk>
and a cast of thousands...

Originally in OS.h.

Definition in file OS_NS_stdio.h.


Define Documentation

#define ACE_EXPORT_MACRO   ACE_Export

Definition at line 44 of file OS_NS_stdio.h.


Function Documentation

void ace_clearerr_helper ( FILE *  stream  )  [inline]

Definition at line 54 of file OS_NS_stdio.h.

00055 {
00056 #  if defined (clearerr)
00057   clearerr (stream);
00058 #  undef clearerr
00059 #  else
00060   ACE_STD_NAMESPACE::clearerr (stream);
00061 #  endif /* defined (clearerr) */
00062 }

char* ace_cuserid ( char *  user  )  [inline]

Helper for the ACE_OS::cuserid() function.

On some platforms cuserid is a macro. Defining ACE_OS::cuserid() becomes really hard, as there is no way to save the macro definition using the pre-processor. This inline function achieves the same effect, without namespace pollution or performance penalties.

Todo:
We maybe should move a lot of the code in ACE_OS::cuserid here so it is treated the same as the above ace_difftime and ace_timezone. But since there is a good deal more code in ACE_OS::cuserid, we probably need to move some of it off into some sort of emulation function.

Definition at line 143 of file OS_NS_stdio.h.

00144 {
00145   return cuserid(user);
00146 }

int ace_fgetc_helper ( FILE *  fp  )  [inline]

Definition at line 65 of file OS_NS_stdio.h.

00066 {
00067 #if defined (fgetc)
00068   return fgetc (fp);
00069 #undef fgetc
00070 #else
00071   return ACE_STD_NAMESPACE::fgetc (fp);
00072 #endif /* defined (fgetc) */
00073 }

ACE_HANDLE ace_fileno_helper ( FILE *  fp  )  [inline]

Definition at line 116 of file OS_NS_stdio.h.

00117 {
00118 # if defined (fileno)
00119   return (ACE_HANDLE)fileno (fp);
00120 # undef fileno
00121 # else
00122   return (ACE_HANDLE)ACE_STD_NAMESPACE::fileno (fp);
00123 # endif /* defined (fileno) */
00124 }

int ace_fputc_helper ( int  ch,
FILE *  fp 
) [inline]

Definition at line 75 of file OS_NS_stdio.h.

00076 {
00077 #if defined (fputc)
00078   return fputc (ch, fp);
00079 #undef fputc
00080 #else
00081   return ACE_STD_NAMESPACE::fputc (ch, fp);
00082 #endif /* defined (fputc) */
00083 }

int ace_getc_helper ( FILE *  fp  )  [inline]

Definition at line 85 of file OS_NS_stdio.h.

00086 {
00087 #if defined (getc)
00088   return getc (fp);
00089 #undef getc
00090 #else
00091   return ACE_STD_NAMESPACE::getc (fp);
00092 #endif /* defined (getc) */
00093 }

int ace_putc_helper ( int  ch,
FILE *  fp 
) [inline]

Definition at line 95 of file OS_NS_stdio.h.

00096 {
00097 #if defined (putc)
00098   return putc (ch, fp);
00099 #undef putc
00100 #else
00101   return ACE_STD_NAMESPACE::putc (ch, fp);
00102 #endif /* defined (putc) */
00103 }

int ace_ungetc_helper ( int  ch,
FILE *  fp 
) [inline]

Definition at line 105 of file OS_NS_stdio.h.

00106 {
00107 #if defined (ungetc)
00108   return ungetc (ch, fp);
00109 #undef ungetc
00110 #else
00111   return ACE_STD_NAMESPACE::ungetc (ch, fp);
00112 #endif /* defined (ungetc) */
00113 }

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on Sun Nov 22 23:11:37 2009 for ACE by  doxygen 1.6.1