summaryrefslogtreecommitdiffstats
path: root/cpukit/librpc/include/rpcsvc
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2012-04-23 14:42:58 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2012-06-06 13:57:43 +0200
commit8250503f218be1a3fa434e905631b1636cf6d033 (patch)
treeb23dfdca86e25ad19ff70a4799b8f7a09389a82d /cpukit/librpc/include/rpcsvc
parentnetwork/bootp: PR2031: Add and use header file (diff)
downloadrtems-8250503f218be1a3fa434e905631b1636cf6d033.tar.bz2
librpc: PR2066: Fix for short enums
The XDR library has a problem on architectures with short enums like the default ARM EABI. Short enums means that the size of the enum type is variable and the smallest integer type to hold all enum values will be selected. For many enums this is char. The XDR library uses int32_t for enum_t. There are several evil casts from an enum type to enum_t which leads to invalid memory accesses on short enum architectures. A workaround is to add appropriate dummy enum values.
Diffstat (limited to 'cpukit/librpc/include/rpcsvc')
-rw-r--r--cpukit/librpc/include/rpcsvc/nis_db.h6
-rw-r--r--cpukit/librpc/include/rpcsvc/yp_prot.h3
2 files changed, 6 insertions, 3 deletions
diff --git a/cpukit/librpc/include/rpcsvc/nis_db.h b/cpukit/librpc/include/rpcsvc/nis_db.h
index dbdee5aac8..71785b0fa8 100644
--- a/cpukit/librpc/include/rpcsvc/nis_db.h
+++ b/cpukit/librpc/include/rpcsvc/nis_db.h
@@ -69,7 +69,8 @@ enum db_status {
DB_BADOBJECT = 5,
DB_MEMORY_LIMIT = 6,
DB_STORAGE_LIMIT = 7,
- DB_INTERNAL_ERROR = 8
+ DB_INTERNAL_ERROR = 8,
+ _DB_STATUS = 0xffffffff
};
typedef enum db_status db_status;
@@ -80,7 +81,8 @@ enum db_action {
DB_FIRST = 3,
DB_NEXT = 4,
DB_ALL = 5,
- DB_RESET_NEXT = 6
+ DB_RESET_NEXT = 6,
+ _DB_ACTION = 0xffffffff
};
typedef enum db_action db_action;
diff --git a/cpukit/librpc/include/rpcsvc/yp_prot.h b/cpukit/librpc/include/rpcsvc/yp_prot.h
index 5abe0e2514..f29f3ce833 100644
--- a/cpukit/librpc/include/rpcsvc/yp_prot.h
+++ b/cpukit/librpc/include/rpcsvc/yp_prot.h
@@ -233,7 +233,8 @@ struct dom_binding {
/* error code in ypbind_resp.ypbind_status */
enum ypbind_resptype {
YPBIND_SUCC_VAL = 1,
- YPBIND_FAIL_VAL = 2
+ YPBIND_FAIL_VAL = 2,
+ _YPBIND_RESPTYPE = 0xffffffff
};
/* network order, of course */