|
Apache/2.2.15 (CentOS) Linux obd60-6c49958d75-2q7cw 5.4.0-174-generic #193-Ubuntu SMP Thu Mar 7 14:29:28 UTC 2024 x86_64 uid=48(apache) gid=48(apache) groups=48(apache) server ip : 172.67.192.52 | your ip : 10.244.126.0 safemode OFF > / usr / include / php / ext / gd / libgd / |
| Filename | /usr/include/php/ext/gd/libgd/gdhelpers.h |
| Size | 1.32 kb |
| Permission | rw-r--r-- |
| Owner | apache |
| Create time | 26-May-2024 11:05 |
| Last modified | 01-Nov-2019 18:00 |
| Last accessed | 01-Nov-2019 18:00 |
| Actions | edit | rename | delete | download (gzip) |
| View | text | code | image |
#ifndef GDHELPERS_H
#define GDHELPERS_H 1
#include <sys/types.h>
#include "php.h"
/* TBB: strtok_r is not universal; provide an implementation of it. */
extern char *gd_strtok_r(char *s, char *sep, char **state);
/* These functions wrap memory management. gdFree is
in gd.h, where callers can utilize it to correctly
free memory allocated by these functions with the
right version of free(). */
#define gdCalloc(nmemb, size) ecalloc(nmemb, size)
#define gdMalloc(size) emalloc(size)
#define gdRealloc(ptr, size) erealloc(ptr, size)
#define gdEstrdup(ptr) estrdup(ptr)
#define gdFree(ptr) efree(ptr)
#define gdPMalloc(ptr) pemalloc(ptr, 1)
#define gdPFree(ptr) pefree(ptr, 1)
#define gdPEstrdup(ptr) pestrdup(ptr, 1)
/* Returns nonzero if multiplying the two quantities will
result in integer overflow. Also returns nonzero if
either quantity is negative. By Phil Knirsch based on
netpbm fixes by Alan Cox. */
int overflow2(int a, int b);
#ifdef ZTS
#define gdMutexDeclare(x) MUTEX_T x
#define gdMutexSetup(x) x = tsrm_mutex_alloc()
#define gdMutexShutdown(x) tsrm_mutex_free(x)
#define gdMutexLock(x) tsrm_mutex_lock(x)
#define gdMutexUnlock(x) tsrm_mutex_unlock(x)
#else
#define gdMutexDeclare(x)
#define gdMutexSetup(x)
#define gdMutexShutdown(x)
#define gdMutexLock(x)
#define gdMutexUnlock(x)
#endif
#endif /* GDHELPERS_H */
#define GDHELPERS_H 1
#include <sys/types.h>
#include "php.h"
/* TBB: strtok_r is not universal; provide an implementation of it. */
extern char *gd_strtok_r(char *s, char *sep, char **state);
/* These functions wrap memory management. gdFree is
in gd.h, where callers can utilize it to correctly
free memory allocated by these functions with the
right version of free(). */
#define gdCalloc(nmemb, size) ecalloc(nmemb, size)
#define gdMalloc(size) emalloc(size)
#define gdRealloc(ptr, size) erealloc(ptr, size)
#define gdEstrdup(ptr) estrdup(ptr)
#define gdFree(ptr) efree(ptr)
#define gdPMalloc(ptr) pemalloc(ptr, 1)
#define gdPFree(ptr) pefree(ptr, 1)
#define gdPEstrdup(ptr) pestrdup(ptr, 1)
/* Returns nonzero if multiplying the two quantities will
result in integer overflow. Also returns nonzero if
either quantity is negative. By Phil Knirsch based on
netpbm fixes by Alan Cox. */
int overflow2(int a, int b);
#ifdef ZTS
#define gdMutexDeclare(x) MUTEX_T x
#define gdMutexSetup(x) x = tsrm_mutex_alloc()
#define gdMutexShutdown(x) tsrm_mutex_free(x)
#define gdMutexLock(x) tsrm_mutex_lock(x)
#define gdMutexUnlock(x) tsrm_mutex_unlock(x)
#else
#define gdMutexDeclare(x)
#define gdMutexSetup(x)
#define gdMutexShutdown(x)
#define gdMutexLock(x)
#define gdMutexUnlock(x)
#endif
#endif /* GDHELPERS_H */