Commit 265289f679ffd24a88ae1aa2cef0e4aa14703cd8

green 2008-02-26T17:34:36

2008-02-26 Anthony Green <green@spindazzle.org> * src/alpha/ffi.c: Change void (*)() to void (*)(void). src/alpha/osf.S, src/arm/ffi.c, src/frv/ffi.c, src/ia64/ffi.c, src/ia64/unix.S, src/java_raw_api.c, src/m32r/ffi.c, src/mips/ffi.c, src/pa/ffi.c, src/pa/hpux32.S, src/pa/linux.S, src/powerpc/ffi.c, src/powerpc/ffi_darwin.c, src/raw_api.c, src/s390/ffi.c, src/sh/ffi.c, src/sh64/ffi.c, src/sparc/ffi.c, src/x86/ffi.c, src/x86/unix64.S, src/x86/darwin64.S,> src/x86/ffi64.c: Ditto.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
diff --git a/libffi/ChangeLog.libffi b/libffi/ChangeLog.libffi
index 1e0ade9..e237ef3 100644
--- a/libffi/ChangeLog.libffi
+++ b/libffi/ChangeLog.libffi
@@ -1,4 +1,15 @@
-2008-02-24  Anthony Green  <green@spindazzle.org>
+2008-02-26  Anthony Green  <green@redhat.org>
+
+	* src/alpha/ffi.c: Change void (*)() to void (*)(void).
+	src/alpha/osf.S, src/arm/ffi.c, src/frv/ffi.c, src/ia64/ffi.c,
+	src/ia64/unix.S, src/java_raw_api.c, src/m32r/ffi.c,
+	src/mips/ffi.c, src/pa/ffi.c, src/pa/hpux32.S, src/pa/linux.S,
+	src/powerpc/ffi.c, src/powerpc/ffi_darwin.c, src/raw_api.c,
+	src/s390/ffi.c, src/sh/ffi.c, src/sh64/ffi.c, src/sparc/ffi.c,
+	src/x86/ffi.c, src/x86/unix64.S, src/x86/darwin64.S,
+	src/x86/ffi64.c: Ditto.
+
+2008-02-24  Anthony Green  <green@redhat.org>
 
 	* configure.ac: Accept openbsd*, not just openbsd.
 	Bump version to 3.0.4.
diff --git a/libffi/src/alpha/ffi.c b/libffi/src/alpha/ffi.c
index eb8dfca..8d6b2ba 100644
--- a/libffi/src/alpha/ffi.c
+++ b/libffi/src/alpha/ffi.c
@@ -1,5 +1,5 @@
 /* -----------------------------------------------------------------------
-   ffi.c - Copyright (c) 1998, 2001, 2007 Red Hat, Inc.
+   ffi.c - Copyright (c) 1998, 2001, 2007, 2008  Red Hat, Inc.
    
    Alpha Foreign Function Interface 
 
@@ -39,7 +39,7 @@
 # define FFI_TYPE_LONGDOUBLE 4
 #endif
 
-extern void ffi_call_osf(void *, unsigned long, unsigned, void *, void (*)())
+extern void ffi_call_osf(void *, unsigned long, unsigned, void *, void (*)(void))
   FFI_HIDDEN;
 extern void ffi_closure_osf(void) FFI_HIDDEN;
 
@@ -76,7 +76,7 @@ ffi_prep_cif_machdep(ffi_cif *cif)
 
 
 void
-ffi_call(ffi_cif *cif, void (*fn)(), void *rvalue, void **avalue)
+ffi_call(ffi_cif *cif, void (*fn)(void), void *rvalue, void **avalue)
 {
   unsigned long *stack, *argp;
   long i, avn;
diff --git a/libffi/src/alpha/osf.S b/libffi/src/alpha/osf.S
index a3d3f82..ca830d9 100644
--- a/libffi/src/alpha/osf.S
+++ b/libffi/src/alpha/osf.S
@@ -1,5 +1,5 @@
 /* -----------------------------------------------------------------------
-   osf.S - Copyright (c) 1998, 2001, 2007 Red Hat
+   osf.S - Copyright (c) 1998, 2001, 2007, 2008 Red Hat
    
    Alpha/OSF Foreign Function Interface 
 
@@ -14,14 +14,14 @@
    The above copyright notice and this permission notice shall be included
    in all copies or substantial portions of the Software.
 
-   THE SOFTWARE IS PROVIDED ``AS IS'', WITHOUT WARRANTY OF ANY KIND, EXPRESS
-   OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-   MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-   IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
-	ANY CLAIM, DAMAGES OR
-   OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
-   ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-   OTHER DEALINGS IN THE SOFTWARE.
+   THE SOFTWARE IS PROVIDED ``AS IS'', WITHOUT WARRANTY OF ANY KIND,
+   EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+   MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+   NONINFRINGEMENT.  IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+   HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+   WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+   OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+   DEALINGS IN THE SOFTWARE.
    ----------------------------------------------------------------------- */
 
 #define LIBFFI_ASM	
