]> git.saurik.com Git - apple/configd.git/blob - SystemConfiguration.fproj/restore-temporary-headers
configd-1061.80.3.tar.gz
[apple/configd.git] / SystemConfiguration.fproj / restore-temporary-headers
1 #!/bin/sh
2
3 if [ $# -lt 1 ]; then
4 echo "Cannot update headers, private header directory not specified"
5 exit 1
6 fi
7
8 SPI_BASE="${1}"
9
10 for H in \
11 DHCPClientPreferences.h \
12 SCDynamicStore.h \
13 SCDynamicStoreCopyDHCPInfo.h \
14 SCDynamicStoreCopySpecific.h \
15 SCDynamicStoreKey.h \
16 SCNetworkConfiguration.h \
17 SCNetworkConnection.h \
18 SCPreferences.h \
19 SCPreferencesPath.h \
20 SCPreferencesSetSpecific.h \
21 SCSchemaDefinitions.h \
22 SystemConfiguration.h \
23
24 do
25 HACK=$(echo "_DO_NOT_INCLUDE_${H}" | tr '[:lower:]' '[:upper:]' | sed -e 's/\./_/')
26 cat <<_END_OF_INPUT > "${SPI_BASE}/_${H}"
27 #ifndef ${HACK}
28 #define ${HACK}
29
30 /*
31 * WARNING WARNING WARNING WARNING WARNING
32 *
33 * This is a PRIVATE/INTERNAL header file that is on the to-be-removed soon
34 * list. Please update your project to use :
35 * #include <SystemConfiguration/${H}>
36 * or :
37 * #include <SystemConfiguration/SystemConfiguration.h>
38 *
39 * WARNING WARNING WARNING WARNING WARNING
40 */
41 #ifndef NO_TAPI_WARNINGS
42 #warning "Please #include <SystemConfiguration/${H}>, NOT <SystemConfiguration/_${H}>. See rdar://41937689 for details"
43 #endif // NO_TAPI_WARNINGS
44
45 #endif // ${HACK}
46
47 #include <SystemConfiguration/${H}>
48 _END_OF_INPUT
49 done
50
51 exit