~ubuntu-branches/ubuntu/precise/netatalk/precise

« back to all changes in this revision

Viewing changes to include/atalk/compat.h

  • Committer: Bazaar Package Importer
  • Author(s): Sebastian Rittau
  • Date: 2004-01-19 12:43:49 UTC
  • Revision ID: james.westby@ubuntu.com-20040119124349-es563jbp0hk0ae51
Tags: upstream-1.6.4
ImportĀ upstreamĀ versionĀ 1.6.4

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Copyright (c) 1996 Regents of The University of Michigan.
 
3
 * All Rights Reserved.  See COPYRIGHT.
 
4
 *
 
5
 * NOTE: SunOS 4 and ultrix are pretty much the only reason why there
 
6
 * are checks for EINTR everywhere. 
 
7
 */
 
8
 
 
9
#include <sys/cdefs.h>
 
10
#include <signal.h>
 
11
 
 
12
#ifdef __svr4__
 
13
/*
 
14
 * SunOS 5 (solaris) has SA_RESTART, but no SA_INTERRUPT.
 
15
 */
 
16
#ifndef SA_INTERRUPT
 
17
#define SA_INTERRUPT    0
 
18
#endif
 
19
 
 
20
#include <sys/types.h>
 
21
#include <netinet/in.h>
 
22
#include <arpa/inet.h>
 
23
 
 
24
extern int flock __P((int, int));
 
25
extern int inet_aton __P((const char *, struct in_addr *));
 
26
#else /* __svr4__ */
 
27
 
 
28
#ifdef sun
 
29
/*
 
30
 * SunOS 4 has SA_INTERRUPT, but no SA_RESTART.
 
31
 */
 
32
#ifndef SA_RESTART
 
33
#define SA_RESTART      0
 
34
#endif
 
35
#endif /* sun */
 
36
 
 
37
#endif /* __svr4__ */
 
38
 
 
39
#ifdef linux
 
40
/*
 
41
 * Linux has SA_RESTART, but no SA_INTERRUPT.  Note that the documentation
 
42
 * seems to be wrong on several counts.  First, SA_ONESHOT is not the default,
 
43
 * and second, SA_RESTART does what you'd expect (the same as svr4) and has
 
44
 * nothing to do with SA_ONESHOT.
 
45
 */
 
46
#ifndef SA_INTERRUPT
 
47
#define SA_INTERRUPT    0
 
48
#endif /* SA_INTERRUPT */
 
49
#endif /* linux */
 
50
 
 
51
#ifdef ultrix 
 
52
#include <sys/types.h>
 
53
#include <netinet/in.h>
 
54
#include <arpa/inet.h>
 
55
 
 
56
/*
 
57
 * Here's the really confusing one...  Under Ultrix, sigaction() works just
 
58
 * like sigvec(), except that SV_INTERRUPT is always set.  Hence, there is
 
59
 * no SA_INTERRUPT flag.  Unfortunately, there's also no SA_RESTART, so
 
60
 * there's no way to suppress the interrupt.  Sigh.
 
61
 */
 
62
#ifndef SA_INTERRUPT
 
63
#define SA_INTERRUPT    0
 
64
#endif
 
65
#ifndef SA_RESTART
 
66
#define SA_RESTART      0
 
67
#endif
 
68
 
 
69
extern char *strdup __P((const char *));
 
70
extern int inet_aton __P((const char *, struct in_addr *));
 
71
#endif /* ultrix */
 
72
 
 
73
#ifdef BSD4_4
 
74
#ifndef SA_INTERRUPT
 
75
#define SA_INTERRUPT    0
 
76
#endif
 
77
#endif /* BSD4_4 */
 
78
 
 
79
#if defined(ultrix) || defined(_IBMR2) || defined(NEED_GETUSERSHELL)
 
80
extern char *getusershell __P((void));
 
81
#endif
 
82
 
 
83
#if !defined(HAVE_SNPRINTF) || !defined(HAVE_VSNPRINTF)
 
84
#include <stdio.h>
 
85
#include <stdarg.h>
 
86
#endif
 
87
 
 
88
#ifndef HAVE_SNPRINTF
 
89
int snprintf (char *str,size_t count,const char *fmt,...);
 
90
#endif
 
91
 
 
92
#ifndef HAVE_VSNPRINTF
 
93
int vsnprintf(char *str, size_t count, const char *fmt, va_list args);
 
94
#endif