imapext-2007

diff src/osdep/unix/os_vu2.c @ 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_vu2.c	Mon Sep 14 15:17:45 2009 +0900
     1.3 @@ -0,0 +1,82 @@
     1.4 +/* ========================================================================
     1.5 + * Copyright 1988-2007 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 -- VAX Ultrix 2.3 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 + *
    1.27 + * Date:	11 May 1989
    1.28 + * Last Edited:	16 August 2007
    1.29 + */
    1.30 +
    1.31 +#include "tcp_unix.h"		/* must be before osdep includes tcp.h */
    1.32 +#include "mail.h"
    1.33 +#include "osdep.h"
    1.34 +#include <stdio.h>
    1.35 +#include <sys/stat.h>
    1.36 +#include <sys/time.h>
    1.37 +#include <sys/socket.h>
    1.38 +#include <netinet/in.h>
    1.39 +#include <arpa/inet.h>
    1.40 +#include <netdb.h>
    1.41 +#include <ctype.h>
    1.42 +#include <errno.h>
    1.43 +extern int errno;		/* just in case */
    1.44 +#include <pwd.h>
    1.45 +#include "misc.h"
    1.46 +
    1.47 +#define NFDBITS	(sizeof(long) * 8)
    1.48 +
    1.49 +#define	FD_SET(n, p)	((p)->fds_bits[(n)/NFDBITS] |= \
    1.50 +					(1 << ((n) % NFDBITS)))
    1.51 +#define	FD_CLR(n, p)	((p)->fds_bits[(n)/NFDBITS] &= \
    1.52 +					~(1 << ((n) % NFDBITS)))
    1.53 +#define	FD_ISSET(n, p)	((p)->fds_bits[(n)/NFDBITS] & \
    1.54 +					(1 << ((n) % NFDBITS)))
    1.55 +#define FD_ZERO(p)	bzero((char *)(p), sizeof(*(p)))
    1.56 +
    1.57 +
    1.58 +/* Old Ultrix has its own wierd inet_addr() that returns a in_addr struct. */
    1.59 +
    1.60 +/* Portable inet_addr () that returns a u_long
    1.61 + * Accepts: dotted host string
    1.62 + * Returns: u_long
    1.63 + */
    1.64 +
    1.65 +u_long portable_inet_addr (char *hostname)
    1.66 +{
    1.67 +  struct in_addr *in = &inet_addr (hostname);
    1.68 +  return in->s_addr;
    1.69 +}
    1.70 +
    1.71 +
    1.72 +#define inet_addr portable_inet_addr
    1.73 +
    1.74 +#include "fs_unix.c"
    1.75 +#include "ftl_unix.c"
    1.76 +#include "nl_unix.c"
    1.77 +#include "env_unix.c"
    1.78 +#define fork vfork
    1.79 +#include "tcp_unix.c"
    1.80 +#include "gr_wait.c"
    1.81 +#include "memmove.c"
    1.82 +#include "strerror.c"
    1.83 +#include "strstr.c"
    1.84 +#include "strtoul.c"
    1.85 +#include "tz_nul.c"

UW-IMAP'd extensions by yuuji