Convert-Binary-C

 view release on metacpan or  search on metacpan

tests/include/pdclib/auxiliary/errno/errno_readout.c  view on Meta::CPAN

    */
    { "_PDCLIB_E2BIG", E2BIG, "Argument list too long" },
    { "_PDCLIB_EACCES", EACCES, "Permission denied" },
    { "_PDCLIB_EADDRINUSE", EADDRINUSE, "Address in use" },
    { "_PDCLIB_EADDRNOTAVAIL", EADDRNOTAVAIL, "Address not available" },
    { "_PDCLIB_EAFNOSUPPORT", EAFNOSUPPORT, "Address family not supported" },
    { "_PDCLIB_EAGAIN", EAGAIN, "Resource unavailable, try again" },
    { "_PDCLIB_EALREADY", EALREADY, "Connection already in progress" },
    { "_PDCLIB_EBADF", EBADF, "Bad file descriptor" },
    { "_PDCLIB_EBADMSG", EBADMSG, "Bad message" },
    { "_PDCLIB_EBUSY", EBUSY, "Device or resource busy" },
    { "_PDCLIB_ECANCELED", ECANCELED, "Operation canceled" },
    { "_PDCLIB_ECHILD", ECHILD, "No child processes" },
    { "_PDCLIB_ECONNABORTED", ECONNABORTED, "Connection aborted" },
    { "_PDCLIB_ECONNREFUSED", ECONNREFUSED, "Connection refused" },
    { "_PDCLIB_ECONNRESET", ECONNRESET, "Connection reset" },
    { "_PDCLIB_EDEADLK", EDEADLK, "Resource deadlock would occur" },
    { "_PDCLIB_EDESTADDRREQ", EDESTADDRREQ, "Destination address required" },
    { "_PDCLIB_EDOM", EDOM, "Mathematics argument out of domain of function" },
    { "_PDCLIB_EEXIST", EEXIST, "File exists" },
    { "_PDCLIB_EFAULT", EFAULT, "Bad address" },

tests/include/pdclib/auxiliary/errno/errno_readout.c  view on Meta::CPAN

    { "_PDCLIB_EPIPE", EPIPE, "Broken pipe" },
    { "_PDCLIB_EPROTO", EPROTO, "Protocol error" },
    { "_PDCLIB_EPROTONOSUPPORT", EPROTONOSUPPORT, "Protocol not supported" },
    { "_PDCLIB_EPROTOTYPE", EPROTOTYPE, "Protocol wrong type for socket" },
    { "_PDCLIB_ERANGE", ERANGE, "Result too large" },
    { "_PDCLIB_EROFS", EROFS, "Read-only file system" },
    { "_PDCLIB_ESPIPE", ESPIPE, "Invalid seek" },
    { "_PDCLIB_ESRCH", ESRCH, "No such process" },
    { "_PDCLIB_ETIME", ETIME, "Stream ioctl() timeout" },
    { "_PDCLIB_ETIMEDOUT", ETIMEDOUT, "Connection timed out" },
    { "_PDCLIB_ETXTBSY", ETXTBSY, "Text file busy" },
    { "_PDCLIB_EWOULDBLOCK", EWOULDBLOCK, "Operation would block" },
    { "_PDCLIB_EXDEV", EXDEV, "Cross-device link" },

};

int main( int argc, char * argv[] )
{
    const char * unknown_error_text = "unknown error";
    size_t errno_max = 0;
    size_t text_len_max = strlen( unknown_error_text );

tests/include/pdclib/include/errno.h  view on Meta::CPAN

/* Address family not supported */
#define EAFNOSUPPORT    _PDCLIB_EAFNOSUPPORT
/* Resource unavailable, try again */
#define EAGAIN          _PDCLIB_EAGAIN
/* Connection already in progress */
#define EALREADY        _PDCLIB_EALREADY
/* Bad file descriptor */
#define EBADF           _PDCLIB_EBADF
/* Bad message */
#define EBADMSG         _PDCLIB_EBADMSG
/* Device or resource busy */
#define EBUSY           _PDCLIB_EBUSY
/* Operation canceled */
#define ECANCELED       _PDCLIB_ECANCELED
/* No child processes */
#define ECHILD          _PDCLIB_ECHILD
/* Connection aborted */
#define ECONNABORTED    _PDCLIB_ECONNABORTED
/* Connection refused */
#define ECONNREFUSED    _PDCLIB_ECONNREFUSED
/* Connection reset */

tests/include/pdclib/include/errno.h  view on Meta::CPAN

/* Read-only file system */
#define EROFS           _PDCLIB_EROFS
/* Invalid seek */
#define ESPIPE          _PDCLIB_ESPIPE
/* No such process */
#define ESRCH           _PDCLIB_ESRCH
/* Stream ioctl() timeout */
#define ETIME           _PDCLIB_ETIME
/* Connection timed out */
#define ETIMEDOUT       _PDCLIB_ETIMEDOUT
/* Text file busy */
#define ETXTBSY         _PDCLIB_ETXTBSY
/* Operation would block */
#define EWOULDBLOCK     _PDCLIB_EWOULDBLOCK
/* Cross-device link */
#define EXDEV           _PDCLIB_EXDEV

/* Annex K -- Bounds-checking interfaces */

#if ( __STDC_WANT_LIB_EXT1__ + 0 ) != 0
#ifndef _PDCLIB_ERRNO_T_DEFINED

tests/include/pdclib/platform/example/functions/_PDCLIB/_PDCLIB_stdinit.c  view on Meta::CPAN

        /* ENXIO           */ ( char * )"ENXIO (No such device or address)",
        /* E2BIG           */ ( char * )"E2BIG (Argument list too long)",
        /* ENOEXEC         */ ( char * )"ENOEXEC (Executable file format error)",
        /* EBADF           */ ( char * )"EBADF (Bad file descriptor)",
        /* ECHILD          */ ( char * )"ECHILD (No child processes)",
        /* EAGAIN          */ ( char * )"EAGAIN (Resource unavailable, try again)",
        /* ENOMEM          */ ( char * )"ENOMEM (Not enough space)",
        /* EACCES          */ ( char * )"EACCES (Permission denied)",
        /* EFAULT          */ ( char * )"EFAULT (Bad address)",
        /* unknown error   */ ( char * )"unknown error",
        /* EBUSY           */ ( char * )"EBUSY (Device or resource busy)",
        /* EEXIST          */ ( char * )"EEXIST (File exists)",
        /* EXDEV           */ ( char * )"EXDEV (Cross-device link)",
        /* ENODEV          */ ( char * )"ENODEV (No such device)",
        /* ENOTDIR         */ ( char * )"ENOTDIR (Not a directory)",
        /* EISDIR          */ ( char * )"EISDIR (Is a directory)",
        /* EINVAL          */ ( char * )"EINVAL (Invalid argument)",
        /* ENFILE          */ ( char * )"ENFILE (Too many files open in system)",
        /* EMFILE          */ ( char * )"EMFILE (File descriptor value too large)",
        /* ENOTTY          */ ( char * )"ENOTTY (Inappropriate I/O control operation)",
        /* ETXTBSY         */ ( char * )"ETXTBSY (Text file busy)",
        /* EFBIG           */ ( char * )"EFBIG (File too large)",
        /* ENOSPC          */ ( char * )"ENOSPC (No space left on device)",
        /* ESPIPE          */ ( char * )"ESPIPE (Invalid seek)",
        /* EROFS           */ ( char * )"EROFS (Read-only file system)",
        /* EMLINK          */ ( char * )"EMLINK (Too many links)",
        /* EPIPE           */ ( char * )"EPIPE (Broken pipe)",
        /* EDOM            */ ( char * )"EDOM (Mathematics argument out of domain of function)",
        /* ERANGE          */ ( char * )"ERANGE (Result too large)",
        /* EDEADLK         */ ( char * )"EDEADLK (Resource deadlock would occur)",
        /* ENAMETOOLONG    */ ( char * )"ENAMETOOLONG (Filename too long)",

tests/include/pdclib/platform/example/functions/threads/mtx_trylock.c  view on Meta::CPAN

#endif

int mtx_trylock( mtx_t * mtx )
{
    switch ( pthread_mutex_trylock( mtx ) )
    {
        case 0:
            return thrd_success;

        case EBUSY:
            return thrd_busy;

        default:
            return thrd_error;
    }
}

#endif

#ifdef TEST

tests/include/pdclib/platform/example/include/pdclib/_PDCLIB_config.h  view on Meta::CPAN

/* Address family not supported */
#define _PDCLIB_EAFNOSUPPORT     97
/* Resource unavailable, try again */
#define _PDCLIB_EAGAIN           11
/* Connection already in progress */
#define _PDCLIB_EALREADY        114
/* Bad file descriptor */
#define _PDCLIB_EBADF             9
/* Bad message */
#define _PDCLIB_EBADMSG          74
/* Device or resource busy */
#define _PDCLIB_EBUSY            16
/* Operation canceled */
#define _PDCLIB_ECANCELED       125
/* No child processes */
#define _PDCLIB_ECHILD           10
/* Connection aborted */
#define _PDCLIB_ECONNABORTED    103
/* Connection refused */
#define _PDCLIB_ECONNREFUSED    111
/* Connection reset */

tests/include/pdclib/platform/example/include/pdclib/_PDCLIB_config.h  view on Meta::CPAN

/* Read-only file system */
#define _PDCLIB_EROFS            30
/* Invalid seek */
#define _PDCLIB_ESPIPE           29
/* No such process */
#define _PDCLIB_ESRCH             3
/* Stream ioctl() timeout */
#define _PDCLIB_ETIME            62
/* Connection timed out */
#define _PDCLIB_ETIMEDOUT       110
/* Text file busy */
#define _PDCLIB_ETXTBSY          26
/* Operation would block */
#define _PDCLIB_EWOULDBLOCK      11
/* Cross-device link */
#define _PDCLIB_EXDEV            18

/* The highest defined errno value, plus one. This is used to set the size    */
/* of the array in struct _PDCLIB_lc_text_t holding error messages for the    */
/* strerror() and perror() functions. (If you change this value because you   */
/* are using additional errno values, you *HAVE* to provide appropriate error */

tests/include/pdclib/platform/example/include/threads.h  view on Meta::CPAN

    mtx_plain,
    mtx_recursive,
    mtx_timed
};

