~ubuntu-branches/ubuntu/karmic/dante/karmic

« back to all changes in this revision

Viewing changes to libscompat/sockatmark.c

  • Committer: Bazaar Package Importer
  • Author(s): Adrian Bridgett
  • Date: 2002-04-07 12:45:55 UTC
  • Revision ID: james.westby@ubuntu.com-20020407124555-qke8rt2tdor0naz2
Tags: upstream-1.1.11.12p1
ImportĀ upstreamĀ versionĀ 1.1.11.12p1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* $Id: sockatmark.c,v 1.3 1999/05/13 16:35:58 karls Exp $ */
 
2
 
 
3
#ifdef HAVE_CONFIG_H
 
4
#include "autoconf.h"
 
5
#endif  /* HAVE_CONFIG_H */
 
6
 
 
7
#include "common.h"
 
8
 
 
9
#if !HAVE_SOCKATMARK
 
10
 
 
11
int
 
12
sockatmark(s)
 
13
        int s;
 
14
{
 
15
        int argp;
 
16
 
 
17
        if (ioctl(s, SIOCATMARK, &argp) == -1)
 
18
                return -1;
 
19
 
 
20
        return argp == 0 ? 0 : 1;
 
21
}
 
22
#else
 
23
static void avoid_error __P((void));
 
24
static void avoid_error()
 
25
{
 
26
        avoid_error();
 
27
}
 
28
#endif  /* HAVE_SOCKATMARK */