~ubuntu-branches/ubuntu/saucy/pmake/saucy-proposed

« back to all changes in this revision

Viewing changes to util.c

  • Committer: Bazaar Package Importer
  • Author(s): Sam Hocevar (Debian packages)
  • Date: 2005-07-07 10:20:56 UTC
  • mfrom: (0.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20050707102056-3nh411zy3wbwuwyr
Tags: 1.111-1
* New upstream snapshot.
* This version properly parses arguments and does not crash when parameters
  are missing (Closes: #287336, #316394).
* debian/control:
  + Set policy to 3.6.2.1.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*      $NetBSD: util.c,v 1.34 2003/07/16 07:11:29 itojun Exp $ */
 
1
/*      $NetBSD: util.c,v 1.36 2005/02/16 15:11:53 christos Exp $       */
2
2
 
3
3
/*
4
4
 * Missing stuff from OS's
5
5
 */
6
6
 
7
 
#ifdef MAKE_BOOTSTRAP
8
 
static char rcsid[] = "$NetBSD: util.c,v 1.34 2003/07/16 07:11:29 itojun Exp $";
 
7
#ifndef MAKE_NATIVE
 
8
static char rcsid[] = "$NetBSD: util.c,v 1.36 2005/02/16 15:11:53 christos Exp $";
9
9
#else
10
10
#include <sys/cdefs.h>
11
11
#ifndef lint
12
 
__RCSID("$NetBSD: util.c,v 1.34 2003/07/16 07:11:29 itojun Exp $");
 
12
__RCSID("$NetBSD: util.c,v 1.36 2005/02/16 15:11:53 christos Exp $");
13
13
#endif
14
14
#endif
15
15
 
21
21
 
22
22
#include "make.h"
23
23
 
24
 
#if defined(MAKE_BOOTSTRAP) && !defined(HAVE_STRERROR)
 
24
#if !defined(MAKE_NATIVE) && !defined(HAVE_STRERROR)
25
25
extern int errno, sys_nerr;
26
26
extern char *sys_errlist[];
27
27
 
38
38
}
39
39
#endif
40
40
 
41
 
#if defined(MAKE_BOOTSTRAP) && !defined(HAVE_STRDUP)
 
41
#if !defined(MAKE_NATIVE) && !defined(HAVE_STRDUP)
42
42
#include <string.h>
43
43
 
44
44
/* strdup
61
61
}
62
62
#endif
63
63
 
64
 
#if defined(MAKE_BOOTSTRAP) && !defined(HAVE_SETENV)
 
64
#if !defined(MAKE_NATIVE) && !defined(HAVE_SETENV)
65
65
int
66
66
setenv(const char *name, const char *value, int dum)
67
67
{
68
68
    char *p;
69
69
    int len = strlen(name) + strlen(value) + 2; /* = \0 */
70
 
    char *ptr = (char*) emalloc(len);
 
70
    char *ptr = emalloc(len);
71
71
 
72
72
    (void) dum;
73
73
 
335
335
}
336
336
#endif
337
337
 
338
 
#if defined(MAKE_BOOTSTRAP) && !defined(HAVE_VSNPRINTF)
 
338
#if !defined(MAKE_NATIVE) && !defined(HAVE_VSNPRINTF)
339
339
#include <stdarg.h>
340
340
 
341
341
#if !defined(__osf__)
386
386
        return rv;
387
387
}
388
388
 
389
 
#if defined(MAKE_BOOTSTRAP) && !defined(HAVE_STRFTIME)
 
389
#if !defined(MAKE_NATIVE) && !defined(HAVE_STRFTIME)
390
390
size_t
391
391
strftime(char *buf, size_t len, const char *fmt, const struct tm *tm)
392
392
{