/* TODO: Documentation. */
enum
{
    thrd_timedout,
    thrd_success,
    thrd_busy,
    thrd_error,
    thrd_nomem
};

/* Initialization functions */

/* Ensure that func is called only the first time call_once() is called
   for a given flag.
*/
_PDCLIB_PUBLIC void call_once( once_flag * flag, void ( *func )( void ) );

tests/include/pdclib/platform/example/include/threads.h  view on Meta::CPAN

_PDCLIB_PUBLIC int mtx_lock( mtx_t * mtx );

/* TODO: Documentation.
   Returns thrd_success if successful, thrd_timedout if the specified time
   is reached without acquiring the resource, or thrd_error if the request
   could not be honored.
*/
_PDCLIB_PUBLIC int mtx_timedlock( mtx_t * _PDCLIB_restrict mtx, const struct timespec * _PDCLIB_restrict ts );

/* Try to lock the given mutex (non-blocking).
   Returns thrd_success if successful, thrd_busy if the resource is already
   locked, or thrd_error if the request could not be honored.
*/
_PDCLIB_PUBLIC int mtx_trylock( mtx_t * mtx );

/* Unlock the given mutex.
   Returns thrd_success if successful, thrd_error if the request could not
   be honored.
   The given mutex must be locked by the calling thread.
*/
_PDCLIB_PUBLIC int mtx_unlock( mtx_t * mtx );



( run in 0.253 second using v1.01-cache-2.11-cpan-87723dcf8b7 )