How to maintain fixed size of C variable types over different machines?
- by Alex
I've all this kind of functions.
ssize_t fuc1(int var1, void *buf, size_t count);
int func2(char *charPtr, int mode, int dev);
short func3( long var2);
problem is that data types in C has different sizes when compiled on different machines(64bit & 32bit). This is true for even void*. For some reasons. I need to ensure that these sizes all are same on every machine(64bit & 32bit). So, how should I modify these ?