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
ea950e44
Commit
ea950e44
authored
1 month ago
by
James K. Lowden
Browse files
Options
Downloads
Patches
Plain Diff
whitespace
parent
491b384e
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
gcc/cobol/posix/README.md
+13
-13
13 additions, 13 deletions
gcc/cobol/posix/README.md
with
13 additions
and
13 deletions
gcc/cobol/posix/README.md
+
13
−
13
View file @
ea950e44
...
...
@@ -8,33 +8,33 @@ there, of course, via the `CALL` statement. But that's not very
convenient, and offers no parameter validation.
GCC COBOL as of this writing works
*only*
in a Posix environment. This
directory exists to make using OS-provided functions a bit more convenient.
directory exists to make using OS-provided functions a bit more convenient.
## Contents
The machine-shop tools are in this directory. Things directly usable
by a COBOL program are in the
`udf/`
and
`c/`
directories.
-
`scrape.awk`
extracts function prototypes from the SYNOPSIS of a man page.
-
`scrape.awk`
extracts function prototypes from the SYNOPSIS of a man page.
-
`udf-gen`
reads function declarations and, for each one, produces a
COBOL User Defined Function (UDF) that calls the function.
-
`Makefile`
produces a list of function prototypes from Section 2 of
the manual.
the manual.
-
`c/`
contains helper functions in C that cannot be expressed in
COBOL. For example, the C
`errno`
"variable" may be a macro, and may
not be declared except by
`errno.h`
, which is not accessible to
COBOL.
-
`udf/Makefile`
builds some infrastructure and examples:
COBOL.
-
`udf/Makefile`
builds some infrastructure and examples:
-
`udf/libposix-errno.so`
, to get at the C
`errno`
variable and its
string representation.
-
`udf/posix-mkdir.cbl`
automatically from the manual, using
`udf-gen`
.
-
`udf/t/errno`
and
-
`udf/t/exit`
as examples of COBOL programs using these Posix UDFs.
-
`udf/posix-mkdir.cbl`
automatically from the manual, using
`udf-gen`
.
-
`udf/t/errno`
and
-
`udf/t/exit`
as examples of COBOL programs using these Posix UDFs.
## Prerequisites
`udf-gen`
is a Python program that imports
the
[
PLY pycparser module
](
http://www.dabeaz.com/ply/
)
module, which must be installed.
the
[
PLY pycparser module
](
http://www.dabeaz.com/ply/
)
module, which must be installed.
`udf-gen`
is lightly documented, use
`udf-gen --help`
. It can be a
little tedious to set up the first time, but if you want to use more a
...
...
@@ -42,7 +42,7 @@ few functions, it will be faster than doing the work by hand.
## Limitations
`udf-gen`
does not
`udf-gen`
does not
-
generate a working UDF for function parameters of type
`struct`
,
such as is used by
**stat**
(2). This is because the information is
...
...
@@ -52,14 +52,14 @@ few functions, it will be faster than doing the work by hand.
None of this is particularly difficult; it's just a matter of time and
need. The
`scrape.awk`
script finds 560 functions in the Ubuntu LTS
22.
04 manual. Which of those is important is for users to decide.
22.
04 manual. Which of those is important is for users to decide.
## Other Options
IBM and Microfocus both supply intrinsic functions to interface with
the OS, each in their own way. GnuCOBOL implements some of those functions.
the OS, each in their own way. GnuCOBOL implements some of those functions.
## Portability
## Portability
The UDF produced by
`udf-gen`
is pure ISO COBOL. The code should be
compilable by any ISO COBOL compiler.
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