Modify file.h to maintain API compatibility with earlier versions. If a recent

compiler is being used, then a warning will show up for any modules still using
the old name "private" instead of "_private".
(patch suggested by paravoid)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@91032 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Russell Bryant
2007-12-04 23:46:40 +00:00
parent 644c7a89e7
commit fc232a9a27
5 changed files with 70 additions and 2 deletions

View File

@@ -47,6 +47,9 @@
/* Define to 1 if your GCC C compiler supports the 'const' attribute. */
#undef HAVE_ATTRIBUTE_const
/* Define to 1 if your GCC C compiler supports the 'deprecated' attribute. */
#undef HAVE_ATTRIBUTE_deprecated
/* Define to 1 if your GCC C compiler supports the 'malloc' attribute. */
#undef HAVE_ATTRIBUTE_malloc

View File

@@ -53,4 +53,10 @@
#define attribute_malloc
#endif
#if HAVE_ATTRIBUTE_deprecated
#define attribute_deprecated __attribute__((deprecated))
#else
#define attribute_deprecated
#endif
#endif /* _ASTERISK_COMPILER_H */

View File

@@ -132,7 +132,13 @@ struct ast_filestream {
FILE *f;
struct ast_frame fr; /* frame produced by read, typically */
char *buf; /* buffer pointed to by ast_frame; */
void *_private; /* pointer to private buffer */
/* pointer to private buffer */
union {
void *_private;
#if !defined(__cplusplus) && !defined(c_plusplus)
void *private attribute_deprecated;
#endif
};
const char *orig_chan_name;
};