"Fossies" - the Fresh Open Source Software Archive

Member "pidentd-3.0.19/src/safeio.h" (20 Jan 1999, 1172 Bytes) of package /linux/misc/old/pidentd-3.0.19.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "safeio.h" see the Fossies "Dox" file reference documentation.

    1 /*
    2 ** safeio.h - Signal/Async safe wrapper functions
    3 **
    4 ** Copyright (c) 1997 Peter Eriksson <pen@lysator.liu.se>
    5 **
    6 ** This program is free software; you can redistribute it and/or
    7 ** modify it as you wish - as long as you don't claim that you wrote
    8 ** it.
    9 **
   10 ** This program is distributed in the hope that it will be useful,
   11 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
   12 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
   13 */
   14 
   15 #ifndef PIDENTD_SAFEIO_H
   16 #define PIDENTD_SAFEIO_H
   17 
   18 extern void s_abort(void);
   19 
   20 extern int s_open(const char *path, int oflag, ...);
   21 
   22 extern ssize_t s_write(int fd, const char *buf, size_t len);
   23 extern ssize_t s_read(int fd, char *buf, size_t len);
   24 extern int s_close(int fd);
   25 
   26 extern int s_accept(int fd, struct sockaddr *, socklen_t *len);
   27 extern int s_getsockname(int fd, struct sockaddr *sin, socklen_t *len);
   28 extern int s_getpeername(int fd, struct sockaddr *sin, socklen_t *len);
   29 
   30 extern void *s_malloc(size_t size);
   31 extern void s_free(void *p);
   32 extern char *s_strdup(const char *s);
   33 
   34 extern long s_random(void);
   35 
   36 extern int s_snprintf(char *buf,
   37               size_t bufsize,
   38               const char *format, ...);
   39 
   40 #endif