X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=tools%2Fdbus-send.c;h=e403a58736f32c3cd5f5d3c94ac4342adf991e8b;hb=2460ddfdb2c1980226593e1af42117b38d5be7dc;hp=81a9c372cdccd7378594dc0090534dc296ee8574;hpb=83d7da43c40b913838917ff79d799dba69812b69;p=platform%2Fupstream%2Fdbus.git diff --git a/tools/dbus-send.c b/tools/dbus-send.c index 81a9c37..e403a58 100644 --- a/tools/dbus-send.c +++ b/tools/dbus-send.c @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * */ @@ -26,6 +26,24 @@ #include +#ifndef HAVE_STRTOLL +#undef strtoll +#define strtoll mystrtoll +#include "strtoll.c" +#endif + +#ifndef HAVE_STRTOULL +#undef strtoull +#define strtoull mystrtoull +#include "strtoull.c" +#endif + +#ifdef DBUS_WINCE +#ifndef strdup +#define strdup _strdup +#endif +#endif + #include "dbus-print-message.h" static const char *appname; @@ -33,7 +51,7 @@ static const char *appname; static void usage (int ecode) { - fprintf (stderr, "Usage: %s [--help] [--system | --session | --address=ADDRESS] [--dest=NAME] [--type=TYPE] [--print-reply=(literal)] [--reply-timeout=MSEC] [contents ...]\n", appname); + fprintf (stderr, "Usage: %s [--help] [--system | --session | --address=ADDRESS] [--dest=NAME] [--type=TYPE] [--print-reply[=literal]] [--reply-timeout=MSEC] [contents ...]\n", appname); exit (ecode); } @@ -284,10 +302,8 @@ main (int argc, char *argv[]) usage (1); else if (path == NULL) path = arg; - else if (name == NULL) + else /* name == NULL guaranteed by the 'while' loop */ name = arg; - else - usage (1); } if (name == NULL)