Re: compile error in cvs tip
От | Bruce Momjian |
---|---|
Тема | Re: compile error in cvs tip |
Дата | |
Msg-id | 200304051952.h35JqsI27446@candle.pha.pa.us обсуждение исходный текст |
Ответ на | compile error in cvs tip (Joe Conway <mail@joeconway.com>) |
Ответы |
Re: compile error in cvs tip
|
Список | pgsql-hackers |
OK, patch applied. I am a little surprised your compiler complained. Seems your strcspn() is actually a macro, not a function call. What OS/compiler are you using? --------------------------------------------------------------------------- Joe Conway wrote: > I'm getting a compile error on cvs tip. > > gcc -O2 -g -Wall -Wmissing-prototypes -Wmissing-declarations > -I../../../../src/include -DPKGLIBDIR=\"/usr/local/pgsql/lib\" > -DDLSUFFIX=\".so\" -c -o dfmgr.o dfmgr.c -MMD > dfmgr.c:330:1: directives may not be used inside a macro argument > dfmgr.c:330:1: unterminated argument list invoking macro "strcspn" > make[4]: *** [dfmgr.o] Error 1 > > Looks like it was caused here: > > http://developer.postgresql.org/cvsweb.cgi/pgsql-server/src/backend/utils/fmgr/dfmgr.c.diff?r1=1.57&r2=1.58 > > Joe > > > ---------------------------(end of broadcast)--------------------------- > TIP 4: Don't 'kill -9' the postmaster > -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup. | Newtown Square, Pennsylvania 19073 Index: src/backend/utils/fmgr/dfmgr.c =================================================================== RCS file: /cvsroot/pgsql-server/src/backend/utils/fmgr/dfmgr.c,v retrieving revision 1.58 diff -c -c -r1.58 dfmgr.c *** src/backend/utils/fmgr/dfmgr.c 4 Apr 2003 20:42:12 -0000 1.58 --- src/backend/utils/fmgr/dfmgr.c 5 Apr 2003 19:51:03 -0000 *************** *** 326,338 **** if (name[0] != '$') return pstrdup(name); - macroname_len = strcspn(name + 1, #ifndef WIN32 ! "/" #else ! "/\\" #endif - ) + 1; if (strncmp(name, "$libdir", macroname_len) == 0) replacement = PKGLIBDIR; --- 326,336 ---- if (name[0] != '$') return pstrdup(name); #ifndef WIN32 ! macroname_len = strcspn(name + 1, "/") + 1; #else ! macroname_len = strcspn(name + 1, "/\\") + 1; #endif if (strncmp(name, "$libdir", macroname_len) == 0) replacement = PKGLIBDIR;
В списке pgsql-hackers по дате отправления: