From: Matthew Fernandez Date: Sun, 31 Jan 2021 01:25:22 +0000 (-0800) Subject: #pragma once instead of old-style header guards in vmalloc X-Git-Tag: 2.46.1~2^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1610680373de531088ba3e6d89ad3bf2c34d7f15;p=graphviz #pragma once instead of old-style header guards in vmalloc These are supported by all recent compilers. --- diff --git a/lib/vmalloc/vmalloc.h b/lib/vmalloc/vmalloc.h index c5bda6ed2..7b2daa7ba 100644 --- a/lib/vmalloc/vmalloc.h +++ b/lib/vmalloc/vmalloc.h @@ -8,13 +8,12 @@ * Contributors: Details at http://www.graphviz.org/ *************************************************************************/ +#pragma once + #ifdef __cplusplus extern "C" { #endif -#ifndef _VMALLOC_H -#define _VMALLOC_H 1 - /* Public header file for the virtual malloc package. ** ** Written by Kiem-Phong Vo, kpv@research.att.com, 01/16/94. @@ -64,7 +63,6 @@ extern "C" { #define vmfree(vm,d) (*(_VM_(vm)->meth.freef))((vm),(void*)(d)) #endif #define vmnewof(v,p,t,n,x) (t*)vmresize((v), (p), sizeof(t)*(n)+(x)) -#endif /* _VMALLOC_H */ #ifdef __cplusplus } #endif diff --git a/lib/vmalloc/vmhdr.h b/lib/vmalloc/vmhdr.h index 733436aac..ea7bd54ad 100644 --- a/lib/vmalloc/vmhdr.h +++ b/lib/vmalloc/vmhdr.h @@ -8,13 +8,12 @@ * Contributors: Details at http://www.graphviz.org/ *************************************************************************/ +#pragma once + #ifdef __cplusplus extern "C" { #endif -#ifndef _VMHDR_H -#define _VMHDR_H 1 - /* Common types, and macros for vmalloc functions. ** ** Written by Kiem-Phong Vo, kpv@research.att.com, 01/16/94. @@ -27,7 +26,6 @@ void *bestalloc(Vmalloc_t * vm, size_t size); int bestfree(Vmalloc_t * vm, void * data); void *bestresize(Vmalloc_t * vm, void * data, size_t size); -#endif /* _VMHDR_H */ #ifdef __cplusplus } #endif