IF YOU WOULD LIKE TO GET AN ACCOUNT, please write an
email to Administrator. User accounts are meant only to access repo
and report issues and/or generate pull requests.
This is a purpose-specific Git hosting for
BaseALT
projects. Thank you for your understanding!
Только зарегистрированные пользователи имеют доступ к сервису!
Для получения аккаунта, обратитесь к администратору.
Regenerate xlat/sockoptions.in using the following script:
sed -n 's/^\(SO_[^[:space:]]*\).*/\1/p' xlat/sockoptions.in |
uniq |
while read name; do
sed -rn 's/#define[[:space:]]+('"$name"')[[:space:]]+([[:digit:]]+)$/\2\t\1/p' \
/path/to/linux/include/uapi/asm-generic/socket.h
done |
sort -n |
while read def name; do
grep -EH '#define[[:space:]]+'"$name"'[[:space:]]+(0x[[:xdigit:]]+|[[:digit:]]+)' \
/path/to/linux/arch/*/include/uapi/asm/socket.h |
sed -rn 's|^[^#]*/arch/([^/]+)/include/uapi/asm/socket\.h:#define[[:space:]]+'"$name"'[[:space:]]+([^[:space:]]+)([[:space:]].*)?$|\1\t\2|p' |
sed s/parisc/hppa/ |sort |
awk -vname="$name" -vdef="$def" '
{
i=strtonum($2)
if (i == def) next
if (a[i])
a[i]=a[i] " || defined __" $1 "__"
else
a[i]="defined __" $1 "__"
}
END {
iftext="#if"
for (i in a) {
printf("%s %s\n%s %u\n",iftext,a[i],name,i)
iftext="#elif"
}
if (iftext != "#if")
print "#else"
printf("%s %s\n", name, def)
if (iftext == "#if")
print ""
else
print "#endif\n"
}'
done
* xlat/sockoptions.in: Add fallback definitions.
Co-Authored-by: Dmitry V. Levin <ldv@altlinux.org>
* xlat/sockoptions.in: Add SO_MEMINFO, SO_INCOMING_NAPI_ID,
and SO_COOKIE introduced by linux kernel commits v4.12-rc1~64^3~389,
v4.12-rc1~64^3~341^2, and v4.12-rc1~64^3~221^2~1, respectively.