浏览代码

* updated

peter 24 年之前
父节点
当前提交
d0474620d7
共有 2 个文件被更改,包括 23 次插入1 次删除
  1. 10 1
      tests/tbs/tb0359.pp
  2. 13 0
      tests/tbs/tb0362.pp

+ 10 - 1
tests/tbs/tb0359.pp

@@ -4,10 +4,19 @@
 
 {$linklib c}
 
+type
+  tprintfproc=procedure(t:pchar);varargs;cdecl;
+
 procedure printf(t:pchar);varargs;cdecl;external;
 
+var
+  t : tprintfproc;
 begin
-  printf('Test %d\n',1);
+  printf('Proc test %d %s %f'#10,1,'test',1234.5678);
+
+  t:=@printf;
+  t('Procvar test %d %s %f'#10,2,'test',1234.5678);
+
 {$else}
 begin
   writeln('Unix only test');

+ 13 - 0
tests/tbs/tb0362.pp

@@ -0,0 +1,13 @@
+{$R+}
+
+type
+  size_t = Cardinal;
+
+function CMSG_ALIGN(len: size_t): size_t;
+begin
+  CMSG_ALIGN := (len + SizeOf(size_t) - 1) and (not (SizeOf(size_t) - 1));
+end;
+
+
+begin
+end.