pkg: Local packages are machine-dependent
[nethome.git] / src / const_test.c
1 #include <stdlib.h>
2 #include <string.h>
3
4 static void func1(const char *const *array)     /* FAILURE! */
5 {
6 }
7 static void func2(const char *      *array)     /* FAILURE! */
8 {
9 }
10 static void func3(      char *const *array)     /* ok */
11 {
12 }
13 static void func4(const char *string)           /* ok */
14 {
15 }
16
17 char **static_array;
18
19 int main(void)
20 {
21         static_array=malloc(3*sizeof(*static_array));
22         static_array[0]=strdup("A");
23         static_array[1]=strdup("B");
24         static_array[2]=strdup("C");
25         func1(static_array);
26         func2(static_array);
27         func3(static_array);
28         func4(static_array[0]);
29         return(0);
30 }