@@ -32,7 +32,7 @@
 	.text
 
 /* ffi_call_osf (void *args, unsigned long bytes, unsigned flags,
-		 void *raddr, void (*fnaddr)());
+		 void *raddr, void (*fnaddr)(void));
 
    Bit o trickiness here -- ARGS+BYTES is the base of the stack frame
    for this function.  This has been allocated by ffi_call.  We also
diff --git a/libffi/src/arm/ffi.c b/libffi/src/arm/ffi.c
index 0149662..f6a6475 100644
--- a/libffi/src/arm/ffi.c
+++ b/libffi/src/arm/ffi.c
@@ -1,5 +1,5 @@
 /* -----------------------------------------------------------------------
-   ffi.c - Copyright (c) 1998  Red Hat, Inc.
+   ffi.c - Copyright (c) 1998, 2008  Red Hat, Inc.
    
    ARM Foreign Function Interface 
 
@@ -149,9 +149,9 @@ ffi_status ffi_prep_cif_machdep(ffi_cif *cif)
 }
 
 extern void ffi_call_SYSV(void (*)(char *, extended_cif *), extended_cif *,
-			  unsigned, unsigned, unsigned *, void (*fn)());
+			  unsigned, unsigned, unsigned *, void (*fn)(void));
 
-void ffi_call(ffi_cif *cif, void (*fn)(), void *rvalue, void **avalue)
+void ffi_call(ffi_cif *cif, void (*fn)(void), void *rvalue, void **avalue)
 {
   extended_cif ecif;
 
diff --git a/libffi/src/frv/ffi.c b/libffi/src/frv/ffi.c
index b79e990..cec5781 100644
--- a/libffi/src/frv/ffi.c
+++ b/libffi/src/frv/ffi.c
@@ -1,6 +1,7 @@
 /* -----------------------------------------------------------------------
-   ffi.c - Copyright (c) 2004  Anthony Green
-   Copyright (C) 2007  Free Software Foundation, Inc.
+   ffi.c - Copyright (C) 2004  Anthony Green
+           Copyright (C) 2007  Free Software Foundation, Inc.
+	   Copyright (C) 2008  Red Hat, Inc.
    
    FR-V Foreign Function Interface 
 
@@ -126,10 +127,10 @@ extern void ffi_call_EABI(void *(*)(char *, extended_cif *),
 			  extended_cif *, 
 			  unsigned, unsigned, 
 			  unsigned *, 
-			  void (*fn)());
+			  void (*fn)(void));
 
 void ffi_call(ffi_cif *cif, 
-	      void (*fn)(), 
+	      void (*fn)(void), 
 	      void *rvalue, 
 	      void **avalue)
 {
diff --git a/libffi/src/ia64/ffi.c b/libffi/src/ia64/ffi.c
index 77e8631..3f8fcc5 100644
--- a/libffi/src/ia64/ffi.c
+++ b/libffi/src/ia64/ffi.c
@@ -1,5 +1,5 @@
 /* -----------------------------------------------------------------------
-   ffi.c - Copyright (c) 1998, 2007 Red Hat, Inc.
+   ffi.c - Copyright (c) 1998, 2007, 2008 Red Hat, Inc.
 	   Copyright (c) 2000 Hewlett Packard Company
    
    IA64 Foreign Function Interface 
@@ -270,10 +270,10 @@ ffi_prep_cif_machdep(ffi_cif *cif)
   return FFI_OK;
 }
 
-extern int ffi_call_unix (struct ia64_args *, PTR64, void (*)(), UINT64);
+extern int ffi_call_unix (struct ia64_args *, PTR64, void (*)(void), UINT64);
 
 void
-ffi_call(ffi_cif *cif, void (*fn)(), void *rvalue, void **avalue)
+ffi_call(ffi_cif *cif, void (*fn)(void), void *rvalue, void **avalue)
 {
   struct ia64_args *stack;
   long i, avn, gpcount, fpcount;
diff --git a/libffi/src/ia64/unix.S b/libffi/src/ia64/unix.S
index 2d10296..b4f1c4b 100644
--- a/libffi/src/ia64/unix.S
+++ b/libffi/src/ia64/unix.S
@@ -1,5 +1,5 @@
 /* -----------------------------------------------------------------------
-   unix.S - Copyright (c) 1998 Red Hat, Inc.
+   unix.S - Copyright (c) 1998, 2008 Red Hat, Inc.
             Copyright (c) 2000 Hewlett Packard Company
    
    IA64/unix Foreign Function Interface 
@@ -19,14 +19,14 @@
    The above copyright notice and this permission notice shall be included
    in all copies or substantial portions of the Software.
 
-   THE SOFTWARE IS PROVIDED ``AS IS'', WITHOUT WARRANTY OF ANY KIND, EXPRESS
-   OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-   MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-   IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
-	ANY CLAIM, DAMAGES OR
-   OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
-   ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-   OTHER DEALINGS IN THE SOFTWARE.
+   THE SOFTWARE IS PROVIDED ``AS IS'', WITHOUT WARRANTY OF ANY KIND,
+   EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+   MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+   NONINFRINGEMENT.  IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+   HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+   WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+   OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+   DEALINGS IN THE SOFTWARE.
    ----------------------------------------------------------------------- */
 
 #define LIBFFI_ASM	
@@ -38,7 +38,7 @@
 .text
 
 /* int ffi_call_unix (struct ia64_args *stack, PTR64 rvalue,
-		      void (*fn)(), int flags);
+		      void (*fn)(void), int flags);
  */
 
         .align 16
diff --git a/libffi/src/java_raw_api.c b/libffi/src/java_raw_api.c
index 4778bf3..1f8f983 100644
--- a/libffi/src/java_raw_api.c
+++ b/libffi/src/java_raw_api.c
@@ -1,5 +1,5 @@
 /* -----------------------------------------------------------------------
-   java_raw_api.c - Copyright (c) 1999, 2007  Red Hat, Inc.
+   java_raw_api.c - Copyright (c) 1999, 2007, 2008  Red Hat, Inc.
 
    Cloned from raw_api.c
 
@@ -295,7 +295,7 @@ ffi_java_raw_to_rvalue (ffi_cif *cif, void *rvalue)
  * these following couple of functions will handle the translation forth
  * and back automatically. */
 
-void ffi_java_raw_call (ffi_cif *cif, void (*fn)(), void *rvalue,
+void ffi_java_raw_call (ffi_cif *cif, void (*fn)(void), void *rvalue,
 			ffi_java_raw *raw)
 {
   void **avalue = (void**) alloca (cif->nargs * sizeof (void*));
diff --git a/libffi/src/m32r/ffi.c b/libffi/src/m32r/ffi.c
index c3e8204..3000063 100644
--- a/libffi/src/m32r/ffi.c
+++ b/libffi/src/m32r/ffi.c
@@ -1,5 +1,6 @@
 /* -----------------------------------------------------------------------
    ffi.c - Copyright (c) 2004  Renesas Technology
+           Copyright (c) 2008  Red Hat, Inc.
    
    M32R Foreign Function Interface 
 
@@ -172,9 +173,9 @@ ffi_prep_cif_machdep(ffi_cif *cif)
 }
 
 extern void ffi_call_SYSV(void (*)(char *, extended_cif *), extended_cif *,
-			  unsigned, unsigned, unsigned *, void (*fn)());
+			  unsigned, unsigned, unsigned *, void (*fn)(void));
 
-void ffi_call(ffi_cif *cif, void (*fn)(), void *rvalue, void **avalue)
+void ffi_call(ffi_cif *cif, void (*fn)(void), void *rvalue, void **avalue)
 {
   extended_cif ecif;
 
diff --git a/libffi/src/mips/ffi.c b/libffi/src/mips/ffi.c
index 9e12c0f..b6887be 100644
--- a/libffi/src/mips/ffi.c
+++ b/libffi/src/mips/ffi.c
@@ -1,5 +1,5 @@
 /* -----------------------------------------------------------------------
-   ffi.c - Copyright (c) 1996, 2007 Red Hat, Inc.
+   ffi.c - Copyright (c) 1996, 2007, 2008  Red Hat, Inc.
            Copyright (c) 2008       David Daney
    
    MIPS Foreign Function Interface 
@@ -494,14 +494,14 @@ ffi_status ffi_prep_cif_machdep(ffi_cif *cif)
 /* Low level routine for calling O32 functions */
 extern int ffi_call_O32(void (*)(char *, extended_cif *, int, int), 
 			extended_cif *, unsigned, 
-			unsigned, unsigned *, void (*)());
+			unsigned, unsigned *, void (*)(void));
 
 /* Low level routine for calling N32 functions */
 extern int ffi_call_N32(void (*)(char *, extended_cif *, int, int), 
 			extended_cif *, unsigned, 
-			unsigned, unsigned *, void (*)());
+			unsigned, unsigned *, void (*)(void));
 
