Bug 30035 - 1.3.2 fails to compile on error: too few arguments to function '_dbus_make_file_world_readable'
Summary: 1.3.2 fails to compile on error: too few arguments to function '_dbus_make_fi...
Status: RESOLVED DUPLICATE of bug 30248
Alias: None
Product: dbus
Classification: Unclassified
Component: core (show other bugs)
Version: 1.3.x (devel)
Hardware: x86-64 (AMD64) Windows (All)
: medium normal
Assignee: Havoc Pennington
QA Contact: John (J5) Palmieri
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-09-05 12:23 UTC by René Berber
Modified: 2010-12-21 08:06 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
patch to build dbus 1.4.0 on windows 7, includes fix to bug 30035 (1.46 KB, patch)
2010-09-17 14:22 UTC, richard.a.hankins
Details | Splinter Review

Description René Berber 2010-09-05 12:23:53 UTC
Looks like dbus-file-win.c is not following the header dbus-file.h:51; this is using the MinGW cross compiling environment :

dbus-file-win.c: In function '_dbus_string_save_to_file':
dbus-file-win.c:278:5: warning: passing argument 1 of '_dbus_make_file_world_readable' from incompatible pointer type
../dbus/dbus-file.h:51:13: note: expected 'const struct DBusString *' but argument is of type 'const char *'
dbus-file-win.c:278:5: error: too few arguments to function '_dbus_make_file_world_readable'
../dbus/dbus-file.h:51:13: note: declared here
Comment 1 richard.a.hankins 2010-09-17 14:22:25 UTC
Created attachment 38774 [details] [review]
patch to build dbus 1.4.0 on windows 7, includes fix to bug 30035

Fixes bug #30035 regarding dbus_make_file_world_readable definition-use mismatch:

!     _dbus_make_file_world_readable (tmp_filename_c);
-->
!     _dbus_make_file_world_readable (&tmp_filename, error);

Also removes incorrect sanity check in dbus/dbus-sockets-win.h. Errno.h on Windows appears to define the constants used in sanity check:

  #if defined(EPROTONOSUPPORT) || \
      defined(EAFNOSUPPORT) || \
      defined(EWOULDBLOCK)
! #error This does not look like Win32 and the Microsoft C library
  #endif

I commented out the check, but this likely needs a proper removal or investigation.

Thanks!
Comment 2 Ralf Habacker 2010-12-13 06:24:37 UTC
- the fix to relating to _dbus_make_file_world_readable (&tmp_filename, error) is already in git and therefore obsolate. 

- the second fix will not be committed because it disables the check for all windows compilers and at least on windows xp with vs2008 this check didn't fail. 
Please exclude the #error line with an #if .../#endif wrapper only been false for your specific compiler.
Comment 3 Ralf Habacker 2010-12-13 06:30:37 UTC
*** Bug 30248 has been marked as a duplicate of this bug. ***
Comment 4 Ralf Habacker 2010-12-21 08:06:24 UTC
the first patch is applied, the second already reported in another bug, so this could be closed

*** This bug has been marked as a duplicate of bug 30248 ***


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.