"#endif\n"
"\n"
"#include <stdint.h>\n"
- "#include <rpc/rpc.h>\n"
+ "#include <rpc/types.h>\n"
+ "#include <rpc/xdr.h>\n"
"\n"
"/* Use the following symbol in your code to detect whether\n"
" * PortableXDR's rpcgen was used to compile the source file.\n"
case type_hyper:
if (type->sgn) r = "quad_t"; else r = "u_quad_t";
break;
+ case type_float:
+ r = "float";
+ break;
case type_double:
r = "double";
break;
case type_hyper:
r = strdup ("8");
break;
+ case type_float:
+ r = strdup ("4");
+ break;
case type_double:
r = strdup ("8");
break;
else fputs ("uint64_t", yyout);
break;
+ case type_float:
+ fputs ("float", yyout);
+ break;
+
case type_double:
fputs ("double", yyout);
break;
/* Abstract syntax tree types. */
enum type_enum {
type_char, type_short, type_int, type_hyper,
- type_double,
+ type_float, type_double,
type_bool,
type_ident,
};
%token SHORT
%token INT
%token HYPER
+%token FLOAT
%token DOUBLE
%token STRING
%token OPAQUE
{ $$ = new_type (type_int, 1, NULL); }
| UNSIGNED
{ $$ = new_type (type_int, 0, NULL); }
+ | FLOAT
+ { $$ = new_type (type_float, 0, NULL); }
| DOUBLE
{ $$ = new_type (type_double, 0, NULL); }
| BOOL
short return SHORT;
int return INT;
hyper return HYPER;
+float return FLOAT;
double return DOUBLE;
string return STRING;
opaque return OPAQUE;