#include <string.h>
#include <ctype.h>
+#include <inttypes.h>
/* ch = C header */
static void ch_output_types(IDL_tree tree, OIDL_Run_Info *rinfo, OIDL_C_Info *ci);
fprintf(ci->fh, "%s", IDL_IDENT(IDL_TYPE_ARRAY(name).ident).str);
for(curitem = IDL_TYPE_ARRAY(name).size_list; curitem; curitem = IDL_LIST(curitem).next) {
- fprintf(ci->fh, "[%" IDL_LL "d]", IDL_INTEGER(IDL_LIST(curitem).data).value);
+ fprintf(ci->fh, "[%" PRId64 "]", IDL_INTEGER(IDL_LIST(curitem).data).value);
}
}
break;
fprintf (ci->fh, " %s", ctmp);
for (sub = IDL_TYPE_ARRAY (ent).size_list; sub; sub = IDL_LIST (sub).next)
- fprintf (ci->fh, "[%" IDL_LL "d]",
+ fprintf (ci->fh, "[%" PRId64 "]",
IDL_INTEGER (IDL_LIST (sub).data).value);
fprintf (ci->fh, ";\n");
/* fprintf (ci->fh, " %s_slice", ctmp); */
/* for (sub = IDL_LIST (IDL_TYPE_ARRAY (ent).size_list).next; */
/* sub; sub = IDL_LIST (sub).next) */
-/* fprintf (ci->fh, "[%" IDL_LL "d]", IDL_INTEGER (IDL_LIST (sub).data).value); */
+/* fprintf (ci->fh, "[%" PRId64 "d]", IDL_INTEGER (IDL_LIST (sub).data).value); */
/* fprintf(ci->fh, ";\n"); */
}
break;
fprintf(of, " if (ev) ev->major = FORB_EX_NONE;\n");
fprintf(of, " if (forb_object_is_local(_obj)) {\n");
fprintf(of, " if (!_obj->interface ||\n"
- " strncmp(_obj->interface->name, \"%s\", %d) != 0) {\n"
+ " strncmp(_obj->interface->name, \"%s\", %zd) != 0) {\n"
" ev->major = FORB_EX_BAD_OPERATION;\n"
" return %s;\n"
" }\n", iface_id, strlen(iface_id), has_retval ? FORB_RETVAL_VAR_NAME : "");
#include "forb-idl-c-backend.h"
#include <string.h>
+#include <inttypes.h>
typedef struct {
IDL_tree ts;
forb_output_tcstruct_digits_scale (FILE *fh, IDL_tree node)
{
if (IDL_NODE_TYPE (node) == IDLN_TYPE_FIXED) {
- fprintf (fh, "%" IDL_LL "d, %" IDL_LL "d" ,
+ fprintf (fh, "%" PRId64 ", %" PRId64 ,
IDL_INTEGER (IDL_TYPE_FIXED (node).positive_int_const).value,
IDL_INTEGER (IDL_TYPE_FIXED (node).integer_lit).value);
}
#include "forb-idl-c-backend.h"
#include <string.h>
+#include <inttypes.h>
/**
*
indent++;
for (i=0; i<indent+1; i++)
fprintf(of, " ");
- fprintf(of, "for (%c=0; %c<%" IDL_LL "d; %c++) \n",
+ fprintf(of, "for (%c=0; %c<%" PRId64 "; %c++) \n",
var, var, IDL_INTEGER(IDL_LIST(curitem).data).value, var);
var++;
}
}
break;
case IDLN_TYPE_FIXED:
- return g_strdup_printf( "CORBA_fixed_%" IDL_LL "d_%" IDL_LL "d",
+ return g_strdup_printf( "CORBA_fixed_%" PRId64 "_%" PRId64 "",
IDL_INTEGER(IDL_TYPE_FIXED(tree).positive_int_const).value,
IDL_INTEGER(IDL_TYPE_FIXED(tree).integer_lit).value);
break;
g_string_printf(tmpstr, "%f", IDL_FLOAT(tree).value);
break;
case IDLN_INTEGER:
- g_string_printf(tmpstr, "%" IDL_LL "d", IDL_INTEGER(tree).value);
+ g_string_printf(tmpstr, "%" PRId64 "", IDL_INTEGER(tree).value);
break;
case IDLN_STRING:
g_string_printf(tmpstr, "\"%s\"", IDL_STRING(tree).value);
#include "config.h"
#include "forb-idl2.h"
#include <string.h>
+#include <inttypes.h>
void
forb_idl_check_oneway_op (IDL_tree op)
break;
case IDLN_INTEGER:
- g_print("INTEGER: %" IDL_LL "d\n", IDL_INTEGER(node).value);
+ g_print("INTEGER: %" PRId64 "\n", IDL_INTEGER(node).value);
break;
case IDLN_STRING:
if (FORB_CDR_data_size(codec) != data_size - mh->message_size) {
size_t processed = data_size - FORB_CDR_data_size(codec);
- ul_logmsg("Message of type %d handled incorrectly (size=%d, processed=%d); fixing\n",
+ ul_logmsg("Message of type %d handled incorrectly (size=%d, processed=%zu); fixing\n",
mh->message_type, mh->message_size, processed);
;
codec->rptr += mh->message_size - processed;
&c->buffer[c->wptr],
c->wptr_max - c->wptr);
if (rcvd < 0) {
- ul_logerr("recv returned error %d (%s), exiting\n", rcvd, strerror(errno));
+ ul_logerr("recv returned error %zd (%s), exiting\n", rcvd, strerror(errno));
return NULL;
}
c->wptr += rcvd;
#include <forb/cdr_codec.h>
#include <forb/cdr.h>
#include "forb_utils.h"
+#include <inttypes.h>
GAVL_CUST_NODE_INT_IMP(forb_objects_nolock /* cust_prefix */,
forb_t /* cust_root_t */,
forb_server_id_to_string(server_id, &obj->server, s);
key = forb_object_to_key(obj);
- snprintf(str, s, "%s-%llx", server_id, key);
+ snprintf(str, s, "%s-%"PRIu64, server_id, key);
return str;
}
if (string[2*sizeof(server_id)] != '-')
return NULL;
- ret = sscanf(&string[2*sizeof(server_id)+1], "%llx", &key);
+ ret = sscanf(&string[2*sizeof(server_id)+1], "%"SCNu64, &key);
if (ret == 0 || ret == EOF)
return NULL;
}
sent = 0;
- ul_logtrash("send fd=%d len=%d\n", ipeer->socket, len);
+ ul_logtrash("send fd=%d len=%zu\n", ipeer->socket, len);
do {
ret = send(ipeer->socket, buf, len, 0);
if (ret < 0) {
iport->last_recv_fd = -1;
continue;
}
- ul_logtrash("recv fd=%d len=%d\n", iport->last_recv_fd, ret);
+ ul_logtrash("recv fd=%d len=%zd\n", iport->last_recv_fd, ret);
return ret;
}
#else