Annotation of libaitsess/inc/defs.h, revision 1.1.1.1.2.5

1.1.1.1.2.1  misho       1: /*************************************************************************
                      2: * (C) 2008 AITNET ltd - Sofia/Bulgaria - <misho@aitbg.com>
                      3: *  by Michael Pounov <misho@openbsd-bg.org>
                      4: *
                      5: * $Author: misho $
1.1.1.1.2.5! misho       6: * $Id: defs.h,v 1.1.1.1.2.4 2011/04/30 19:53:56 misho Exp $
1.1.1.1.2.1  misho       7: *
                      8: *************************************************************************/
1.1       misho       9: #ifndef __DEFS_H
                     10: #define __DEFS_H
                     11: 
                     12: #define MAX_STR                255
                     13: 
1.1.1.1.2.2  misho      14: #define MEM_MODE       0640
1.1.1.1.2.3  misho      15: #define MEM_DELIM      ":"
1.1.1.1.2.2  misho      16: 
1.1       misho      17: #define LOGERR { \
                     18:                        sessErrno = errno; \
                     19:                        bzero(sessError, MAX_STR + 1); \
                     20:                        strncpy(sessError, strerror(errno), MAX_STR); \
                     21:                }
                     22: 
                     23: /*
                     24: union semun {
                     25:        int                     val;
                     26:        struct semid_ds         *buf;
                     27:        unsigned short int      *array;
                     28:        struct seminfo          *__buf;
1.1.1.1.2.5! misho      29: }; */
        !            30: #ifndef HAVE_UNION_SEMUN
1.1.1.1.2.4  misho      31: union semun {
                     32:        int             val;            /* value for SETVAL */
                     33:        struct semid_ds *buf;           /* buffer for IPC_STAT & IPC_SET */
                     34:        unsigned short  *array;         /* array for GETALL & SETALL */
                     35: };
                     36: #endif
                     37: 
1.1       misho      38: 
                     39: extern int sessErrno;
                     40: extern char sessError[];
                     41: 
                     42: 
                     43: #endif

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>