1 /*
2 * SPDX-License-Identifier: BSD-3-Clause
3 *
4 * Copyright © 2024 Keith Packard
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:
9 *
10 * 1. Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer.
12 *
13 * 2. Redistributions in binary form must reproduce the above
14 * copyright notice, this list of conditions and the following
15 * disclaimer in the documentation and/or other materials provided
16 * with the distribution.
17 *
18 * 3. Neither the name of the copyright holder nor the names of its
19 * contributors may be used to endorse or promote products derived
20 * from this software without specific prior written permission.
21 *
22 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
23 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
24 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
25 * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
26 * COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
27 * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
28 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
29 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
30 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
31 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
32 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
33 * OF THE POSSIBILITY OF SUCH DAMAGE.
34 */
35
36 /*
37 * This is mostly a header file test to make sure picolibc headers
38 * can be used with a C++ compiler. This file mentions all POSIX headers,
39 * but those not provided with picolibc are commented out
40 */
41
42 //#include <aio.h>
43
44 #include <arpa/inet.h>
45 #include <assert.h>
46 #include <complex.h>
47 #include <cpio.h>
48 #include <ctype.h>
49
50 //#include <dirent.h>
51 //#include <dlfcn.h>
52
53 #include <errno.h>
54 #include <fcntl.h>
55 #include <fenv.h>
56 #include <float.h>
57 //#include <fmtmsg.h>
58 #include <fnmatch.h>
59 #include <ftw.h>
60 #include <glob.h>
61 #include <grp.h>
62 #include <iconv.h>
63 #include <inttypes.h>
64 #include <iso646.h>
65 #include <langinfo.h>
66 #include <libgen.h>
67 #include <limits.h>
68 #include <locale.h>
69 #include <math.h>
70
71 //#include <monetary.h>
72 //#include <mqueue.h>
73 //#include <ndbm.h>
74 //#include <net/if.h>
75 //#include <netdb.h>
76 //#include <netinet/in.h>
77 //#include <netinet/tcp.h>
78 //#include <nl_types.h>
79 //#include <poll.h>
80 //#include <pthread.h>
81
82 #include <pwd.h>
83 #include <regex.h>
84 #include <sched.h>
85 #include <search.h>
86
87 //#include <semaphore.h>
88
89 #include <setjmp.h>
90 #include <signal.h>
91 #include <spawn.h>
92 #include <stdarg.h>
93 #include <stdbool.h>
94 #include <stddef.h>
95 #include <stdint.h>
96 #include <stdio.h>
97 #include <stdlib.h>
98 #include <string.h>
99 #include <strings.h>
100
101 //#include <stropts.h>
102 //#include <sys/ipc.h>
103 //#include <sys/mman.h>
104 //#include <sys/msg.h>
105
106 #include <sys/resource.h>
107 #include <sys/select.h>
108
109 //#include <sys/sem.h>
110 //#include <sys/shm.h>
111 //#include <sys/socket.h>
112
113 #include <sys/stat.h>
114
115 //#include <sys/statvfs.h>
116
117 #include <sys/time.h>
118 #include <sys/times.h>
119 #include <sys/types.h>
120
121 //#include <sys/uio.h>
122 //#include <sys/un.h>
123 //#include <sys/utsname.h>
124
125 #include <sys/wait.h>
126
127 //#include <syslog.h>
128
129 #include <tar.h>
130
131 //#include <termios.h>
132 //#include <tgmath.h>
133
134 #include <time.h>
135
136 //#include <trace.h>
137 //#include <ulimit.h>
138
139 #include <unistd.h>
140 #include <utime.h>
141
142 //#include <utmpx.h>
143
144 #include <wchar.h>
145 #include <wctype.h>
146 #include <wordexp.h>
147
148 #ifdef __clang__
149 #pragma GCC diagnostic ignored "-Wpragmas"
150 #pragma GCC diagnostic ignored "-Wunknown-warning-option"
151 #pragma GCC diagnostic ignored "-Wmain"
152 #endif
153
154 extern "C" {
155
156 int main(void);
157
main(void)158 int main(void) {
159 printf("Hello, world!\n");
160 return 0;
161 }
162
163 }
164