summaryrefslogtreecommitdiff
path: root/tilde.h
diff options
context:
space:
mode:
Diffstat (limited to 'tilde.h')
-rw-r--r--tilde.h30
1 files changed, 11 insertions, 19 deletions
diff --git a/tilde.h b/tilde.h
index d3966a6..0df608b 100644
--- a/tilde.h
+++ b/tilde.h
@@ -24,35 +24,27 @@
#if !defined (_TILDE_H_)
# define _TILDE_H_
+#if defined (HAVE_CONFIG_H)
+# include <config.h>
+#endif
+
#ifdef __cplusplus
extern "C" {
#endif
/* A function can be defined using prototypes and compile on both ANSI C
and traditional C compilers with something like this:
- extern char *func __P((char *, char *, int)); */
+ extern char *func PARAMS((char *, char *, int)); */
-#if !defined (__P)
+#if !defined (PARAMS)
# if defined (__STDC__) || defined (__GNUC__) || defined (__cplusplus)
-# define __P(protos) protos
+# define PARAMS(protos) protos
# else
-# define __P(protos) ()
+# define PARAMS(protos) ()
# endif
#endif
-#if !defined (__STDC__) && !defined (__cplusplus)
-# if defined (__GNUC__) /* gcc with -traditional */
-# if !defined (const)
-# define const __const
-# endif /* !const */
-# else /* !__GNUC__ */
-# if !defined (const)
-# define const
-# endif /* !const */
-# endif /* !__GNUC__ */
-#endif /* !__STDC__ && !__cplusplus */
-
-typedef char *tilde_hook_func_t __P((char *));
+typedef char *tilde_hook_func_t PARAMS((char *));
/* If non-null, this contains the address of a function that the application
wants called before trying the standard tilde expansions. The function
@@ -77,11 +69,11 @@ extern char **tilde_additional_prefixes;
extern char **tilde_additional_suffixes;
/* Return a new string which is the result of tilde expanding STRING. */
-extern char *tilde_expand __P((const char *));
+extern char *tilde_expand PARAMS((const char *));
/* Do the work of tilde expansion on FILENAME. FILENAME starts with a
tilde. If there is no expansion, call tilde_expansion_failure_hook. */
-extern char *tilde_expand_word __P((const char *));
+extern char *tilde_expand_word PARAMS((const char *));
#ifdef __cplusplus
}