Remove _mesa_memcmp in favor of plain memcmp.

This may break the SUNOS4 build, but it's no longer relevant.
This commit is contained in:
Kenneth Graunke 2010-02-18 23:51:01 -08:00 committed by Kristian Høgsberg
parent 26f8fad145
commit 2efa86ea30
6 changed files with 5 additions and 20 deletions

View file

@ -271,7 +271,7 @@ struct r300_fragment_program *r300SelectAndTranslateFragmentShader(GLcontext *ct
fp = fp_list->progs;
while (fp) {
if (_mesa_memcmp(&fp->state, &state, sizeof(state)) == 0) {
if (memcmp(&fp->state, &state, sizeof(state)) == 0) {
return r300->selected_fp = fp;
}
fp = fp->next;

View file

@ -316,8 +316,7 @@ struct r300_vertex_program * r300SelectAndTranslateVertexShader(GLcontext *ctx)
wanted_key.WPosAttr = r300->selected_fp->wpos_attr;
for (vp = vpc->progs; vp; vp = vp->next) {
if (_mesa_memcmp(&vp->key, &wanted_key, sizeof(wanted_key))
== 0) {
if (memcmp(&vp->key, &wanted_key, sizeof(wanted_key)) == 0) {
return r300->selected_vp = vp;
}
}

View file

@ -48,7 +48,7 @@
/* bitset operations
*/
#define BITSET_COPY(x, y) memcpy( (x), (y), sizeof (x) )
#define BITSET_EQUAL(x, y) (_mesa_memcmp( (x), (y), sizeof (x) ) == 0)
#define BITSET_EQUAL(x, y) (memcmp( (x), (y), sizeof (x) ) == 0)
#define BITSET_ZERO(x) memset( (x), 0, sizeof (x) )
#define BITSET_ONES(x) memset( (x), 0xff, sizeof (x) )

View file

@ -268,17 +268,6 @@ _mesa_bzero( void *dst, size_t n )
#endif
}
/** Wrapper around memcmp() */
int
_mesa_memcmp( const void *s1, const void *s2, size_t n )
{
#if defined(SUNOS4)
return memcmp( (char *) s1, (char *) s2, (int) n );
#else
return memcmp(s1, s2, n);
#endif
}
/*@}*/

View file

@ -549,9 +549,6 @@ _mesa_memset16( unsigned short *dst, unsigned short val, size_t n );
extern void
_mesa_bzero( void *dst, size_t n );
extern int
_mesa_memcmp( const void *s1, const void *s2, size_t n );
extern double
_mesa_sin(double a);

View file

@ -1095,7 +1095,7 @@ static struct ureg emit_combine( struct texenv_fragment_program *p,
emit_arith( p, OPCODE_MAD, tmp0, WRITEMASK_XYZW, 0,
two, src[0], neg1);
if (_mesa_memcmp(&src[0], &src[1], sizeof(struct ureg)) == 0)
if (memcmp(&src[0], &src[1], sizeof(struct ureg)) == 0)
tmp1 = tmp0;
else
emit_arith( p, OPCODE_MAD, tmp1, WRITEMASK_XYZW, 0,
@ -1494,7 +1494,7 @@ create_new_program(GLcontext *ctx, struct state_key *key,
emit_arith( &p, OPCODE_ADD, out, WRITEMASK_XYZ, 0, cf, s, undef );
emit_arith( &p, OPCODE_MOV, out, WRITEMASK_W, 0, cf, undef, undef );
}
else if (_mesa_memcmp(&cf, &out, sizeof(cf)) != 0) {
else if (memcmp(&cf, &out, sizeof(cf)) != 0) {
/* Will wind up in here if no texture enabled or a couple of
* other scenarios (GL_REPLACE for instance).
*/