summaryrefslogtreecommitdiff
path: root/package/dhrystone/dhrystone-2-prototypes.patch
blob: 7fdcf94ee983fde6d8d05ac2ea55d1ec97c848c2 (plain)
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
Avoid collision with C library using NO_PROTOTYPES found in code already

Patch by Robin Getz <rgetz@blackfin.uclinux.org>

--- a/dhry_1.c
+++ b/dhry_1.c
@@ -28,7 +28,9 @@
 int             Arr_1_Glob [50];
 int             Arr_2_Glob [50] [50];
 
+#ifndef NO_PROTOTYPES
 extern char     *malloc ();
+#endif
 Enumeration     Func_1 ();
   /* forward declaration necessary since Enumeration may not simply be int */
 
@@ -45,14 +45,18 @@
 
 #ifdef TIMES
 struct tms      time_info;
+#ifndef NO_PROTOTYPES
 extern  int     times ();
                 /* see library function "times" */
+#endif
 #define Too_Small_Time 120
                 /* Measurements should last at least about 2 seconds */
 #endif
 #ifdef TIME
+#ifndef NO_PROTOTYPES
 extern long     time();
                 /* see library function "time"  */
+#endif
 #define Too_Small_Time 2
                 /* Measurements should last at least 2 seconds */
 #endif