00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifdef HAVE_CONFIG_H
00019 #include "config.h"
00020 #endif
00021 #include "ansidecl.h"
00022 #include "libiberty.h"
00023
00024 #include <sys/types.h>
00025 #ifdef HAVE_STRING_H
00026 #include <string.h>
00027 #endif
00028
00029 PTR
00030 xmemdup (input, copy_size, alloc_size)
00031 const PTR input;
00032 size_t copy_size;
00033 size_t alloc_size;
00034 {
00035 PTR output = xcalloc (1, alloc_size);
00036 memcpy (output, input, copy_size);
00037 return output;
00038 }