imapext-2007

diff src/osdep/unix/os_sv2.h @ 0:ada5e610ab86

imap-2007e
author yuuji@gentei.org
date Mon, 14 Sep 2009 15:17:45 +0900
parents
children
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/src/osdep/unix/os_sv2.h	Mon Sep 14 15:17:45 2009 +0900
     1.3 @@ -0,0 +1,120 @@
     1.4 +/* ========================================================================
     1.5 + * Copyright 1988-2006 University of Washington
     1.6 + *
     1.7 + * Licensed under the Apache License, Version 2.0 (the "License");
     1.8 + * you may not use this file except in compliance with the License.
     1.9 + * You may obtain a copy of the License at
    1.10 + *
    1.11 + *     http://www.apache.org/licenses/LICENSE-2.0
    1.12 + *
    1.13 + * 
    1.14 + * ========================================================================
    1.15 + */
    1.16 +
    1.17 +/*
    1.18 + * Program:	Operating-system dependent routines -- SVR2 version
    1.19 + *
    1.20 + * Author:	Mark Crispin
    1.21 + *		Networks and Distributed Computing
    1.22 + *		Computing & Communications
    1.23 + *		University of Washington
    1.24 + *		Administration Building, AG-44
    1.25 + *		Seattle, WA  98195
    1.26 + *		Internet: MRC@CAC.Washington.EDU
    1.27 + *
    1.28 + * Date:	10 April 1992
    1.29 + * Last Edited:	20 December 2006
    1.30 + */
    1.31 +
    1.32 +#include <unistd.h>
    1.33 +#include <string.h>
    1.34 +#define char void
    1.35 +#include <memory.h>
    1.36 +#undef char
    1.37 +#include <sys/types.h>
    1.38 +#include <sys/dir.h>
    1.39 +#include <fcntl.h>
    1.40 +#include <syslog.h>
    1.41 +#include <sys/file.h>
    1.42 +#include <ustat.h>
    1.43 +
    1.44 +
    1.45 +/* Many versions of SysV get this wrong */
    1.46 +
    1.47 +#define setpgrp(a,b) Setpgrp(a,b)
    1.48 +int Setpgrp (int pid,int gid);
    1.49 +
    1.50 +
    1.51 +/* Different names between BSD and SVR4 */
    1.52 +
    1.53 +#define L_SET SEEK_SET
    1.54 +#define L_INCR SEEK_CUR
    1.55 +#define L_XTND SEEK_END
    1.56 +
    1.57 +#define lstat stat
    1.58 +#define random lrand48
    1.59 +
    1.60 +#define SIGSTOP SIGQUIT
    1.61 +
    1.62 +#define S_IFLNK 0120000
    1.63 +
    1.64 +
    1.65 +/* syslog() emulation */
    1.66 +
    1.67 +#define LOG_MAIL	(2<<3)	/* mail system */
    1.68 +#define LOG_DAEMON	(3<<3)	/* system daemons */
    1.69 +#define LOG_AUTH	(4<<3)	/* security/authorization messages */
    1.70 +#define LOG_ALERT	1	/* action must be taken immediately */
    1.71 +#define LOG_CONS	0x02	/* log on the console if errors in sending */
    1.72 +#define LOG_ODELAY	0x04	/* delay open until syslog() is called */
    1.73 +#define LOG_NDELAY	0x08	/* don't delay open */
    1.74 +#define LOG_NOWAIT	0x10	/* if forking to log on console, don't wait() */
    1.75 +
    1.76 +
    1.77 +/* For setitimer() emulation */
    1.78 +
    1.79 +#define ITIMER_REAL	0
    1.80 +
    1.81 +
    1.82 +/* For opendir() emulation */
    1.83 +
    1.84 +typedef struct _dirdesc {
    1.85 +  int dd_fd;
    1.86 +  long dd_loc;
    1.87 +  long dd_size;
    1.88 +  char *dd_buf;
    1.89 +} DIR;
    1.90 +
    1.91 +struct passwd *getpwent (void);
    1.92 +struct passwd *getpwuid (int uid);
    1.93 +struct passwd *getpwnam (char *name);
    1.94 +struct group *getgrnam (char *name);
    1.95 +
    1.96 +char *getenv (char *name);
    1.97 +long gethostid (void);
    1.98 +void *memmove (void *s,void *ct,size_t n);
    1.99 +char *strstr (char *cs,char *ct);
   1.100 +char *strerror (int n);
   1.101 +unsigned long strtoul (char *s,char **endp,int base);
   1.102 +DIR *opendir (char * name);
   1.103 +int closedir (DIR *d);
   1.104 +struct direct *readdir (DIR *d);
   1.105 +typedef int (*select_t) (struct direct *name);
   1.106 +typedef int (*compar_t) (void *d1,void *d2);
   1.107 +int scandir (char *dirname,struct direct ***namelist,select_t select,
   1.108 +	     compar_t compar);
   1.109 +int alphasort (void *d1,void *d2);
   1.110 +int fsync (int fd);
   1.111 +int openlog (ident,logopt,facility);
   1.112 +int syslog (priority,message,parameters ...);
   1.113 +void *malloc (size_t byteSize);
   1.114 +void free (void *ptr);
   1.115 +void *realloc (void *oldptr,size_t newsize);
   1.116 +
   1.117 +
   1.118 +#include "env_unix.h"
   1.119 +#include "fs.h"
   1.120 +#include "ftl.h"
   1.121 +#include "nl.h"
   1.122 +#include "tcp.h"
   1.123 +#include "flocksim.h"

UW-IMAP'd extensions by yuuji