Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
gcc-cobol
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
COBOLworx
gcc-cobol
Commits
e05cb56a
Commit
e05cb56a
authored
26 years ago
by
Bruce Korb
Browse files
Options
Downloads
Patches
Plain Diff
UNTESTED support for interix
From-SVN: r26118
parent
91e3ded8
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
gcc/fixinc/fixinc.interix
+171
-0
171 additions, 0 deletions
gcc/fixinc/fixinc.interix
gcc/fixinc/mkfixinc.sh
+4
-0
4 additions, 0 deletions
gcc/fixinc/mkfixinc.sh
with
175 additions
and
0 deletions
gcc/fixinc/fixinc.interix
0 → 100644
+
171
−
0
View file @
e05cb56a
#!/bin/sh
#
# fixinc.interix -- Install modified versions of Interix system include
# files.
#
# Based on fixinc.sco script by Ian Lance Taylor (ian@airs.com)).
# With modifications by Douglas Rupp (drupp@cs.washington.edu)
#
# Copyright (C) 1999 Free Software Foundation, Inc.
#
# This file is part of GNU CC.
#
# GNU CC is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# GNU CC is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with GNU CC; see the file COPYING. If not, write to
# the Free Software Foundation, 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
#
# ?????? fixup comment
# This script munges the native include files provided with Windows NT
# 3.5 SDK systems so as to provide a reasonable namespace when
# compiling with gcc. The header files by default do not
# provide many essential definitions and declarations if
# __STDC__ is 1. This script modifies the header files to check
# for __STRICT_ANSI__ being defined instead. Once munged, the
# resulting new system include files are placed in a directory
# that GNU C will search *before* searching the Include
# directory.
#
# See README-fixinc for more information.
# Fail if no arg to specify a directory for the output.
if
[
x
$1
=
x
]
then
echo
fixincludes: no output directory specified
exit
1
fi
# Directory in which to store the results.
LIB
=
${
1
}
# Make sure it exists.
if
[
!
-d
$LIB
]
;
then
mkdir
$LIB
||
exit
1
fi
ORIG_DIR
=
`
${
PWDCMD
-pwd
}
`
# Make LIB absolute if it is relative.
# Don't do this if not necessary, since may screw up automounters.
case
$LIB
in
/
*
)
;;
*
)
cd
$LIB
;
LIB
=
`
${
PWDCMD
-pwd
}
`
;;
esac
echo
'Building fixincludes in '
${
LIB
}
# Determine whether this filesystem has symbolic links.
if
ln
-s
X
$LIB
/ShouldNotExist 2>/dev/null
;
then
rm
-f
$LIB
/ShouldNotExist
LINKS
=
true
else
LINKS
=
false
fi
echo
'Making directories:'
# Directory containing the original header files.
shift
if
[
$#
-eq
0
]
;
then
set
/usr/include
fi
INLIST
=
"
$@
"
for
INPUT
in
${
INLIST
}
;
do
cd
${
ORIG_DIR
}
cd
${
INPUT
}
if
$LINKS
;
then
files
=
`
ls
-LR
|
sed
-n
s/:
$/
/p
`
else
files
=
`
find
.
-type
d
-print
|
sed
'/^\.$/d'
`
fi
if
[
"x
$files
"
=
x
]
;
then
echo
No files found
in
$INPUT
\;
skipped
continue
fi
for
file
in
$files
;
do
rm
-rf
$LIB
/
$file
if
[
!
-d
$LIB
/
$file
]
then
mkdir
$LIB
/
$file
fi
done
# treetops gets an alternating list
# of old directories to copy
# and the new directories to copy to.
treetops
=
"
${
INPUT
}
${
LIB
}
"
set
-
$treetops
while
[
$#
!=
0
]
;
do
# $1 is an old directory to copy, and $2 is the new directory to copy to.
echo
"Finding header files in
$1
:"
cd
${
INPUT
}
cd
$1
files
=
`
find
.
-name
'*.[hH]'
-type
f
-print
`
echo
"Checking header files in
$1
; transforming into directory
$2
:"
for
file
in
$files
;
do
echo
" "
$file
if
[
-r
$file
]
;
then
cp
$file
$2
/
$file
>
/dev/null 2>&1
||
echo
"Can't copy
$file
"
chmod
+w,a+r
$2
/
$file
# The following have been removed from the sed command below
# because it is more useful to leave these things in.
# The only reason to remove them was for -pedantic,
# which isn't much of a reason. -- rms.
# ??? above/below
# /^[ ]*#[ ]*ident/d
# s/!__STDC__/!defined (__STRICT_ANSI__)/g
sed
-e
'/#[ ]*include.*[<"][A-Za-z]:\\/ s,\\,/,g'
\
-e
'/#[ ]*include.*[<"][A-Za-z]:\// s,\([A-Za-z]\):/,//\1/,'
\
-e
'\,#[ ]*include.*[<"]//[A-Za-z]/, y,abcdefghijklmnopqrstuvwxyz,ABCDEFGHIJKLMNOPQRSTUVWXYZ,'
\
-e
'\,#[ ]*INCLUDE.*[<"]//[A-Za-z]/, s,INCLUDE,include,'
\
$2
/
$file
>
$2
/
$file
.sed
mv
$2
/
$file
.sed
$2
/
$file
if
cmp
$file
$2
/
$file
>
/dev/null 2>&1
;
then
rm
$2
/
$file
else
echo
Fixed
$file
flip
-u
$2
/
$file
fi
fi
done
shift
;
shift
done
echo
'Removing unneeded directories:'
# (Rmdir leaf to root, and if the rmdir fails, who cares....)
cd
$LIB
files
=
`
find
.
-type
d
-print
|
sort
-r
`
for
file
in
$files
;
do
rmdir
$LIB
/
$file
>
/dev/null 2>&1
done
done
# for include directory list
if
[
x
${
INSTALL_ASSERT_H
}
!=
x
]
then
cd
${
ORIG_DIR
}
rm
-f
include/assert.h
cp
${
srcdir
}
/assert.h include/assert.h
||
exit
1
chmod
a+r include/assert.h
fi
exit
0
This diff is collapsed.
Click to expand it.
gcc/fixinc/mkfixinc.sh
+
4
−
0
View file @
e05cb56a
...
@@ -33,6 +33,10 @@ case $machine in
...
@@ -33,6 +33,10 @@ case $machine in
fixincludes
=
fixinc.svr4
fixincludes
=
fixinc.svr4
;;
;;
i[34567]86-
*
-interix
*
)
fixincludes
=
fixinc.interix
;;
*
-
*
-netbsd
*
|
\
*
-
*
-netbsd
*
|
\
alpha
*
-
*
-linux-gnulibc1
*
|
\
alpha
*
-
*
-linux-gnulibc1
*
|
\
i[34567]86-
*
-freebsd
*
|
\
i[34567]86-
*
-freebsd
*
|
\
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment