From kde-core-devel Tue Apr 08 06:56:16 2003 From: Michael Matz Date: Tue, 08 Apr 2003 06:56:16 +0000 To: kde-core-devel Subject: Re: Patch for res_init() check in acinclude.m4.in X-MARC-Message: https://marc.info/?l=kde-core-devel&m=104978499215983 Hi, On Mon, 7 Apr 2003, Albert Chin-A-Young wrote: > > > - [ AC_MSG_RESULT(no) ] > > > - ) > > > + [res_init()], > > > > This must be a complete C-statement, i.e. including the final ';'. Given > > that it is missing here, I suppose this never was correctly tested, so I'm > > not yet applying it yet. But if you fix, I might ;-) > > Really? Well, sort of. > From acinclude.m4: > AC_DEFUN(AC_CHECK_SETENV, > [ > KDE_CHECK_FUNC_EXT(setenv, [ > #include > ], > [setenv("VAR", "VALUE", 1);], Yes, please look at it again. There is a ';' here. > [int setenv (const char *, const char *, int)], > [SETENV]) > ]) > > The ';' is added automatically by autoconf. I'm not talking about the prototype, but about the actual use of the function, i.e. the FUNCTION-BODY argument of AC_TRY_COMPILE. You are right in one way, that a final ';' is indeed added by autoconf after pasting that argument literally into the main() function. But we should use it consistently, and the current style of KDE_CHECK_FUNC_EXT usage is to have that argument by a complete statement. Ciao, Michael.