[Mesa-dev] [PATCH 4/4] mapi: move some #includes from .h file to .c files

Brian Paul brianp at vmware.com
Fri Mar 13 12:22:35 PDT 2015


Just include things where they're needed.
---
 src/mapi/glapi/glapi_getproc.c | 4 ++++
 src/mapi/glapi/glapi_nop.c     | 1 +
 src/mapi/glapi/glapi_priv.h    | 3 ---
 3 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/src/mapi/glapi/glapi_getproc.c b/src/mapi/glapi/glapi_getproc.c
index bfde92c..524a771 100644
--- a/src/mapi/glapi/glapi_getproc.c
+++ b/src/mapi/glapi/glapi_getproc.c
@@ -30,6 +30,9 @@
  */
 
 
+#include <assert.h>
+#include <string.h>
+#include <stdlib.h>
 #include "glapi/glapi_priv.h"
 #include "glapi/glapitable.h"
 
@@ -37,6 +40,7 @@
 #define FIRST_DYNAMIC_OFFSET (sizeof(struct _glapi_table) / sizeof(void *))
 
 
+
 /**********************************************************************
  * Static function management.
  */
diff --git a/src/mapi/glapi/glapi_nop.c b/src/mapi/glapi/glapi_nop.c
index 0041ed5..13db310 100644
--- a/src/mapi/glapi/glapi_nop.c
+++ b/src/mapi/glapi/glapi_nop.c
@@ -44,6 +44,7 @@
  */
 
 
+#include <stdlib.h>
 #include <string.h>
 #include "glapi/glapi_priv.h"
 
diff --git a/src/mapi/glapi/glapi_priv.h b/src/mapi/glapi/glapi_priv.h
index d368260..50f710e 100644
--- a/src/mapi/glapi/glapi_priv.h
+++ b/src/mapi/glapi/glapi_priv.h
@@ -26,9 +26,6 @@
 #ifndef _GLAPI_PRIV_H
 #define _GLAPI_PRIV_H
 
-#include <stdlib.h>
-#include <string.h>
-#include <stdio.h>
 
 #ifdef HAVE_DIX_CONFIG_H
 #include <dix-config.h>
-- 
1.9.1



More information about the mesa-dev mailing list