-void ffi_call(ffi_cif *cif, void (*fn)(), void *rvalue, void **avalue)
+void ffi_call(ffi_cif *cif, void (*fn)(void), void *rvalue, void **avalue)
 {
   extended_cif ecif;
 
diff --git a/libffi/src/pa/ffi.c b/libffi/src/pa/ffi.c
index bb5dd22..c7a1435 100644
--- a/libffi/src/pa/ffi.c
+++ b/libffi/src/pa/ffi.c
@@ -1,5 +1,6 @@
 /* -----------------------------------------------------------------------
    ffi.c - (c) 2003-2004 Randolph Chung <tausq@debian.org>
+           (c) 2008 Red Hat, Inc.
 
    HPPA Foreign Function Interface
    HP-UX PA ABI support (c) 2006 Free Software Foundation, Inc.
@@ -368,9 +369,9 @@ ffi_status ffi_prep_cif_machdep(ffi_cif *cif)
 
 extern void ffi_call_pa32(void (*)(UINT32 *, extended_cif *, unsigned),
 			  extended_cif *, unsigned, unsigned, unsigned *,
-			  void (*fn)());
+			  void (*fn)(void));
 
-void ffi_call(ffi_cif *cif, void (*fn)(), void *rvalue, void **avalue)
+void ffi_call(ffi_cif *cif, void (*fn)(void), void *rvalue, void **avalue)
 {
   extended_cif ecif;
 
diff --git a/libffi/src/pa/hpux32.S b/libffi/src/pa/hpux32.S
index 8f6b461..40528ba 100644
--- a/libffi/src/pa/hpux32.S
+++ b/libffi/src/pa/hpux32.S
@@ -1,5 +1,6 @@
 /* -----------------------------------------------------------------------
    hpux32.S - Copyright (c) 2006 Free Software Foundation, Inc.
+	                (c) 2008 Red Hat, Inc.
    based on src/pa/linux.S
 
    HP-UX PA Foreign Function Interface
@@ -40,7 +41,7 @@
 			       unsigned bytes,
 			       unsigned flags,
 			       unsigned *rvalue,
-			       void (*fn)());
+			       void (*fn)(void));
 	 */
 
 	.export	ffi_call_pa32,ENTRY,PRIV_LEV=3
diff --git a/libffi/src/pa/linux.S b/libffi/src/pa/linux.S
index 6bad45f..f11ae76 100644
--- a/libffi/src/pa/linux.S
+++ b/libffi/src/pa/linux.S
@@ -1,5 +1,6 @@
 /* -----------------------------------------------------------------------
    linux.S - (c) 2003-2004 Randolph Chung <tausq@debian.org>
+	     (c) 2008 Red Hat, Inc.
 
    HPPA Foreign Function Interface
 
@@ -17,8 +18,7 @@
    THE SOFTWARE IS PROVIDED ``AS IS'', WITHOUT WARRANTY OF ANY KIND, EXPRESS
    OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
    MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-   IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
-	ANY CLAIM, DAMAGES OR
+   IN NO EVENT SHALL RENESAS TECHNOLOGY BE LIABLE FOR ANY CLAIM, DAMAGES OR
    OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
    ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
    OTHER DEALINGS IN THE SOFTWARE.
@@ -37,7 +37,7 @@
 			       unsigned bytes,
 			       unsigned flags,
 			       unsigned *rvalue,
-			       void (*fn)());
+			       void (*fn)(void));
 	 */
 
 	.export ffi_call_pa32,code
diff --git a/libffi/src/powerpc/ffi.c b/libffi/src/powerpc/ffi.c
index e6b869f..c2d2530 100644
--- a/libffi/src/powerpc/ffi.c
+++ b/libffi/src/powerpc/ffi.c
@@ -1,6 +1,7 @@
 /* -----------------------------------------------------------------------
    ffi.c - Copyright (c) 1998 Geoffrey Keating
    Copyright (C) 2007 Free Software Foundation, Inc
+   Copyright (C) 2008 Red Hat, Inc
 
    PowerPC Foreign Function Interface
 
@@ -871,13 +872,13 @@ ffi_prep_cif_machdep (ffi_cif *cif)
 }
 
 extern void ffi_call_SYSV(extended_cif *, unsigned, unsigned, unsigned *,
-			  void (*fn)());
+			  void (*fn)(void));
 extern void FFI_HIDDEN ffi_call_LINUX64(extended_cif *, unsigned long,
 					unsigned long, unsigned long *,
-					void (*fn)());
+					void (*fn)(void));
 
 void
-ffi_call(ffi_cif *cif, void (*fn)(), void *rvalue, void **avalue)
+ffi_call(ffi_cif *cif, void (*fn)(void), void *rvalue, void **avalue)
 {
   extended_cif ecif;
 
diff --git a/libffi/src/powerpc/ffi_darwin.c b/libffi/src/powerpc/ffi_darwin.c
index 6d1b73e..501035d 100644
--- a/libffi/src/powerpc/ffi_darwin.c
+++ b/libffi/src/powerpc/ffi_darwin.c
@@ -425,11 +425,11 @@ ffi_status ffi_prep_cif_machdep(ffi_cif *cif)
 }
 
 extern void ffi_call_AIX(extended_cif *, unsigned, unsigned, unsigned *,
-			 void (*fn)(), void (*fn2)());
+			 void (*fn)(void), void (*fn2)(void));
 extern void ffi_call_DARWIN(extended_cif *, unsigned, unsigned, unsigned *,
-			    void (*fn)(), void (*fn2)());
+			    void (*fn)(void), void (*fn2)(void));
 
-void ffi_call(ffi_cif *cif, void (*fn)(), void *rvalue, void **avalue)
+void ffi_call(ffi_cif *cif, void (*fn)(void), void *rvalue, void **avalue)
 {
   extended_cif ecif;
 
diff --git a/libffi/src/raw_api.c b/libffi/src/raw_api.c
index 00f02b2..ce21372 100644
--- a/libffi/src/raw_api.c
+++ b/libffi/src/raw_api.c
@@ -1,10 +1,8 @@
 /* -----------------------------------------------------------------------
-   raw_api.c - Copyright (c) 1999  Red Hat, Inc.
+   raw_api.c - Copyright (c) 1999, 2008  Red Hat, Inc.
 
    Author: Kresten Krab Thorup <krab@gnu.org>
 
-   $Id $
-
    Permission is hereby granted, free of charge, to any person obtaining
    a copy of this software and associated documentation files (the
    ``Software''), to deal in the Software without restriction, including
@@ -190,7 +188,7 @@ ffi_ptrarray_to_raw (ffi_cif *cif, void **args, ffi_raw *raw)
  * these following couple of functions will handle the translation forth
  * and back automatically. */
 
-void ffi_raw_call (ffi_cif *cif, void (*fn)(), void *rvalue, ffi_raw *raw)
+void ffi_raw_call (ffi_cif *cif, void (*fn)(void), void *rvalue, ffi_raw *raw)
 {
   void **avalue = (void**) alloca (cif->nargs * sizeof (void*));
   ffi_raw_to_ptrarray (cif, raw, avalue);
diff --git a/libffi/src/s390/ffi.c b/libffi/src/s390/ffi.c
index d17f790..ca2675b 100644
--- a/libffi/src/s390/ffi.c
+++ b/libffi/src/s390/ffi.c
@@ -1,5 +1,6 @@
 /* -----------------------------------------------------------------------
    ffi.c - Copyright (c) 2000, 2007 Software AG
+           Copyright (c) 2008 Red Hat, Inc
  
    S390 Foreign Function Interface
  
@@ -88,7 +89,7 @@ extern void ffi_call_SYSV(unsigned,
 			  void (*)(unsigned char *, extended_cif *),
 			  unsigned,
 			  void *,
-			  void (*fn)());
+			  void (*fn)(void));
 
 extern void ffi_closure_SYSV(void);
  
@@ -498,7 +499,7 @@ ffi_prep_cif_machdep(ffi_cif *cif)
  
 void
 ffi_call(ffi_cif *cif,
-	 void (*fn)(),
+	 void (*fn)(void),
 	 void *rvalue,
 	 void **avalue)
 {
diff --git a/libffi/src/sh/ffi.c b/libffi/src/sh/ffi.c
index a5d61d2..d7fa1d4 100644
--- a/libffi/src/sh/ffi.c
+++ b/libffi/src/sh/ffi.c
@@ -1,5 +1,6 @@
 /* -----------------------------------------------------------------------
    ffi.c - Copyright (c) 2002, 2003, 2004, 2005, 2006, 2007 Kaz Kojima
+           Copyright (c) 2008 Red Hat, Inc.
    
    SuperH Foreign Function Interface 
 
@@ -406,9 +407,9 @@ ffi_status ffi_prep_cif_machdep(ffi_cif *cif)
 }
 
 extern void ffi_call_SYSV(void (*)(char *, extended_cif *), extended_cif *,
-			  unsigned, unsigned, unsigned *, void (*fn)());
+			  unsigned, unsigned, unsigned *, void (*fn)(void));
 
-void ffi_call(ffi_cif *cif, void (*fn)(), void *rvalue, void **avalue)
+void ffi_call(ffi_cif *cif, void (*fn)(void), void *rvalue, void **avalue)
 {
   extended_cif ecif;
   UINT64 trvalue;
diff --git a/libffi/src/sh64/ffi.c b/libffi/src/sh64/ffi.c
index 7271353..b17cf2c 100644
--- a/libffi/src/sh64/ffi.c
+++ b/libffi/src/sh64/ffi.c
@@ -1,5 +1,6 @@
 /* -----------------------------------------------------------------------
    ffi.c - Copyright (c) 2003, 2004 Kaz Kojima
+           Copyright (c) 2008 Anthony Green
    
    SuperH SHmedia Foreign Function Interface 
 
@@ -239,12 +240,12 @@ extern void ffi_call_SYSV(void (*)(char *, extended_cif *),
 			  /*@out@*/ extended_cif *, 
 			  unsigned, unsigned, long long,
 			  /*@out@*/ unsigned *, 
-			  void (*fn)());
+			  void (*fn)(void));
 /*@=declundef@*/
 /*@=exportheader@*/
 
 void ffi_call(/*@dependent@*/ ffi_cif *cif, 
-	      void (*fn)(), 
+	      void (*fn)(void), 
 	      /*@out@*/ void *rvalue, 
 	      /*@dependent@*/ void **avalue)
 {
diff --git a/libffi/src/sparc/ffi.c b/libffi/src/sparc/ffi.c
index aa81ce9..4cdd1b9 100644
--- a/libffi/src/sparc/ffi.c
+++ b/libffi/src/sparc/ffi.c
@@ -1,5 +1,5 @@
 /* -----------------------------------------------------------------------
-   ffi.c - Copyright (c) 1996, 2003, 2004, 2007 Red Hat, Inc.
+   ffi.c - Copyright (c) 1996, 2003, 2004, 2007, 2008 Red Hat, Inc.
    
    SPARC Foreign Function Interface 
 
@@ -359,13 +359,13 @@ int ffi_v9_layout_struct(ffi_type *arg, int off, char *ret, char *intg, char *fl
 
 #ifdef SPARC64
 extern int ffi_call_v9(void *, extended_cif *, unsigned, 
-		       unsigned, unsigned *, void (*fn)());
+		       unsigned, unsigned *, void (*fn)(void));
 #else
 extern int ffi_call_v8(void *, extended_cif *, unsigned, 
-		       unsigned, unsigned *, void (*fn)());
+		       unsigned, unsigned *, void (*fn)(void));
 #endif
 
-void ffi_call(ffi_cif *cif, void (*fn)(), void *rvalue, void **avalue)
+void ffi_call(ffi_cif *cif, void (*fn)(void), void *rvalue, void **avalue)
 {
   extended_cif ecif;
   void *rval = rvalue;
diff --git a/libffi/src/x86/darwin64.S b/libffi/src/x86/darwin64.S
index 5ba0a5f..2f7394e 100644
--- a/libffi/src/x86/darwin64.S
+++ b/libffi/src/x86/darwin64.S
@@ -1,5 +1,6 @@
 /* -----------------------------------------------------------------------
    darwin64.S - Copyright (c) 2006 Free Software Foundation, Inc.
+	        Copyright (c) 2008 Red Hat, Inc.
    derived from unix64.S
 
    x86-64 Foreign Function Interface for Darwin.
@@ -33,7 +34,7 @@
 .text
 
 /* ffi_call_unix64 (void *args, unsigned long bytes, unsigned flags,
-		    void *raddr, void (*fnaddr)());
+		    void *raddr, void (*fnaddr)(void));
 
    Bit o trickiness here -- ARGS+BYTES is the base of the stack frame
    for this function.  This has been allocated by ffi_call.  We also
diff --git a/libffi/src/x86/ffi.c b/libffi/src/x86/ffi.c
index 85059d0..662b484 100644
--- a/libffi/src/x86/ffi.c
+++ b/libffi/src/x86/ffi.c
@@ -1,5 +1,5 @@
 /* -----------------------------------------------------------------------
-   ffi.c - Copyright (c) 1996, 1998, 1999, 2001, 2007  Red Hat, Inc.
+   ffi.c - Copyright (c) 1996, 1998, 1999, 2001, 2007, 2008  Red Hat, Inc.
            Copyright (c) 2002  Ranjit Mathew
            Copyright (c) 2002  Bo Thorsen
            Copyright (c) 2002  Roger Sayle
@@ -180,15 +180,15 @@ ffi_status ffi_prep_cif_machdep(ffi_cif *cif)
 }
 
 extern void ffi_call_SYSV(void (*)(char *, extended_cif *), extended_cif *,
-			  unsigned, unsigned, unsigned *, void (*fn)());
+			  unsigned, unsigned, unsigned *, void (*fn)(void));
 
 #ifdef X86_WIN32
 extern void ffi_call_STDCALL(void (*)(char *, extended_cif *), extended_cif *,
-			  unsigned, unsigned, unsigned *, void (*fn)());
+			  unsigned, unsigned, unsigned *, void (*fn)(void));
 
 #endif /* X86_WIN32 */
 
-void ffi_call(ffi_cif *cif, void (*fn)(), void *rvalue, void **avalue)
+void ffi_call(ffi_cif *cif, void (*fn)(void), void *rvalue, void **avalue)
 {
   extended_cif ecif;
 
@@ -423,16 +423,16 @@ ffi_prep_args_raw(char *stack, extended_cif *ecif)
 
 extern void
 ffi_call_SYSV(void (*)(char *, extended_cif *), extended_cif *, unsigned, 
-	      unsigned, unsigned *, void (*fn)());
+	      unsigned, unsigned *, void (*fn)(void));
 
 #ifdef X86_WIN32
 extern void
 ffi_call_STDCALL(void (*)(char *, extended_cif *), extended_cif *, unsigned,
-		 unsigned, unsigned *, void (*fn)());
+		 unsigned, unsigned *, void (*fn)(void));
 #endif /* X86_WIN32 */
 
 void
