summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThierry Banel <tbanelwebmin@free.fr>2015-03-30 21:36:00 +0200
committerNicolas Goaziou <mail@nicolasgoaziou.fr>2015-03-31 12:05:49 +0200
commit2081cd3f62aeea2ad0c5539f3907502767301283 (patch)
tree8187aa61ab58e1d1909744cb1bd7d24ce400edcf
parent7a717f8f0415b822ad4b3d2af99869cff4b6f968 (diff)
downloadorg-mode-2081cd3f62aeea2ad0c5539f3907502767301283.tar.gz
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>
-rw-r--r--lisp/ob-C.el1
-rw-r--r--testing/examples/ob-C-test.org2
2 files changed, 1 insertions, 2 deletions
diff --git a/lisp/ob-C.el b/lisp/ob-C.el
index 0857795..8d5ff2f 100644
--- a/lisp/ob-C.el
+++ b/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)))
diff --git a/testing/examples/ob-C-test.org b/testing/examples/ob-C-test.org
index ab744f1..dcd1c48 100644
--- a/testing/examples/ob-C-test.org
+++ b/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;