From dfa720f8b83d5d58cacd622d829515c299e9a013 Mon Sep 17 00:00:00 2001
From: Alberto Bertogli <albertito@blitiri.com.ar>
Date: Tue, 16 Jun 2009 22:07:25 -0300
Subject: [PATCH 39/48] preload/posix: Allow modules to include verbatim code

It will be used in following commits to put some wrapper functions inside
#ifdefs.

Signed-off-by: Alberto Bertogli <albertito@blitiri.com.ar>
---
 preload/posix/generate |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/preload/posix/generate b/preload/posix/generate
index be51c49..792878f 100755
--- a/preload/posix/generate
+++ b/preload/posix/generate
@@ -136,6 +136,16 @@ class Include:
 	def generate_to(self, f):
 		f.write("#include %s\n" % self.path)
 
+class Verbatim:
+	"Represent a verbatim directive"
+	def __init__(self, line):
+		self.line = line
+
+	def __repr__(self):
+		return '<V %s>' % self.line
+
+	def generate_to(self, f):
+		f.write(self.line + '\n')
 
 class EmptyLine:
 	"Represents an empty line"
@@ -205,6 +215,8 @@ def parse_module(path):
 					ctx.fiu_name_base = v
 				elif k == 'include':
 					directives.append(Include(v))
+				elif k == 'v':
+					directives.append(Verbatim(v))
 				else:
 					raise SyntaxError, \
 						("Unknown directive", l)
-- 
1.6.2.2.646.gb214