-ffi_raw_call(ffi_cif *cif, void (*fn)(), void *rvalue, ffi_raw *fake_avalue)
+ffi_raw_call(ffi_cif *cif, void (*fn)(void), void *rvalue, ffi_raw *fake_avalue)
 {
   extended_cif ecif;
   void **avalue = (void **)fake_avalue;
diff --git a/libffi/src/x86/ffi64.c b/libffi/src/x86/ffi64.c
index 5162f69..2896ae4 100644
--- a/libffi/src/x86/ffi64.c
+++ b/libffi/src/x86/ffi64.c
@@ -1,5 +1,6 @@
 /* -----------------------------------------------------------------------
    ffi.c - Copyright (c) 2002, 2007  Bo Thorsen <bo@suse.de>
+           Copyright (c) 2008  Red Hat, Inc.
    
    x86-64 Foreign Function Interface 
 
@@ -43,7 +44,7 @@ struct register_args
 };
 
 extern void ffi_call_unix64 (void *args, unsigned long bytes, unsigned flags,
-			     void *raddr, void (*fnaddr)(), unsigned ssecount);
+			     void *raddr, void (*fnaddr)(void), unsigned ssecount);
 
 /* All reference to register classes here is identical to the code in
    gcc/config/i386/i386.c. Do *not* change one without the other.  */
@@ -340,7 +341,7 @@ ffi_prep_cif_machdep (ffi_cif *cif)
 }
 
 void
-ffi_call (ffi_cif *cif, void (*fn)(), void *rvalue, void **avalue)
+ffi_call (ffi_cif *cif, void (*fn)(void), void *rvalue, void **avalue)
 {
   enum x86_64_reg_class classes[MAX_CLASSES];
   char *stack, *argp;
diff --git a/libffi/src/x86/unix64.S b/libffi/src/x86/unix64.S
index cdc065f..5388da3 100644
--- a/libffi/src/x86/unix64.S
+++ b/libffi/src/x86/unix64.S
@@ -1,5 +1,6 @@
 /* -----------------------------------------------------------------------
    unix64.S - Copyright (c) 2002  Bo Thorsen <bo@suse.de>
+	      Copyright (c) 2008  Red Hat, Inc
 
    x86-64 Foreign Function Interface 
 
@@ -32,7 +33,7 @@
 .text
 
 /* ffi_call_unix64 (void *args, unsigned long bytes, unsigned flags,
-	            void *raddr, void (*fnaddr)());
+	            void *raddr, void (*fnaddr)(void));
 
    Bit o trickiness here -- ARGS+BYTES is the base of the stack frame
    for this function.  This has been allocated by ffi_call.  We also