Cygwin: access: Fix X_OK behaviour for backup operators and admins
[newlib-cygwin.git] / newlib / libc / machine / powerpc / vec_calloc.c
blob7a90d571cea35ca52c72002d2bd719126e40f652
1 /*
2 FUNCTION
3 <<vec_calloc>>---allocate space for arrays
5 INDEX
6 vec_calloc
8 INDEX
9 _vec_calloc_r
11 SYNOPSIS
12 #include <stdlib.h>
13 void *vec_calloc(size_t <[n]>, size_t <[s]>);
14 void *vec_calloc_r(void *<[reent]>, size_t <n>, <size_t> <[s]>);
16 DESCRIPTION
17 Use <<vec_calloc>> to request a block of memory sufficient to hold an
18 array of <[n]> elements, each of which has size <[s]>.
20 The memory allocated by <<vec_calloc>> comes out of the same memory pool
21 used by <<vec_malloc>>, but the memory block is initialized to all zero
22 bytes. (To avoid the overhead of initializing the space, use
23 <<vec_malloc>> instead.)
25 The alternate function <<_vec_calloc_r>> is reentrant.
26 The extra argument <[reent]> is a pointer to a reentrancy structure.
28 RETURNS
29 If successful, a pointer to the newly allocated space.
31 If unsuccessful, <<NULL>>.
33 PORTABILITY
34 <<vec_calloc>> is an non-ANSI extension described in the AltiVec Programming
35 Interface Manual.
37 Supporting OS subroutines required: <<close>>, <<fstat>>, <<isatty>>,
38 <<lseek>>, <<read>>, <<sbrk>>, <<write>>.
41 #include <string.h>
42 #include <stdlib.h>
44 #ifndef _REENT_ONLY
46 void *
47 vec_calloc (size_t n,
48 size_t size)
50 return _vec_calloc_r (_REENT, n, size);
53 #endif