forked from Imagelibrary/rtems
First attempt at adding constants and feature flags
This commit is contained in:
@@ -63,7 +63,7 @@ ch02.texi: ch02.t
|
|||||||
-n "Process Primitives" ${*}.t
|
-n "Process Primitives" ${*}.t
|
||||||
|
|
||||||
ch03.texi: ch03.t
|
ch03.texi: ch03.t
|
||||||
$(BMENU) -c -p "Symbolic Constants" \
|
$(BMENU) -c -p "Execution-Time Symbolic Constants for Portability Specifications" \
|
||||||
-u "Top" \
|
-u "Top" \
|
||||||
-n "Process Environment" ${*}.t
|
-n "Process Environment" ${*}.t
|
||||||
|
|
||||||
|
|||||||
@@ -14,3 +14,27 @@
|
|||||||
|
|
||||||
@section Conformance
|
@section Conformance
|
||||||
|
|
||||||
|
@example
|
||||||
|
NGROUPS_MAX, Feature Flag,
|
||||||
|
_POSIX_ASYNCHRONOUS_IO, Feature Flag,
|
||||||
|
_POSIX_CHOWN_RESTRICTED, Feature Flag,
|
||||||
|
_POSIX_FSYNC, Feature Flag,
|
||||||
|
_POSIX_JOB_CONTROL, Feature Flag,
|
||||||
|
_POSIX_MAPPED_FILES, Feature Flag,
|
||||||
|
_POSIX_MEMLOCK, Feature Flag,
|
||||||
|
_POSIX_MEMLOCK_RANGE, Feature Flag,
|
||||||
|
_POSIX_MEMORY_PROTECTION, Feature Flag,
|
||||||
|
_POSIX_MESSAGE_PASSING, Feature Flag,
|
||||||
|
_POSIX_PRIORITIZED_IO, Feature Flag,
|
||||||
|
_POSIX_PRIORITY_SCHEDULING, Feature Flag,
|
||||||
|
_POSIX_REALTIME_SIGNALS, Feature Flag,
|
||||||
|
_POSIX_SEMAPHORES, Feature Flag,
|
||||||
|
_POSIX_SHARED_MEMORY_OBJECTS, Feature Flag,
|
||||||
|
_POSIX_SYNCHRONIZED_IO, Feature Flag,
|
||||||
|
_POSIX_TIMERS, Feature Flag,
|
||||||
|
_POSIX_THREAD_PRIO_INHERIT, Feature Flag,
|
||||||
|
_POSIX_THREAD_PRIORITY_SCHEDULING, Feature Flag,
|
||||||
|
_POSIX_THREADS, Feature Flag,
|
||||||
|
_POSIX_THREAD_SAFE_FUNCTIONS, Feature Flag,
|
||||||
|
@end example
|
||||||
|
|
||||||
|
|||||||
@@ -16,6 +16,52 @@
|
|||||||
|
|
||||||
@section Error Numbers
|
@section Error Numbers
|
||||||
|
|
||||||
|
@example
|
||||||
|
E2BIG, Constant,
|
||||||
|
EACCES, Constant,
|
||||||
|
EAGAIN, Constant,
|
||||||
|
EBADF, Constant,
|
||||||
|
EBADMSG, Constant,
|
||||||
|
EBUSY, Constant,
|
||||||
|
ECANCELED, Constant,
|
||||||
|
ECHILD, Constant,
|
||||||
|
EDEADLK, Constant,
|
||||||
|
EDOM, Constant,
|
||||||
|
EEXIST, Constant,
|
||||||
|
EFAULT, Constant,
|
||||||
|
EFBIG, Constant,
|
||||||
|
EINPROGRESS, Constant,
|
||||||
|
EINTR, Constant,
|
||||||
|
EINVAL, Constant,
|
||||||
|
EIO, Constant,
|
||||||
|
EISDIR, Constant,
|
||||||
|
EMFILE, Constant,
|
||||||
|
EMLINK, Constant,
|
||||||
|
EMSGSIZE, Constant,
|
||||||
|
ENAMETOOLONG, Constant,
|
||||||
|
ENFILE, Constant,
|
||||||
|
ENODEV, Constant,
|
||||||
|
ENOENT, Constant,
|
||||||
|
ENOEXEC, Constant,
|
||||||
|
ENOLCK, Constant,
|
||||||
|
ENOMEM, Constant,
|
||||||
|
ENOSPC, Constant,
|
||||||
|
ENOSYS, Constant,
|
||||||
|
ENOTDIR, Constant,
|
||||||
|
ENOTEMPTY, Constant,
|
||||||
|
ENOTSUP, Constant,
|
||||||
|
ENOTTY, Constant,
|
||||||
|
ENXIO, Constant,
|
||||||
|
EPERM, Constant,
|
||||||
|
EPIPE, Constant,
|
||||||
|
ERANGE, Constant,
|
||||||
|
EROFS, Constant,
|
||||||
|
ESPIPE, Constant,
|
||||||
|
ESRCH, Constant,
|
||||||
|
ETIMEDOUT, Constant,
|
||||||
|
EXDEV, Constant,
|
||||||
|
@end example
|
||||||
|
|
||||||
@section Primitive System Types
|
@section Primitive System Types
|
||||||
|
|
||||||
@example
|
@example
|
||||||
@@ -46,7 +92,176 @@ NOTE: time_t is not listed in this section but is used by many functions.
|
|||||||
|
|
||||||
@section C Language Definitions
|
@section C Language Definitions
|
||||||
|
|
||||||
|
@subsection Symbols From the C Standard
|
||||||
|
|
||||||
|
@subsection POSIX.1 Symbols
|
||||||
|
|
||||||
|
@example
|
||||||
|
_POSIX_C_SOURCE, Feature Flag,
|
||||||
|
@end example
|
||||||
|
|
||||||
@section Numerical Limits
|
@section Numerical Limits
|
||||||
|
|
||||||
|
@section C Language Limits
|
||||||
|
|
||||||
|
@example
|
||||||
|
CHAR_BIT
|
||||||
|
CHAR_MAX
|
||||||
|
CHAR_MIN
|
||||||
|
INT_MAX
|
||||||
|
INT_MIN
|
||||||
|
LONG_MAX
|
||||||
|
LONG_MIN
|
||||||
|
MB_LEN_MAX
|
||||||
|
SCHAR_MAX
|
||||||
|
SCHAR_MIN
|
||||||
|
SHRT_MAX
|
||||||
|
SHRT_MIN
|
||||||
|
UCHAR_MAX
|
||||||
|
UINT_MAX
|
||||||
|
ULONG_MAX
|
||||||
|
USHRT_MAX
|
||||||
|
@end example
|
||||||
|
|
||||||
|
@subsection Minimum Values
|
||||||
|
|
||||||
|
@example
|
||||||
|
_POSIX_AIO_LISTIO_MAX
|
||||||
|
_POSIX_AIO_MAX
|
||||||
|
_POSIX_ARG_MAX
|
||||||
|
_POSIX_CHILD_MAX
|
||||||
|
_POSIX_DELAYTIMER_MAX
|
||||||
|
_POSIX_LINK_MAX
|
||||||
|
_POSIX_LOGIN_NAME_MAX
|
||||||
|
_POSIX_MAX_CANON
|
||||||
|
_POSIX_MAX_INPUT
|
||||||
|
_POSIX_MQ_OPEN_MAX
|
||||||
|
_POSIX_MQ_PRIO_MAX
|
||||||
|
_POSIX_NAME_MAX
|
||||||
|
_POSIX_NGROUPS_MAX
|
||||||
|
_POSIX_OPEN_MAX
|
||||||
|
_POSIX_PATH_MAX
|
||||||
|
_POSIX_PIPE_BUF
|
||||||
|
_POSIX_RTSIG_MAX
|
||||||
|
_POSIX_SEM_NSEMS_MAX
|
||||||
|
_POSIX_SEM_VALUE_MAX
|
||||||
|
_POSIX_SIGQUEUE_MAX
|
||||||
|
_POSIX_SSIZE_MAX
|
||||||
|
_POSIX_STREAM_MAX
|
||||||
|
_POSIX_THREAD_DESTRUCTOR_ITERATIONS
|
||||||
|
_POSIX_THREAD_KEYS_MAX
|
||||||
|
_POSIX_THREAD_THREADS_MAX
|
||||||
|
_POSIX_TTY_NAME_MAX
|
||||||
|
_POSIX_TIME_MAX
|
||||||
|
_POSIX_TZNAME_MAX
|
||||||
|
@end example
|
||||||
|
|
||||||
|
@subsection Run-Time Increasable Values
|
||||||
|
|
||||||
|
@example
|
||||||
|
_POSIX_NGROUPS_MAX
|
||||||
|
@end example
|
||||||
|
|
||||||
|
@subsection Run-Time Invariant Values (Possible Indeterminate)
|
||||||
|
|
||||||
|
@example
|
||||||
|
AIO_LISTIO_MAX
|
||||||
|
AIO_MAX
|
||||||
|
AIO_PRIO_DELTA_MAX
|
||||||
|
ARG_MAX
|
||||||
|
CHILD_MAX
|
||||||
|
DELAYTIMER_MAX
|
||||||
|
LOGIN_NAME_MAX
|
||||||
|
MQ_OPEN_MAX
|
||||||
|
OPEN_MAX
|
||||||
|
PAGESIZE
|
||||||
|
PTHREAD_DESTRUCTOR_ITERATIONS
|
||||||
|
PTHREAD_KEYS_MAX
|
||||||
|
PTHREAD_STACK_MIN
|
||||||
|
PTHJREAD_THREADS_MAX
|
||||||
|
RTSIG_MAX
|
||||||
|
SEM_NSEMS_MAX
|
||||||
|
SEM_VALUE_MAX
|
||||||
|
SIGQUEUE_MAX
|
||||||
|
STREAM_MAX
|
||||||
|
TIMER_MAX
|
||||||
|
TTY_NAME_MAX
|
||||||
|
TZNAME_MAX
|
||||||
|
@end example
|
||||||
|
|
||||||
|
@subsection Pathname Variable Values
|
||||||
|
|
||||||
|
@example
|
||||||
|
LINK_MAX
|
||||||
|
MAX_CANON
|
||||||
|
MAX_INPUT
|
||||||
|
NAME_MAX
|
||||||
|
PATH_MAX
|
||||||
|
PIPE_BUF
|
||||||
|
@end example
|
||||||
|
|
||||||
|
@subsection Invariant Values
|
||||||
|
|
||||||
|
@example
|
||||||
|
SSIZE_MAX
|
||||||
|
@end example
|
||||||
|
|
||||||
|
@subsection Maximum Values
|
||||||
|
|
||||||
|
@example
|
||||||
|
_POSIX_CLOCKRES_MIN
|
||||||
|
@end example
|
||||||
|
|
||||||
@section Symbolic Constants
|
@section Symbolic Constants
|
||||||
|
|
||||||
|
@subsection Symbolic Constants for the @code{access} Function
|
||||||
|
|
||||||
|
@example
|
||||||
|
R_OK
|
||||||
|
W_OK
|
||||||
|
X_OK
|
||||||
|
F_OK
|
||||||
|
@end example
|
||||||
|
|
||||||
|
@subsection Symbolic Constants for the @code{lseek} Function
|
||||||
|
|
||||||
|
@example
|
||||||
|
SEEK_SET
|
||||||
|
SEEK_CUR
|
||||||
|
SEEK_END
|
||||||
|
@end example
|
||||||
|
|
||||||
|
@subsection Compile-Time Symbolic Constants for Portability Specifications
|
||||||
|
|
||||||
|
@example
|
||||||
|
_POSIX_ASYNCHRONOUS_IO
|
||||||
|
_POSIX_FSYNC
|
||||||
|
_POSIX_JOB_CONTROL
|
||||||
|
_POSIX_MAPPED_FILES
|
||||||
|
_POSIX_MEMLOCK
|
||||||
|
_POSIX_MEMLOCK_RANGE
|
||||||
|
_POSIX_MEMORY_PROTECTION
|
||||||
|
_POSIX_MESSAGE_PASSING
|
||||||
|
_POSIX_PRIORITIZED_IO
|
||||||
|
_POSIX_PRIORITY_SCHEDULING
|
||||||
|
_POSIX_REALTIME_SIGNALS
|
||||||
|
_POSIX_SAVED_IDS
|
||||||
|
_POSIX_SEMAPHORES
|
||||||
|
_POSIX_SHARED_MEMORY_OBJECTS
|
||||||
|
_POSIX_SYNCHRONIZED_IO
|
||||||
|
_POSIX_THREADS
|
||||||
|
_POSIX_THREAD_ATTR_STACKADDR
|
||||||
|
_POSIX_THREAD_ATTR_STACKSIZE
|
||||||
|
_POSIX_THREAD_PRIORITY_SCHEDULING
|
||||||
|
_POSIX_THREAD_PRIO_INHERIT
|
||||||
|
_POSIX_THREAD_PRIO_CEILING
|
||||||
|
_POSIX_THREAD_PROCESS_SHARED
|
||||||
|
_POSIX_THREAD_SAFE_FUNCTIONS
|
||||||
|
_POSIX_TIMERS
|
||||||
|
_POSIX_VERSION
|
||||||
|
@end example
|
||||||
|
|
||||||
|
@subsection Execution-Time Symbolic Constants for Portability Specifications
|
||||||
|
|
||||||
|
@example
|
||||||
|
@end example
|
||||||
|
|||||||
@@ -104,7 +104,6 @@ putc(), Function, Implemented
|
|||||||
putchar(), Function, Implemented
|
putchar(), Function, Implemented
|
||||||
puts(), Function, Implemented
|
puts(), Function, Implemented
|
||||||
remove(), Function, Implemented
|
remove(), Function, Implemented
|
||||||
rename(), Function, Implemented
|
|
||||||
rewind(), Function, Implemented
|
rewind(), Function, Implemented
|
||||||
scanf(), Function, Implemented
|
scanf(), Function, Implemented
|
||||||
fscanf(), Function, Implemented
|
fscanf(), Function, Implemented
|
||||||
@@ -115,6 +114,8 @@ tmpnam(), Function, Implemented
|
|||||||
ungetc(), Function, Implemented
|
ungetc(), Function, Implemented
|
||||||
@end example
|
@end example
|
||||||
|
|
||||||
|
NOTE: @code{rename} is also included in another section. @ref{Rename a File}.
|
||||||
|
|
||||||
ANSI C Section 4.10 --- General Utilities
|
ANSI C Section 4.10 --- General Utilities
|
||||||
|
|
||||||
@example
|
@example
|
||||||
@@ -130,11 +131,13 @@ malloc(), Function, Implemented
|
|||||||
realloc(), Function, Implemented
|
realloc(), Function, Implemented
|
||||||
abort(), Function, Implemented
|
abort(), Function, Implemented
|
||||||
exit(), Function, Implemented
|
exit(), Function, Implemented
|
||||||
getenv(), Function, Implemented
|
|
||||||
bsearch(), Function, Implemented
|
bsearch(), Function, Implemented
|
||||||
qsort(), Function, Implemented
|
qsort(), Function, Implemented
|
||||||
@end example
|
@end example
|
||||||
|
|
||||||
|
NOTE: @code{getenv} is also included in another section.
|
||||||
|
@ref{Environment Access}.
|
||||||
|
|
||||||
ANSI C Section 4.11 --- String Handling
|
ANSI C Section 4.11 --- String Handling
|
||||||
|
|
||||||
@example
|
@example
|
||||||
@@ -157,7 +160,6 @@ strlen(), Function, Implemented
|
|||||||
ANSI C Section 4.12 --- Date and Time Handling
|
ANSI C Section 4.12 --- Date and Time Handling
|
||||||
|
|
||||||
@example
|
@example
|
||||||
time(), Function, Implemented
|
|
||||||
asctime(), Function, Implemented
|
asctime(), Function, Implemented
|
||||||
ctime(), Function, Implemented
|
ctime(), Function, Implemented
|
||||||
gmtime(), Function, Implemented
|
gmtime(), Function, Implemented
|
||||||
@@ -168,6 +170,9 @@ strftime(), Function, Implemented
|
|||||||
|
|
||||||
NOTE: RTEMS has no notion of time zones.
|
NOTE: RTEMS has no notion of time zones.
|
||||||
|
|
||||||
|
NOTE: @code{time} is also included in another section.
|
||||||
|
@ref{Get System Time}.
|
||||||
|
|
||||||
@subsection Extensions to Time Functions
|
@subsection Extensions to Time Functions
|
||||||
|
|
||||||
@subsection Extensions to @code{setlocale} Function
|
@subsection Extensions to @code{setlocale} Function
|
||||||
|
|||||||
@@ -53,6 +53,8 @@ summarize_chapter()
|
|||||||
|
|
||||||
echo
|
echo
|
||||||
|
|
||||||
|
# functions
|
||||||
|
|
||||||
functions_total=`wc2 "()" $*`
|
functions_total=`wc2 "()" $*`
|
||||||
functions_implemented=` wc3 "()" "Implemented" $*`
|
functions_implemented=` wc3 "()" "Implemented" $*`
|
||||||
functions_unimplemented=` wc3 "()" "Unimplemented" $*`
|
functions_unimplemented=` wc3 "()" "Unimplemented" $*`
|
||||||
@@ -66,6 +68,8 @@ summarize_chapter()
|
|||||||
${functions_partial} ${functions_dummy} \
|
${functions_partial} ${functions_dummy} \
|
||||||
${functions_untested}`
|
${functions_untested}`
|
||||||
|
|
||||||
|
# data types
|
||||||
|
|
||||||
datatypes_total=`wc2 "Type," $*`
|
datatypes_total=`wc2 "Type," $*`
|
||||||
datatypes_implemented=` wc3 "Type," "Implemented" $*`
|
datatypes_implemented=` wc3 "Type," "Implemented" $*`
|
||||||
datatypes_unimplemented=` wc3 "Type," "Unimplemented" $*`
|
datatypes_unimplemented=` wc3 "Type," "Unimplemented" $*`
|
||||||
@@ -79,6 +83,38 @@ summarize_chapter()
|
|||||||
${datatypes_partial} ${datatypes_dummy} \
|
${datatypes_partial} ${datatypes_dummy} \
|
||||||
${datatypes_untested}`
|
${datatypes_untested}`
|
||||||
|
|
||||||
|
# feature flags
|
||||||
|
|
||||||
|
features_total=`wc2 "Feature Flag," $*`
|
||||||
|
features_implemented=` wc3 "Feature Flag," "Implemented" $*`
|
||||||
|
features_unimplemented=` wc3 "Feature Flag," "Unimplemented" $*`
|
||||||
|
features_unmplementable=`wc3 "Feature Flag," "Unimplementable" $*`
|
||||||
|
features_partial=` wc3 "Feature Flag," "Partial Implementation" $*`
|
||||||
|
features_dummy=` wc3 "Feature Flag," "Dummy Implementation" $*`
|
||||||
|
features_untested=` wc3 "Feature Flag," "Untested Implementation" $*`
|
||||||
|
|
||||||
|
features_sum=`addit ${features_implemented} \
|
||||||
|
${features_unimplemented} ${features_unmplementable} \
|
||||||
|
${features_partial} ${features_dummy} \
|
||||||
|
${features_untested}`
|
||||||
|
|
||||||
|
# constants
|
||||||
|
|
||||||
|
constants_total=`wc2 "Constant," $*`
|
||||||
|
constants_implemented=` wc3 "Constant," "Implemented" $*`
|
||||||
|
constants_unimplemented=` wc3 "Constant," "Unimplemented" $*`
|
||||||
|
constants_unmplementable=`wc3 "Constant," "Unimplementable" $*`
|
||||||
|
constants_partial=` wc3 "Constant," "Partial Implementation" $*`
|
||||||
|
constants_dummy=` wc3 "Constant," "Dummy Implementation" $*`
|
||||||
|
constants_untested=` wc3 "Constant," "Untested Implementation" $*`
|
||||||
|
|
||||||
|
constants_sum=`addit ${constants_implemented} \
|
||||||
|
${constants_unimplemented} ${constants_unmplementable} \
|
||||||
|
${constants_partial} ${constants_dummy} \
|
||||||
|
${constants_untested}`
|
||||||
|
|
||||||
|
# Now print the reports
|
||||||
|
|
||||||
echo "@example"
|
echo "@example"
|
||||||
echo "Functions:"
|
echo "Functions:"
|
||||||
echo " Total Number : ${functions_total}"
|
echo " Total Number : ${functions_total}"
|
||||||
@@ -91,9 +127,9 @@ summarize_chapter()
|
|||||||
echo "@end example"
|
echo "@end example"
|
||||||
echo
|
echo
|
||||||
if [ ${functions_sum} -ne ${functions_total} ] ; then
|
if [ ${functions_sum} -ne ${functions_total} ] ; then
|
||||||
echo "@sp"
|
echo "@sp 1"
|
||||||
echo "@center{@b{FUNCTION COUNTS DO NOT ADD UP!!}}"
|
echo "@center @b{FUNCTION COUNTS DO NOT ADD UP!!}}"
|
||||||
echo "@sp"
|
echo "@sp 1"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "@example"
|
echo "@example"
|
||||||
@@ -108,9 +144,43 @@ summarize_chapter()
|
|||||||
echo "@end example"
|
echo "@end example"
|
||||||
echo
|
echo
|
||||||
if [ ${datatypes_sum} -ne ${datatypes_total} ] ; then
|
if [ ${datatypes_sum} -ne ${datatypes_total} ] ; then
|
||||||
echo "@sp"
|
echo "@sp 1"
|
||||||
echo "@center{@b{DATA TYPE COUNTS DO NOT ADD UP!!}}"
|
echo "@center @b{DATA TYPE COUNTS DO NOT ADD UP!!}"
|
||||||
echo "@sp"
|
echo "@sp 1"
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "@example"
|
||||||
|
echo "Feature Flags:"
|
||||||
|
echo " Total Number : ${features_total}"
|
||||||
|
echo " Implemented : ${features_implemented}"
|
||||||
|
echo " Unimplemented : ${features_unimplemented}"
|
||||||
|
echo " Unimplementable : ${features_unmplementable}"
|
||||||
|
echo " Partial : ${features_partial}"
|
||||||
|
echo " Dummy : ${features_dummy}"
|
||||||
|
echo " Untested : ${features_untested}"
|
||||||
|
echo "@end example"
|
||||||
|
echo
|
||||||
|
if [ ${features_sum} -ne ${features_total} ] ; then
|
||||||
|
echo "@sp 1"
|
||||||
|
echo "@center @b{FEATURE FLAG COUNTS DO NOT ADD UP!!}"
|
||||||
|
echo "@sp 1"
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "@example"
|
||||||
|
echo "Constants:"
|
||||||
|
echo " Total Number : ${constants_total}"
|
||||||
|
echo " Implemented : ${constants_implemented}"
|
||||||
|
echo " Unimplemented : ${constants_unimplemented}"
|
||||||
|
echo " Unimplementable : ${constants_unmplementable}"
|
||||||
|
echo " Partial : ${constants_partial}"
|
||||||
|
echo " Dummy : ${constants_dummy}"
|
||||||
|
echo " Untested : ${constants_untested}"
|
||||||
|
echo "@end example"
|
||||||
|
echo
|
||||||
|
if [ ${constants_sum} -ne ${constants_total} ] ; then
|
||||||
|
echo "@sp 1"
|
||||||
|
echo "@center @b{CONSTANT COUNTS DO NOT ADD UP!!}"
|
||||||
|
echo "@sp 1"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user