Commit | Line | Data |
---|---|---|
c862e87b JM |
1 | /* |
2 | * rlversion -- print out readline's version number | |
3 | */ | |
4 | ||
cc88a640 | 5 | /* Copyright (C) 1987-2009 Free Software Foundation, Inc. |
9255ee31 | 6 | |
cc88a640 | 7 | This file is part of the GNU Readline Library (Readline), a library for |
9255ee31 EZ |
8 | reading lines of text with interactive input and history editing. |
9 | ||
cc88a640 JK |
10 | Readline is free software: you can redistribute it and/or modify |
11 | it under the terms of the GNU General Public License as published by | |
12 | the Free Software Foundation, either version 3 of the License, or | |
9255ee31 EZ |
13 | (at your option) any later version. |
14 | ||
cc88a640 JK |
15 | Readline is distributed in the hope that it will be useful, |
16 | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
9255ee31 EZ |
18 | GNU General Public License for more details. |
19 | ||
cc88a640 JK |
20 | You should have received a copy of the GNU General Public License |
21 | along with Readline. If not, see <http://www.gnu.org/licenses/>. | |
22 | */ | |
9255ee31 | 23 | |
c862e87b JM |
24 | #if defined (HAVE_CONFIG_H) |
25 | # include <config.h> | |
26 | #endif | |
27 | ||
28 | #include <stdio.h> | |
29 | #include <sys/types.h> | |
30 | #include "posixstat.h" | |
31 | ||
5bdf8622 DJ |
32 | #ifdef HAVE_STDLIB_H |
33 | # include <stdlib.h> | |
34 | #else | |
35 | extern void exit(); | |
36 | #endif | |
37 | ||
1b17e766 EZ |
38 | #ifdef READLINE_LIBRARY |
39 | # include "readline.h" | |
40 | #else | |
41 | # include <readline/readline.h> | |
42 | #endif | |
c862e87b JM |
43 | |
44 | main() | |
45 | { | |
46 | printf ("%s\n", rl_library_version ? rl_library_version : "unknown"); | |
47 | exit (0); | |
48 | } |