From: Brian P. <br...@va...> - 2001-03-22 17:51:22
|
Karl Schultz wrote: > > > -----Original Message----- > > From: Sven M. Hallberg [mailto:pe...@gm...] > > Sent: Wednesday, March 21, 2001 9:37 AM > > To: Dirk Reiners > > Cc: Brian Paul; RC; mes...@li... > > Subject: [Mesa3d-dev] Re: [Mesa3d-users] configure problem > > (was Missing > > GLX extensions) > > snip > > > > > Well, if the compiler doesn't support the feature the > > only way would be > > > to use > > > > some sort of preprocessor kludge or hard-code the > > function names. Both > > > options > > > > seem kind of hard to accept. I'd say we check for the > > feature and in > > > case it's > > > > not available #define __FUNCTION__ to something sensable > > expressing the > > > lack. > > > > > > It does support __FILE__ and __LINE__, maybe using these > > would be better > > > than not having any indications of the problem happened. > > > > __FUNCTION__ is a problem for Windows as well. > > It would be nice to have > > #if defined(VMS) || defined(WIN32) > #define __FUNCTION__ > #endif > > in texutil_tmp.h Better yet: #ifndef __FUNCTION__ #define __FUNCTION__ "<some function>" #endif > Another problem is > > warning C4003: not enough actual parameters for macro > 'ASSERT_OUTSIDE_BEGIN_END_WITH_RETVAL' > > which is caused by > > #define ASSERT_OUTSIDE_BEGIN_END_WITH_RETVAL(ctx, retval) \ > do { \ > if (ctx->Driver.CurrentExecPrimitive != GL_POLYGON+1) { \ > _mesa_error( ctx, GL_INVALID_OPERATION, "begin/end" ); \ > return retval; \ > } \ > } while (0) > > #define ASSERT_OUTSIDE_BEGIN_END(ctx) \ > ASSERT_OUTSIDE_BEGIN_END_WITH_RETVAL(ctx,) > > in mtypes.h. > > I think that the code is expanding to what we want, but is just generating a > warning. If we're sure that this is OK, then > > # pragma warning( disable : 4003 ) /* not enough actual parameters for > macro */ > > may be a good addition to glheader.h (under the MESA_MINWARN group) The pragma might hide other, legitimate problems. I'd rather just see the macro changed: #define ASSERT_OUTSIDE_BEGIN_END(ctx) do { \ if (ctx->Driver.CurrentExecPrimitive != GL_POLYGON+1) { \ _mesa_error( ctx, GL_INVALID_OPERATION, "begin/end" ); \ return; \ } \ } while (0) -Brian |