19dedec0cSmrg/*
29dedec0cSmrg * Copyright (c) 2022, Oracle and/or its affiliates.
39dedec0cSmrg *
49dedec0cSmrg * Permission is hereby granted, free of charge, to any person obtaining a
59dedec0cSmrg * copy of this software and associated documentation files (the "Software"),
69dedec0cSmrg * to deal in the Software without restriction, including without limitation
79dedec0cSmrg * the rights to use, copy, modify, merge, publish, distribute, sublicense,
89dedec0cSmrg * and/or sell copies of the Software, and to permit persons to whom the
99dedec0cSmrg * Software is furnished to do so, subject to the following conditions:
109dedec0cSmrg *
119dedec0cSmrg * The above copyright notice and this permission notice (including the next
129dedec0cSmrg * paragraph) shall be included in all copies or substantial portions of the
139dedec0cSmrg * Software.
149dedec0cSmrg *
159dedec0cSmrg * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
169dedec0cSmrg * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
179dedec0cSmrg * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
189dedec0cSmrg * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
199dedec0cSmrg * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
209dedec0cSmrg * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
219dedec0cSmrg * DEALINGS IN THE SOFTWARE.
229dedec0cSmrg */
239dedec0cSmrg
249dedec0cSmrg#ifndef XMUINT_H
259dedec0cSmrg#define XMUINT_H
269dedec0cSmrg
279dedec0cSmrg
289dedec0cSmrg#ifdef HAVE_CONFIG_H
299dedec0cSmrg#include <config.h>
309dedec0cSmrg#endif
319dedec0cSmrg
329dedec0cSmrg#include <X11/Xfuncproto.h>
339dedec0cSmrg#include <sys/types.h>
349dedec0cSmrg
359dedec0cSmrg#ifndef HAVE_REALLOCARRAY
369dedec0cSmrgextern _X_HIDDEN void *Xmureallocarray(void *optr, size_t nmemb, size_t size);
379dedec0cSmrg# define reallocarray(ptr, n, size) Xmureallocarray((ptr), (n), (size))
389dedec0cSmrg#endif
399dedec0cSmrg
409dedec0cSmrg#define Xmumallocarray(n, size) reallocarray(NULL, (n), (size))
419dedec0cSmrg
429dedec0cSmrg#endif /* XMUINT_H */
43