RPM Package Manager, CVS Repository
http://rpm5.org/cvs/
____________________________________________________________________________
Server: rpm5.org Name: Ralf S. Engelschall
Root: /v/rpm/cvs Email: rse@rpm5.org
Module: rpm Date: 10-Jul-2007 21:46:21
Branch: HEAD Handle: 2007071020462000
Modified files:
rpm/rpmio rpmio.h
Log:
Woooohoooo, declaring a function and a function pointer is totally
different in ISO C when it comes to "extern". For function declarations
the "extern" is acceptable to be left out (although one can provide it
here for pedantic reasons). But for the _declaration_ of a function
pointer the "extern" is absolutely mandatory. If left out one simply
_defines_ a global variable of the same name as the function!
This leads to many nice side-effects. Most notable to the nice, correct
but rather confusing warning from ld(1) like: "alignment 16 of symbol
`Getpass' in ../rpmio/.libs/librpmio.so is smaller than 32 in rpmdeps.o"
Summary:
Revision Changes Path
1.54 +1 -1 rpm/rpmio/rpmio.h
____________________________________________________________________________
patch -p0 <<'@@ .'
Index: rpm/rpmio/rpmio.h
============================================================================
$ cvs diff -u -r1.53 -r1.54 rpmio.h
--- rpm/rpmio/rpmio.h 17 Jun 2007 14:49:02 -0000 1.53
+++ rpm/rpmio/rpmio.h 10 Jul 2007 19:46:20 -0000 1.54
@@ -664,7 +664,7 @@
* @param prompt prompt string
* @return password
*/
-char * (*Getpass) (const char * prompt)
+extern char * (*Getpass) (const char * prompt)
/*@*/;
char * _GetPass (const char * prompt)
/*@*/;
@@ .
Received on Tue Jul 10 21:46:21 2007