Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit53aafdb

Browse files
committed
Strip file names reported in error messages on Windows, too.
Commitdd13605 established a policy that error message FILE itemsshould include only the base name of the reporting source file, foruniformity and succinctness. We now observe that some Windows compilersuse backslashes in __FILE__ strings, so truncate at backslashes as well.This is expected to fix some platform variation in the results of thenew libpq_pipeline test module.Discussion:https://postgr.es/m/3650140.1617372290@sss.pgh.pa.us
1 parent1877c9a commit53aafdb

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

‎src/backend/utils/error/elog.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -529,6 +529,10 @@ errfinish(const char *filename, int lineno, const char *funcname)
529529
slash=strrchr(filename,'/');
530530
if (slash)
531531
filename=slash+1;
532+
/* Some Windows compilers use backslashes in __FILE__ strings */
533+
slash=strrchr(filename,'\\');
534+
if (slash)
535+
filename=slash+1;
532536
}
533537

534538
edata->filename=filename;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp