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

« back to all changes in this revision

Viewing changes to libatalk/compat/strdup.c

  • 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
 * $Id: strdup.c,v 1.3 2001/06/29 14:14:46 rufustfirefly Exp $
 
3
 */
 
4
 
 
5
#ifdef HAVE_CONFIG_H
 
6
#include "config.h"
 
7
#endif /* HAVE_CONFIG_H */
 
8
 
 
9
#include <stdio.h>
 
10
#include <stdlib.h>
 
11
#include <string.h>
 
12
 
 
13
static int _strdup_dummy;
 
14
 
 
15
#ifdef ultrix
 
16
char *strdup(const char *string)
 
17
{
 
18
  char *new;
 
19
  
 
20
  if (new = (char *) malloc(strlen(string) + 1))
 
21
    strcpy(new, string);
 
22
 
 
23
  return new;
 
24
}
 
25
#endif /* ultrix */