~brianaker/libdrizzle/windows-support-via-mingw

« back to all changes in this revision

Viewing changes to libdrizzle/query.cc

  • Committer: Continuous Integration
  • Date: 2013-01-05 11:52:21 UTC
  • mfrom: (79.1.5 5.1-api-fixes)
  • Revision ID: ci@drizzle.org-20130105115221-qxd0g29jljekx7q9
Merge lp:~linuxjedi/libdrizzle/5.1-api-fixes Build: jenkins-Libdrizzle-33

Show diffs side-by-side

added added

removed removed

Lines of Context:
47
47
                                 drizzle_return_t *ret_ptr)
48
48
{
49
49
  return drizzle_command_write(con, NULL, DRIZZLE_COMMAND_QUERY,
50
 
                                   (uint8_t *)query, size, size, ret_ptr);
 
50
                                   (unsigned char *)query, size, size, ret_ptr);
51
51
}
52
52
 
53
53
drizzle_result_st *drizzle_query_str(drizzle_st *con,
62
62
  size_t size= strlen(query);
63
63
 
64
64
  return drizzle_command_write(con, NULL, DRIZZLE_COMMAND_QUERY,
65
 
                                   (uint8_t *)query, size, size, ret_ptr);
 
65
                                   (unsigned char *)query, size, size, ret_ptr);
66
66
}
67
67
 
68
68
 
135
135
  return to_size;
136
136
}
137
137
 
138
 
bool drizzle_hex_string(char *to, const uint8_t *from, const size_t from_size)
 
138
bool drizzle_hex_string(char *to, const unsigned char *from, const size_t from_size)
139
139
{
140
140
  if (to == NULL || from == NULL || from_size == 0)
141
141
  {
143
143
  }
144
144
 
145
145
  static const char hex_map[]= "0123456789ABCDEF";
146
 
  const uint8_t *from_end;
 
146
  const unsigned char *from_end;
147
147
 
148
148
  for (from_end= from + from_size; from != from_end; from++)
149
149
  {
164
164
  }
165
165
  
166
166
  SHA1_CTX ctx;
167
 
  uint8_t hash_tmp1[SHA1_DIGEST_LENGTH];
168
 
  uint8_t hash_tmp2[SHA1_DIGEST_LENGTH];
 
167
  unsigned char hash_tmp1[SHA1_DIGEST_LENGTH];
 
168
  unsigned char hash_tmp2[SHA1_DIGEST_LENGTH];
169
169
 
170
170
  SHA1Init(&ctx);
171
 
  SHA1Update(&ctx, (const uint8_t*)from, from_size);
 
171
  SHA1Update(&ctx, (const unsigned char*)from, from_size);
172
172
  SHA1Final(hash_tmp1, &ctx);
173
173
 
174
174
  SHA1Init(&ctx);