388
|
1 |
diff -ur alsa-lib-1.0.14a.orig/include/search.h alsa-lib-1.0.14a/include/search.h
|
|
2 |
--- alsa-lib-1.0.14a.orig/include/search.h 2007-06-11 15:53:13.000000000 +0700
|
|
3 |
+++ alsa-lib-1.0.14a/include/search.h 2007-08-11 17:18:24.934396510 +0700
|
|
4 |
@@ -17,6 +17,17 @@
|
|
5 |
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
|
6 |
Boston, MA 02111-1307, USA. */
|
|
7 |
|
|
8 |
+#if defined(sun)
|
|
9 |
+#include "/usr/include/search.h"
|
|
10 |
+#define __USE_GNU
|
|
11 |
+struct hsearch_data
|
|
12 |
+ {
|
|
13 |
+ struct _ENTRY *table;
|
|
14 |
+ unsigned int size;
|
|
15 |
+ unsigned int filled;
|
|
16 |
+ };
|
|
17 |
+#endif
|
|
18 |
+
|
|
19 |
#ifndef _SEARCH_H
|
|
20 |
#define _SEARCH_H 1
|
|
21 |
|
|
22 |
@@ -48,17 +59,34 @@
|
|
23 |
extern void remque __P ((void *__elem));
|
|
24 |
#endif
|
|
25 |
|
|
26 |
+#ifndef __const
|
|
27 |
+#define __const const
|
|
28 |
+#endif /* __const */
|
|
29 |
+
|
|
30 |
+#if !defined(__PMT)
|
|
31 |
+#define __PMT(args) args
|
|
32 |
+#endif
|
|
33 |
+
|
|
34 |
+#if !defined(__P)
|
|
35 |
+#define __P(args) args
|
|
36 |
+#endif
|
|
37 |
+
|
|
38 |
+#if !defined(__ptr_t)
|
|
39 |
+#define __ptr_t void *
|
|
40 |
+#endif
|
|
41 |
+
|
|
42 |
|
|
43 |
/* For use with hsearch(3). */
|
|
44 |
#ifndef __COMPAR_FN_T
|
|
45 |
# define __COMPAR_FN_T
|
|
46 |
-typedef int (*__compar_fn_t) __PMT ((__const __ptr_t, __const __ptr_t));
|
|
47 |
+typedef int (*compar_fn_t) __PMT ((__const __ptr_t, __const __ptr_t));
|
|
48 |
|
|
49 |
# ifdef __USE_GNU
|
|
50 |
-typedef __compar_fn_t comparison_fn_t;
|
|
51 |
+typedef compar_fn_t comparison_fn_t;
|
|
52 |
# endif
|
|
53 |
#endif
|
|
54 |
|
|
55 |
+
|
|
56 |
/* Action which shall be performed in the call the hsearch. */
|
|
57 |
typedef enum
|
|
58 |
{
|
|
59 |
@@ -128,16 +156,16 @@
|
|
60 |
/* Search for an entry matching the given KEY in the tree pointed to
|
|
61 |
by *ROOTP and insert a new element if not found. */
|
|
62 |
extern void *tsearch __PMT ((__const void *__key, void **__rootp,
|
|
63 |
- __compar_fn_t __compar));
|
|
64 |
+ compar_fn_t __compar));
|
|
65 |
|
|
66 |
/* Search for an entry matching the given KEY in the tree pointed to
|
|
67 |
by *ROOTP. If no matching entry is available return NULL. */
|
|
68 |
extern void *tfind __PMT ((__const void *__key, void *__const *__rootp,
|
|
69 |
- __compar_fn_t __compar));
|
|
70 |
+ compar_fn_t __compar));
|
|
71 |
|
|
72 |
/* Remove the element matching KEY from the tree pointed to by *ROOTP. */
|
|
73 |
extern void *tdelete __PMT ((__const void *__key, void **__rootp,
|
|
74 |
- __compar_fn_t __compar));
|
|
75 |
+ compar_fn_t __compar));
|
|
76 |
|
|
77 |
#ifndef __ACTION_FN_T
|
|
78 |
# define __ACTION_FN_T
|
|
79 |
@@ -164,13 +192,13 @@
|
|
80 |
[BASE,BASE+NMEMB*SIZE). */
|
|
81 |
extern void *lfind __PMT ((__const void *__key, __const void *__base,
|
|
82 |
size_t *__nmemb, size_t __size,
|
|
83 |
- __compar_fn_t __compar));
|
|
84 |
+ compar_fn_t __compar));
|
|
85 |
|
|
86 |
/* Perform linear search for KEY by comparing by COMPAR function in
|
|
87 |
array [BASE,BASE+NMEMB*SIZE) and insert entry if not found. */
|
|
88 |
extern void *lsearch __PMT ((__const void *__key, void *__base,
|
|
89 |
size_t *__nmemb, size_t __size,
|
|
90 |
- __compar_fn_t __compar));
|
|
91 |
+ compar_fn_t __compar));
|
|
92 |
|
|
93 |
__END_DECLS
|
|
94 |
|