mirror of
https://gitlab.freedesktop.org/xorg/proto/xorgproto.git
synced 2025-12-20 15:10:11 +01:00
Update Xalloca.h to reduce compiler warnings:
The parameter for alloca() was "int" for the (long-obsolete) SunOS 4. In Solaris and anything newer than the early 1990s, it is "size_t". Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
This commit is contained in:
parent
17feb82819
commit
6bb0d500e5
1 changed files with 3 additions and 3 deletions
|
|
@ -31,7 +31,7 @@ from The Open Group.
|
||||||
* These macros are used to make fast, function-local memory allocations.
|
* These macros are used to make fast, function-local memory allocations.
|
||||||
* Their characteristics are as follows:
|
* Their characteristics are as follows:
|
||||||
*
|
*
|
||||||
* void *ALLOCATE_LOCAL(int size)
|
* void *ALLOCATE_LOCAL(size_t size)
|
||||||
* Returns a pointer to size bytes of memory, or NULL if the allocation
|
* Returns a pointer to size bytes of memory, or NULL if the allocation
|
||||||
* failed. The memory must be freed with DEALLOCATE_LOCAL before the
|
* failed. The memory must be freed with DEALLOCATE_LOCAL before the
|
||||||
* function that made the allocation returns. You should not ask for
|
* function that made the allocation returns. You should not ask for
|
||||||
|
|
@ -80,7 +80,7 @@ from The Open Group.
|
||||||
# ifndef alloca
|
# ifndef alloca
|
||||||
# define alloca __builtin_alloca
|
# define alloca __builtin_alloca
|
||||||
# endif /* !alloca */
|
# endif /* !alloca */
|
||||||
# define ALLOCATE_LOCAL(size) alloca((int)(size))
|
# define ALLOCATE_LOCAL(size) alloca((size_t)(size))
|
||||||
# else /* ! __GNUC__ */
|
# else /* ! __GNUC__ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
@ -98,7 +98,7 @@ from The Open Group.
|
||||||
# define __Xnullarg /* as nothing */
|
# define __Xnullarg /* as nothing */
|
||||||
extern void *alloca(__Xnullarg);
|
extern void *alloca(__Xnullarg);
|
||||||
# endif
|
# endif
|
||||||
# define ALLOCATE_LOCAL(size) alloca((int)(size))
|
# define ALLOCATE_LOCAL(size) alloca((size_t)(size))
|
||||||
# endif /* who does alloca */
|
# endif /* who does alloca */
|
||||||
# endif /* __GNUC__ */
|
# endif /* __GNUC__ */
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue