OS_NS_stdio.h File Reference

#include "ace/config-all.h"
#include "ace/os_include/os_stdio.h"
#include "ace/os_include/os_fcntl.h"
#include "ace/OS_NS_stdio.inl"

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.

Namespaces

namespace  ACE_OS

Classes

class  ACE_OS::ace_flock_t
 OS file locking structure. More...
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)

Defines

#define ACE_EXPORT_MACRO   ACE_Export
#define ACE_INLINE   inline

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)
char * ace_cuserid (char *user)
 Helper for the ACE_OS::cuserid() function.
ACE_NAMESPACE_INLINE_FUNCTION
void 
ACE_OS::clearerr (FILE *fp)
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
FILE * 
ACE_OS::fopen (const char *filename, const ACE_TCHAR *mode)
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)
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)
int ACE_OS::snprintf (char *buf, size_t maxlen, const char *format,...)
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)
int ACE_OS::vasprintf_emulation (char **bufp, const char *format, va_list argptr)


Detailed Description

Id
OS_NS_stdio.h 80826 2008-03-04 14:51:23Z wotte

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 40 of file OS_NS_stdio.h.

#define ACE_INLINE   inline

Definition at line 525 of file OS_NS_stdio.h.


Function Documentation

void ace_clearerr_helper ( FILE *  stream  )  [inline]

Definition at line 50 of file OS_NS_stdio.h.

References ACE_OS::clearerr().

Referenced by ACE_OS::clearerr().

00051 {
00052 #  if defined (clearerr)
00053   clearerr (stream);
00054 #  undef clearerr
00055 #  else
00056   ACE_STD_NAMESPACE::clearerr (stream);
00057 #  endif /* defined (clearerr) */
00058 }

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 128 of file OS_NS_stdio.h.

References ACE_OS::cuserid().

Referenced by ACE_OS::cuserid().

00129 {
00130   return cuserid(user);
00131 }

int ace_fgetc_helper ( FILE *  fp  )  [inline]

Definition at line 61 of file OS_NS_stdio.h.

References ACE_OS::fgetc().

Referenced by ACE_OS::fgetc().

00062 {
00063 #if defined (fgetc)
00064   return fgetc (fp);
00065 #undef fgetc
00066 #else
00067   return ACE_STD_NAMESPACE::fgetc (fp);
00068 #endif /* defined (fgetc) */
00069 }

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

Definition at line 71 of file OS_NS_stdio.h.

References ACE_OS::fputc().

Referenced by ACE_OS::fputc().

00072 {
00073 #if defined (fputc)
00074   return fputc (ch, fp);
00075 #undef fputc
00076 #else
00077   return ACE_STD_NAMESPACE::fputc (ch, fp);
00078 #endif /* defined (fputc) */
00079 }

int ace_getc_helper ( FILE *  fp  )  [inline]

Definition at line 81 of file OS_NS_stdio.h.

References ACE_OS::getc().

Referenced by ACE_OS::getc().

00082 {
00083 #if defined (getc)
00084   return getc (fp);
00085 #undef getc
00086 #else
00087   return ACE_STD_NAMESPACE::getc (fp);
00088 #endif /* defined (getc) */
00089 }

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

Definition at line 91 of file OS_NS_stdio.h.

References ACE_OS::putc().

Referenced by ACE_OS::putc().

00092 {
00093 #if defined (putc)
00094   return putc (ch, fp);
00095 #undef putc
00096 #else
00097   return ACE_STD_NAMESPACE::putc (ch, fp);
00098 #endif /* defined (putc) */
00099 }

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

Definition at line 101 of file OS_NS_stdio.h.

References ACE_OS::ungetc().

Referenced by ACE_OS::ungetc().

00102 {
00103 #if defined (ungetc)
00104   return ungetc (ch, fp);
00105 #undef ungetc
00106 #else
00107   return ACE_STD_NAMESPACE::ungetc (ch, fp);
00108 #endif /* defined (ungetc) */
00109 }


Generated on Tue Feb 2 17:30:23 2010 for ACE by  doxygen 1.4.7