aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Wilson <wilson@gcc.gnu.org>1993-01-12 14:55:32 -0800
committerJim Wilson <wilson@gcc.gnu.org>1993-01-12 14:55:32 -0800
commit49ced9eab3ad02a4bcf8067b0603abcf6d4a139c (patch)
treee096e8d5d7c5a25cb9908ba2dfcf8e8cdf4622bf
parent9e263fc414bf87288f0c278dfffb30d21e8ad02d (diff)
downloadgcc-49ced9eab3ad02a4bcf8067b0603abcf6d4a139c.zip
gcc-49ced9eab3ad02a4bcf8067b0603abcf6d4a139c.tar.gz
gcc-49ced9eab3ad02a4bcf8067b0603abcf6d4a139c.tar.bz2
(stat.h): Don't depend upon specific formal parameter names when...
(stat.h): Don't depend upon specific formal parameter names when locating static functions to convert to prototype form. Also be more selective about what strings to prepend underbars to during renaming of formal parameters and local variables in static functions. From-SVN: r3206
-rwxr-xr-xgcc/fixinc.svr453
1 files changed, 27 insertions, 26 deletions
diff --git a/gcc/fixinc.svr4 b/gcc/fixinc.svr4
index b2572cb..c1970d4 100755
--- a/gcc/fixinc.svr4
+++ b/gcc/fixinc.svr4
@@ -1098,37 +1098,38 @@ if [ \! -z "$file_to_fix" ]; then
cp $file_to_fix /tmp/$base
chmod +w /tmp/$base
ex /tmp/$base <<EOF
-/^stat(path, buf)/j
+/^stat(/
+s/(.*$/(/
j
--
-/^stat(path, buf)/c
-stat (const char *path, struct stat *buf)
-.
-/^lstat(path, buf)/j
+s/;/,/
j
--
-/^lstat(path, buf)/c
-lstat (const char *path, struct stat *buf)
-.
-/^fstat(fd, buf)/j
+s/;/)/
+/^lstat(/
+s/(.*$/(/
j
--
-/^fstat(fd, buf)/c
-fstat (int fd, struct stat *buf)
-.
-/^mknod(path, mode, dev)/j
+s/;/,/
j
+s/;/)/
+/^fstat(/
+s/(.*$/(/
j
--
-/^mknod(path, mode, dev)/c
-mknod (const char *path, mode_t mode, dev_t dev)
-.
-1,\$s/path/__path/g
-1,\$s/buf/__buf/g
-1,\$s/fd/__fd/g
-1,\$s/ret\\([^u]\\)/__ret\1/g
-1,\$s/\\([^_]\\)mode\\([^_]\\)/\\1__mode\\2/g
-1,\$s/\\([^_r]\\)dev\\([^_]\\)/\\1__dev\\2/g
+s/;/,/
+j
+s/;/)/
+/^mknod(/
+s/(.*$/(/
+j
+s/;/,/
+j
+s/;/,/
+j
+s/;/)/
+1,\$s/\([^A-Za-z]\)path\([^A-Za-z]\)/\1__path\2/g
+1,\$s/\([^A-Za-z]\)buf\([^A-Za-z]\)/\1__buf\2/g
+1,\$s/\([^A-Za-z]\)fd\([^A-Za-z]\)/\1__fd\2/g
+1,\$s/ret\([^u]\)/__ret\1/g
+1,\$s/\([^_]\)mode\([^_]\)/\1__mode\2/g
+1,\$s/\([^_r]\)dev\([^_]\)/\1__dev\2/g
wq
EOF
echo Fixed $file_to_fix