Next: Additional functions, Previous: File Locking, Up: The GNU database manager [Contents][Index]
The following global variables and constants are available:
This variable contains error code from the last failed GDBM
call. See Error codes, for a list of available error codes and
their descriptions.
Use gdbm_strerror (see Error handling) to convert it to a
descriptive text.
This variable is an array of error descriptions, which is used by
gdbm_strerror to convert error codes to human-readable text
(see Error handling). You can access it directly, if you wish so. It
contains _GDBM_MAX_ERRNO + 1 elements and can be directly
indexed by the error code to obtain a corresponding descriptive
text.
Array of boolean values indicating, for each GDBM error code, whether
the value of errno(3) variable is meaningful for this error
code. See gdbm_check_syserr.
The minimum error code used by GDBM.
The maximum error code used by GDBM.
A string containing the version information.
This variable contains the GDBM version numbers:
| Index | Meaning |
|---|---|
| 0 | Major number |
| 1 | Minor number |
| 2 | Patchlevel number |
Additionally, the following constants are defined in the gdbm.h file:
Major number.
Minor number.
Patchlevel number.
These can be used to verify whether the header file matches the library.
To compare two split-out version numbers, use the following function:
Compare two version numbers. Return -1 if a is less than
b, 1 if a is greater than b and 0 if
they are equal.
Comparison is done from left to right, so that:
a = { 1, 8, 3 };
b = { 1, 8, 3 };
gdbm_version_cmp (a, b) ⇒ 0
a = { 1, 8, 3 };
b = { 1, 8, 2 };
gdbm_version_cmp (a, b) ⇒ 1
a = { 1, 8, 3 };
b = { 1, 9. 0 };
gdbm_version_cmp (a, b) ⇒ -1
Next: Additional functions, Previous: File Locking, Up: The GNU database manager [Contents][Index]