Wire Sysio Wire Sysion 1.0.0
Loading...
Searching...
No Matches
testing::internal::posix Namespace Reference

Typedefs

typedef struct stat StatStruct
 

Functions

int FileNo (FILE *file)
 
int IsATTY (int fd)
 
int Stat (const char *path, StatStruct *buf)
 
int StrCaseCmp (const char *s1, const char *s2)
 
char * StrDup (const char *src)
 
int RmDir (const char *dir)
 
bool IsDir (const StatStruct &st)
 
const char * StrNCpy (char *dest, const char *src, size_t n)
 
int ChDir (const char *dir)
 
FILE * FOpen (const char *path, const char *mode)
 
FILE * FReopen (const char *path, const char *mode, FILE *stream)
 
FILE * FDOpen (int fd, const char *mode)
 
int FClose (FILE *fp)
 
int Read (int fd, void *buf, unsigned int count)
 
int Write (int fd, const void *buf, unsigned int count)
 
int Close (int fd)
 
const char * StrError (int errnum)
 
const char * GetEnv (const char *name)
 
void Abort ()
 

Typedef Documentation

◆ StatStruct

Definition at line 2470 of file gtest-port.h.

Function Documentation

◆ Abort()

void testing::internal::posix::Abort ( )
inline

Definition at line 2542 of file gtest-port.h.

2542{ abort(); }
Here is the caller graph for this function:

◆ ChDir()

int testing::internal::posix::ChDir ( const char * dir)
inline

Definition at line 2497 of file gtest-port.h.

2497{ return chdir(dir); }

◆ Close()

int testing::internal::posix::Close ( int fd)
inline

Definition at line 2516 of file gtest-port.h.

2516{ return close(fd); }
void close(T *e, websocketpp::connection_hdl hdl)
Here is the call graph for this function:

◆ FClose()

int testing::internal::posix::FClose ( FILE * fp)
inline

Definition at line 2508 of file gtest-port.h.

2508{ return fclose(fp); }

◆ FDOpen()

FILE * testing::internal::posix::FDOpen ( int fd,
const char * mode )
inline

Definition at line 2506 of file gtest-port.h.

2506{ return fdopen(fd, mode); }

◆ FileNo()

int testing::internal::posix::FileNo ( FILE * file)
inline

Definition at line 2472 of file gtest-port.h.

2472{ return fileno(file); }

◆ FOpen()

FILE * testing::internal::posix::FOpen ( const char * path,
const char * mode )
inline

Definition at line 2499 of file gtest-port.h.

2499 {
2500 return fopen(path, mode);
2501}
Here is the caller graph for this function:

◆ FReopen()

FILE * testing::internal::posix::FReopen ( const char * path,
const char * mode,
FILE * stream )
inline

Definition at line 2503 of file gtest-port.h.

2503 {
2504 return freopen(path, mode, stream);
2505}
Here is the caller graph for this function:

◆ GetEnv()

const char * testing::internal::posix::GetEnv ( const char * name)
inline

Definition at line 2519 of file gtest-port.h.

2519 {
2520#if GTEST_OS_WINDOWS_MOBILE || GTEST_OS_WINDOWS_PHONE || GTEST_OS_WINDOWS_RT
2521 // We are on Windows CE, which has no environment variables.
2522 static_cast<void>(name); // To prevent 'unused argument' warning.
2523 return NULL;
2524#elif defined(__BORLANDC__) || defined(__SunOS_5_8) || defined(__SunOS_5_9)
2525 // Environment variables which we programmatically clear will be set to the
2526 // empty string rather than unset (NULL). Handle that case.
2527 const char* const env = getenv(name);
2528 return (env != NULL && env[0] != '\0') ? env : NULL;
2529#else
2530 return getenv(name);
2531#endif
2532}
std::string name
Here is the caller graph for this function:

◆ IsATTY()

int testing::internal::posix::IsATTY ( int fd)
inline

Definition at line 2473 of file gtest-port.h.

2473{ return isatty(fd); }

◆ IsDir()

bool testing::internal::posix::IsDir ( const StatStruct & st)
inline

Definition at line 2480 of file gtest-port.h.

2480{ return S_ISDIR(st.st_mode); }
Here is the caller graph for this function:

◆ Read()

int testing::internal::posix::Read ( int fd,
void * buf,
unsigned int count )
inline

Definition at line 2510 of file gtest-port.h.

2510 {
2511 return static_cast<int>(read(fd, buf, count));
2512}
int * count
uint8_t buf[2048]

◆ RmDir()

int testing::internal::posix::RmDir ( const char * dir)
inline

Definition at line 2479 of file gtest-port.h.

2479{ return rmdir(dir); }

◆ Stat()

int testing::internal::posix::Stat ( const char * path,
StatStruct * buf )
inline

Definition at line 2474 of file gtest-port.h.

2474{ return stat(path, buf); }
Here is the caller graph for this function:

◆ StrCaseCmp()

int testing::internal::posix::StrCaseCmp ( const char * s1,
const char * s2 )
inline

Definition at line 2475 of file gtest-port.h.

2475 {
2476 return strcasecmp(s1, s2);
2477}
Here is the caller graph for this function:

◆ StrDup()

char * testing::internal::posix::StrDup ( const char * src)
inline

Definition at line 2478 of file gtest-port.h.

2478{ return strdup(src); }

◆ StrError()

const char * testing::internal::posix::StrError ( int errnum)
inline

Definition at line 2517 of file gtest-port.h.

2517{ return strerror(errnum); }

◆ StrNCpy()

const char * testing::internal::posix::StrNCpy ( char * dest,
const char * src,
size_t n )
inline

Definition at line 2488 of file gtest-port.h.

2488 {
2489 return strncpy(dest, src, n);
2490}

◆ Write()

int testing::internal::posix::Write ( int fd,
const void * buf,
unsigned int count )
inline

Definition at line 2513 of file gtest-port.h.

2513 {
2514 return static_cast<int>(write(fd, buf, count));
2515}