this is a workaround for the use of global variables in ejs
*/
struct ejs_state_ctx {
- struct MprVar master;
- struct MprArray *ejsList;
+ MprVar master;
+ MprArray *ejsList;
};
void *ejs_save_state(void)
#ifndef __cplusplus
typedef unsigned char uchar;
-#ifndef __bool_true_false_are_defined
-typedef int bool;
-#endif
#endif
/*
child_si->protocol = parent_si->protocol;
child_si->bound = 1;
- ret = real_getsockname(fd, &un_my_addr, &un_my_addrlen);
+ ret = real_getsockname(fd, (struct sockaddr *)&un_my_addr, &un_my_addrlen);
if (ret == -1) return ret;
ret = sockaddr_convert_from_un(child_si, &un_my_addr, un_my_addrlen,
}
if (asn1_peek_tag(&data, ASN1_BOOLEAN)) {
- if (!asn1_read_BOOLEAN(&data, &(lssc[num]->reverse))) {
+ bool reverse;
+ if (!asn1_read_BOOLEAN(&data, &reverse)) {
return False;
}
+ lssc[num]->reverse = reverse;
}
if (!asn1_end_tag(&data)) {
}
if (asn1_peek_tag(data, ASN1_BOOLEAN)) {
- if (!asn1_read_BOOLEAN(data, &(ctrl->critical))) {
+ bool critical;
+ if (!asn1_read_BOOLEAN(data, &critical)) {
return False;
}
+ critical = ctrl->critical;
} else {
ctrl->critical = False;
}
NTSTATUS pvfs_resolve_name_fd(struct pvfs_state *pvfs, int fd,
struct pvfs_filename *name)
{
- dev_t device = 0;
+ dev_t device = (dev_t)0;
ino_t inode = 0;
if (name->exists) {
/* the client can optionally pass a NULL for type, meaning they don't
want that back */
if (r->in.type != NULL) {
- r->out.type = talloc(mem_ctx, uint32_t);
+ r->out.type = talloc(mem_ctx, enum winreg_Type);
*r->out.type = value->data_type;
}
}
/* Just asking for the size of the buffer */
- r->out.type = &val->data_type;
+ r->out.type = (enum winreg_Type *)&val->data_type;
r->out.length = &val->data.length;
if (!r->in.data) {
r->out.size = talloc(mem_ctx, uint32_t);
struct IUnknown *interfaces[3];
WERROR results[2];
struct com_context *ctx;
- char test_data[5];
+ uint8_t test_data[5];
int i;
com_init();
if (host) {
error = dcom_create_object(ctx, &clsid,
host, 2, IID,
- &interfaces,
+ (struct IUnknown ***)&interfaces,
results);
} else {
error = com_create_object(ctx, &clsid, 2, IID, interfaces, results);
test_data[i] = i+1;
}
- error = IStream_Write((struct IStream *)interfaces[0], mem_ctx, &test_data, 5, NULL);
+ error = IStream_Write((struct IStream *)interfaces[0], mem_ctx, test_data, 5, NULL);
if (!W_ERROR_IS_OK(error)) {
printf("IStream::Write() failed - %s\n", win_errstr(error));
ret = False;
struct winreg_CreateKey r;
struct policy_handle newhandle;
NTSTATUS status;
- uint32_t action_taken = 0;
+ enum winreg_CreateAction action_taken = 0;
printf("\ntesting CreateKey\n");
{
struct winreg_CreateKey r;
NTSTATUS status;
- uint32_t action_taken = 0;
+ enum winreg_CreateAction action_taken = 0;
struct security_descriptor *sd;
DATA_BLOB sdblob;
struct winreg_SecBuf secbuf;
{
struct winreg_QueryValue r;
NTSTATUS status;
- uint32_t zero = 0;
+ enum winreg_Type zero_type = 0;
uint32_t offered = 0xfff;
+ uint32_t zero = 0;
printf("Testing QueryValue\n");
r.in.handle = handle;
r.in.data = NULL;
r.in.value_name.name = valuename;
- r.in.type = &zero;
+ r.in.type = &zero_type;
r.in.size = &offered;
r.in.length = &zero;
struct policy_handle *handle, int max_valnamelen, int max_valbufsize)
{
struct winreg_EnumValue r;
- uint32_t type = 0;
+ enum winreg_Type type = 0;
uint32_t size = max_valbufsize, zero = 0;
BOOL ret = True;
uint8_t buf8;