Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
riscv-gcc-1
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
riscv-gcc-1
Commits
dd162880
Commit
dd162880
authored
Jan 13, 2012
by
Ian Lance Taylor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mksysinfo: Pick up TIOCGWINSZ even if expression is too complex.
From-SVN: r183169
parent
daeae9f1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
0 deletions
+16
-0
libgo/mksysinfo.sh
+16
-0
No files found.
libgo/mksysinfo.sh
View file @
dd162880
...
...
@@ -89,6 +89,15 @@ cat > sysinfo.c <<EOF
#if defined(HAVE_NET_IF_H)
#include <net/if.h>
#endif
/* Constants that may only be defined as expressions on some systems,
expressions too complex for -fdump-go-spec to handle. These are
handled specially below. */
enum {
#ifdef TIOCGWINSZ
TIOCGWINSZ_val = TIOCGWINSZ,
#endif
};
EOF
${
CC
}
-fdump-go-spec
=
gen-sysinfo.go
-std
=
gnu99
-S
-o
sysinfo.s sysinfo.c
...
...
@@ -524,7 +533,14 @@ grep '^type _passwd ' gen-sysinfo.go | \
# The ioctl flags for the controlling TTY.
grep
'^const _TIOC'
gen-sysinfo.go |
\
grep
-v
'_val ='
|
\
sed
-e
's/^\(const \)_\(TIOC[^= ]*\)\(.*\)$/\1\2 = _\2/'
>>
${
OUT
}
# We need TIOCGWINSZ.
if
!
grep
'^const TIOCGWINSZ'
${
OUT
}
>
/dev/null 2>&1
;
then
if
grep
'^const _TIOCGWINSZ_val'
${
OUT
}
>
/dev/null 2>&1
;
then
echo
'const TIOCGWINSZ = TIOCGWINSZ_val'
>>
${
OUT
}
fi
fi
# The ioctl flags for terminal control
grep
'^const _TC[GS]ET'
gen-sysinfo.go |
\
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment