]> granicus.if.org Git - graphviz/commitdiff
#pragma once instead of old-style header guards in vmalloc
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Sun, 31 Jan 2021 01:25:22 +0000 (17:25 -0800)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 6 Feb 2021 18:26:38 +0000 (10:26 -0800)
These are supported by all recent compilers.

lib/vmalloc/vmalloc.h
lib/vmalloc/vmhdr.h

index c5bda6ed2ea6d21e1ade0c41dc9f494452dcd0ee..7b2daa7ba480e081f6fd175c702408cf2e5f1083 100644 (file)
@@ -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
index 733436aacfa7e456ef8167c2b960a90f1298009c..ea7bd54ada637e7360c9dac1c33f2f04b78fd31f 100644 (file)
@@ -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