Hi All,
I get the following error when building the test dir from trunk, and
with mpich2 from cvs (recent). It looks like mpich2's mpicc adds -
ansi to the gcc compile line now (you can't see it in the below
output, but I verified that its there, and the error goes away if I
remove it). Not sure why they added it, but its hard to argue that
our exported headers don't need to conform to ansi C. The problem is
that there are a number of function definitions in pvfs2-util.h that
are inline static. We do this I think because those functions are
used both by the kernel module and the user space pvfs2 code, so it
saves defining them twice in separate source files. I see two
alternatives at this point: we could make them macros (ew), or we
could move the function defs to source files in both user space code
and kernel module code and give up on not replicating them. Any
other good ideas? Once this is fixed, it looks like the -ansi causes
a plethora of other bugs to be expressed in our test code. The two
big ones: use of // instead of /* */. And apparently -ansi has some
issues with bzero, snprintf, strdup, getopt...not sure what the deal
is there yet...
Also, this error brings up a few other nitpicky things I might as
well mention, since I'm here.
* Shouldn't PVFS2_translate_mode be PVFS_translate_mode? It seems to
be the only function in our source that gets the 2.
* get_object_type (also defined as inline static in the header)
doesn't seem to have a PVFS prefix...even though its static.
* The PINT_util_digest functions are declared in pvfs2-util.h (an
exported header). Could we move them to some internal header? The
kernel module code can include our internal headers right?
MPICC correctness/pts/create.o
In file included from ../../pvfs2-HEAD/test/correctness/pts/create.c:12:
/home/slang/pvfs2-devel/INSTALL-pvfs2-HEAD/include/pvfs2-util.h:98:
error: syntax error before 'int'
/home/slang/pvfs2-devel/INSTALL-pvfs2-HEAD/include/pvfs2-util.h:99:
warning: no previous prototype for 'PVFS2_translate_mode'
/home/slang/pvfs2-devel/INSTALL-pvfs2-HEAD/include/pvfs2-util.h:133:
error: syntax error before 'static'
/home/slang/pvfs2-devel/INSTALL-pvfs2-HEAD/include/pvfs2-util.h:143:
error: syntax error before 'static'
/home/slang/pvfs2-devel/INSTALL-pvfs2-HEAD/include/pvfs2-util.h:153:
error: syntax error before 'static'
/home/slang/pvfs2-devel/INSTALL-pvfs2-HEAD/include/pvfs2-util.h:169:
error: syntax error before 'char'
/home/slang/pvfs2-devel/INSTALL-pvfs2-HEAD/include/pvfs2-util.h:170:
warning: no previous prototype for 'get_object_type'
../../pvfs2-HEAD/test/correctness/pts/create.c: In function
'test_create':
../../pvfs2-HEAD/test/correctness/pts/create.c:180: warning: implicit
declaration of function 'snprintf'
_______________________________________________
Pvfs2-developers mailing list
Pvfs2-developers@beowulf-underground.org
http://www.beowulf-underground.org/mailman/listinfo/pvfs2-developers