~ubuntu-branches/ubuntu/karmic/openafs/karmic-updates

« back to all changes in this revision

Viewing changes to src/util/snprintf.c

  • Committer: Bazaar Package Importer
  • Author(s): Russ Allbery
  • Date: 2008-09-22 19:07:02 UTC
  • mfrom: (12.1.14 intrepid)
  • Revision ID: james.westby@ubuntu.com-20080922190702-59m13d7kn6gkw32d
Tags: 1.4.7.dfsg1-6
* Apply upstream patch to free /proc entries in the correct order.
  Thanks, Marc Dionne.  (Closes: #493914)
* Apply upstream deltas to support 2.6.27 kernels and to stop using
  COMMON_KERN_CFLAGS for all 2.6 kernels uniformly, which fixes
  problems on amd64 with newer kernels.  Thanks, Björn Torkelsson.
  (LP: #267504)
* Translation updates:
  - Swedish, thanks Martin Bagge.  (Closes: #493120)

Show diffs side-by-side

added added

removed removed

Lines of Context:
4
4
#include <afs/param.h>
5
5
 
6
6
RCSID
7
 
    ("$Header: /cvs/openafs/src/util/snprintf.c,v 1.21.2.2 2004/10/18 17:44:05 shadow Exp $");
 
7
    ("$Header: /cvs/openafs/src/util/snprintf.c,v 1.21.2.5 2007/12/14 13:09:26 jaltman Exp $");
8
8
 
9
9
#include <sys/types.h>
10
10
#include <stdarg.h>
11
11
#include <stdio.h>
12
12
#include <ctype.h>
 
13
#include <string.h>
13
14
#ifndef AFS_NT40_ENV
14
15
#include <netinet/in.h>
15
16
#include <netdb.h>
 
17
#ifndef HAVE_VSYSLOG
 
18
#include <syslog.h>
 
19
#endif
16
20
#else
17
21
#include <winsock2.h>
18
22
#endif
19
23
#if defined(AFS_AIX32_ENV) || defined(AFS_SUN_ENV) || defined(AFS_XBSD_ENV) || defined(AFS_HPUX_ENV) || defined(AFS_SGI65_ENV)
20
24
#include <sys/socket.h>
21
25
#endif
22
 
#ifdef HAVE_STRING_H
23
 
#include <string.h>
24
 
#else
25
 
#ifdef HAVE_STRINGS_H
26
 
#include <strings.h>
27
 
#endif
28
 
#endif
29
26
 
30
27
#define MAXPREC 100
31
28
 
527
524
#endif /* AFS_OSF20_ENV || AFS_AIX32_ENV */
528
525
 
529
526
#ifndef AFS_NT40_ENV
 
527
#ifndef HAVE_VSYSLOG
 
528
void
 
529
vsyslog(int priority, const char *format, va_list args)
 
530
{
 
531
  char buf[1024];
 
532
  vsnprintf(buf, sizeof(buf), format, args);
 
533
  syslog(priority, "%s", buf);
 
534
}
 
535
#endif
 
536
 
530
537
#if defined(AFS_OSF20_ENV) && !defined(AFS_DUX50_ENV) || defined(AFS_AIX32_ENV) || (defined(AFS_SUN55_ENV) && !defined(AFS_SUN56_ENV)) || !defined(HAVE_SNPRINTF)
531
538
 
532
539
#ifdef AFS_AIX51_ENV