Ver código fonte

Remove default #includes in Babel C, C++

* ob-C.el (org-babel-C-expand-C): remove automatic inclusion
of <string.h>, <stdio.h>, <stdlib.h>

* ob-C-test.org: adjust C++ tests to manually include
required header files.

<http://permalink.gmane.org/gmane.emacs.orgmode/96528>
Thierry Banel 10 anos atrás
pai
commit
2081cd3f62
2 arquivos alterados com 1 adições e 2 exclusões
  1. 0 1
      lisp/ob-C.el
  2. 1 1
      testing/examples/ob-C-test.org

+ 0 - 1
lisp/ob-C.el

@@ -194,7 +194,6 @@ it's header arguments."
 		  nil)))
     (when (stringp includes)
       (setq includes (split-string includes)))
-    (setq includes (append includes '("<string.h>" "<stdio.h>" "<stdlib.h>")))
     (when (stringp defines)
       (let ((y nil)
 	    (result (list t)))

+ 1 - 1
testing/examples/ob-C-test.org

@@ -129,7 +129,7 @@
   | sunday    |    4 |
 
 #+source: inhomogeneous_table
-#+begin_src cpp :var tinomogen=tinomogen :results silent
+#+begin_src cpp :var tinomogen=tinomogen :results silent :includes <string.h> <stdio.h>
 int main()
 {
   int i, j;