~ubuntu-branches/ubuntu/oneiric/nis/oneiric-proposed

« back to all changes in this revision

Viewing changes to ypserv-2.18/lib/compat.h

  • Committer: Bazaar Package Importer
  • Author(s): Scott James Remnant
  • Date: 2005-11-16 23:42:06 UTC
  • mfrom: (1.1.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20051116234206-p00omaw5ji5q0qhr
Tags: 3.15-3ubuntu1
Resynchronise with Debian.  (me)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* Copyright (c) 2000 Thorsten Kukuk
 
2
   Author: Thorsten Kukuk <kukuk@suse.de>
 
3
 
 
4
   The YP Server is free software; you can redistribute it and/or
 
5
   modify it under the terms of the GNU General Public License as
 
6
   published by the Free Software Foundation; either version 2 of the
 
7
   License, or (at your option) any later version.
 
8
 
 
9
   The YP Server is distributed in the hope that it will be useful,
 
10
   but WITHOUT ANY WARRANTY; without even the implied warranty of
 
11
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 
12
   General Public License for more details.
 
13
 
 
14
   You should have received a copy of the GNU General Public
 
15
   License along with the YP Server; see the file COPYING. If
 
16
   not, write to the Free Software Foundation, Inc., 675 Mass Ave,
 
17
   Cambridge, MA 02139, USA. */
 
18
 
 
19
#ifndef _YPSERV_COMPAT_H
 
20
#define _YPSERV_COMPAT_H
 
21
 
 
22
#include "config.h"
 
23
 
 
24
#ifndef HAVE_STPCPY
 
25
char *stpcpy(char *, const char *);
 
26
#endif /* not HAVE_STPCPY */
 
27
 
 
28
#ifndef HAVE_STRNDUP
 
29
char *strndup (const char *, int);
 
30
#endif /* not HAVE_STRNDUP */
 
31
 
 
32
#ifndef HAVE_GETOPT_LONG
 
33
struct option {
 
34
  const char *name;
 
35
  int has_arg;
 
36
  int *flag;
 
37
  int val;
 
38
};
 
39
 
 
40
# define no_argument            0
 
41
# define required_argument      1
 
42
# define optional_argument      2
 
43
 
 
44
int getopt_long (int argc, char *const *argv, const char *shortopts,
 
45
                 const struct option *longopts, int *longind);
 
46
#endif /* not HAVE_GETOPT_LONG */
 
47
 
 
48
#if !defined(HAVE_GETDELIM) && !defined(HAVE_GETLINE)
 
49
/* Use getline() if getdelim() is missing */
 
50
#include <unistd.h> /* size_t */
 
51
#include <stdio.h> /* FILE */
 
52
ssize_t getline (char **lineptr, size_t *n, FILE *stream);
 
53
#endif /*  not HAVE_GETDELIM and not HAVE_GETLINE */
 
54
 
 
55
#ifndef HAVE_SVC_GETCALLER
 
56
#  include <rpc/rpc.h>
 
57
#  if !defined(svc_getcaller)
 
58
struct sockaddr_in;
 
59
const struct sockaddr_in *svc_getcaller(const SVCXPRT *xprt);
 
60
#  endif
 
61
#endif /* not HAVE_SVC_GETCALLER */
 
62
 
 
63
#ifndef HAVE__RPC_DTABLESIZE
 
64
int _rpc_dtablesize(void);
 
65
#endif
 
66
 
 
67
#ifndef HAVE_INET_PTON
 
68
int inet_pton(int af, const char *src, void *dst);
 
69
#endif /* not HAVE_INET_PTON */
 
70
 
 
71
 
 
72
#endif /* not _YPSERV_COMPAT_H */