the usage
(foo)(bar)
prevents a function-like macro foo() from expanding
but it allows a non-function-like macro foo to expand
so if we have
#define foo _ast_foo
then this is expected
(_ast_foo)(bar)
On Thu, 27 Jan 2011 16:09:44 +0100 =?KOI8-R?B?z8zYx8Egy9LZ1sHOz9fTy8HR?= wrote:
> Glenn, I see this in the diffs between ast-open.20110118 and
> ast-open.20110118:
> --- ast_ksh_20110118/build_normal/src/lib/libast/stdio/getwchar.c
> 2001-05-04 02:33:33.000000000 +0200
> +++ ast_ksh_20110127/src/src/lib/libast/stdio/getwchar.c
> 2011-01-25 17:38:44.000000000 +0100
> @@ -24,7 +24,7 @@
> #include "stdhdr.h"
> wint_t
> -getwchar(void)
> +(getwchar)(void)
> {
> return fgetwc(sfstdin);
> }
> diff -r -u ast_ksh_20110118/build_normal/src/lib/libast/stdio/putwc.c
> ast_ksh_20110127/src/src/lib/libast/stdio/putwc.c
> --- ast_ksh_20110118/build_normal/src/lib/libast/stdio/putwc.c
> 2001-05-04 02:41:57.000000000 +0200
> +++ ast_ksh_20110127/src/src/lib/libast/stdio/putwc.c 2011-01-26
> 06:25:25.000000000 +0100
> @@ -24,7 +24,7 @@
> #include "stdhdr.h"
> wint_t
> -putwc(wchar_t c, Sfio_t* f)
> +(putwc)(wchar_t c, Sfio_t* f)
> {
> return fputwc(c, f);
> }
> If I recall the C language the right way adding ( ) around a function
> name disables the use of cpp macros, i.e. the following macros in AST
> <ast_wchar.h>:
> ./arch/linux.i386/include/ast/ast_wchar.h:#define fputwc
> _ast_fputwc
> ./arch/linux.i386/include/ast/ast_wchar.h:#define putwc _ast_putwc
> ./arch/linux.i386/include/ast/ast_wchar.h:#define putwchar _ast_putwchar
> Is this intended or do I interpret the C language wrong?
> Olga
> On Thu, Jan 27, 2011 at 3:48 PM, Glenn Fowler <[email protected]> wrote:
> >
> > the AT&T Software Technology ast beta 2011-01-27 source and binary release
> > has been posted to the download site
> > http://www.research.att.com/sw/download/beta/
> > the package names and md5 checksums are
> > INIT c683618955092b9f63a5f907f75bf4b0
> > ast-base 0d4179b181451d6b6126efb31abd0d9d
> > ast-open 45c399b18405bf41374f0603d1c79a19
> > ast-ksh f76ffebe3502ed8e032e529551e15d90
> > ast-jmake 41243940558e2c707e7c768faca37874
> > the md5 sums should match the ones listed on the download page
> > if not then don't download
> >
> > we believe that all reported bugs as of last week have been addressed
> > barring build error reports today this will be the official release tomorrow
> >
> > _______________________________________________
> > ast-users mailing list
> > [email protected]
> > https://mailman.research.att.com/mailman/listinfo/ast-users
> >
> --
> , _ _ ,
> { \/`o;====- Olga Kryzhanovska -====;o`\/ }
> .----'-/`-/ [email protected] \-`\-'----.
> `'-..-| / http://twitter.com/fleyta \ |-..-'`
> /\/\ Solaris/BSD//C/C++ programmer /\/\
> `--` `--`
_______________________________________________
ast-users mailing list
[email protected]
https://mailman.research.att.com/mailman/listinfo/ast-users