Return-Path: X-Original-To: apmail-couchdb-commits-archive@www.apache.org Delivered-To: apmail-couchdb-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 3DF7371FD for ; Wed, 26 Oct 2011 18:07:56 +0000 (UTC) Received: (qmail 29426 invoked by uid 500); 26 Oct 2011 18:07:56 -0000 Delivered-To: apmail-couchdb-commits-archive@couchdb.apache.org Received: (qmail 29379 invoked by uid 500); 26 Oct 2011 18:07:56 -0000 Mailing-List: contact commits-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@couchdb.apache.org Delivered-To: mailing list commits@couchdb.apache.org Received: (qmail 29372 invoked by uid 99); 26 Oct 2011 18:07:56 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 26 Oct 2011 18:07:56 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.114] (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 26 Oct 2011 18:07:52 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 9A1F954463; Wed, 26 Oct 2011 18:05:32 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: kocolosk@apache.org To: commits@couchdb.apache.org X-Mailer: ASF-Git Admin Mailer Subject: [3/50] git commit: Hardcode couchjs binary name Message-Id: <20111026180532.9A1F954463@tyr.zones.apache.org> Date: Wed, 26 Oct 2011 18:05:32 +0000 (UTC) X-Virus-Checked: Checked by ClamAV on apache.org Hardcode couchjs binary name Windows doesn't have the libgen.h header or an easily identified basename function. Instead of playing games we just configure the name with autoconf and run with that. Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/0f8c86d9 Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/0f8c86d9 Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/0f8c86d9 Branch: refs/heads/1319-large-headers-are-corrupted Commit: 0f8c86d9387ced39743a0d22c6e54aa39a38508e Parents: 47598c8 Author: Paul Joseph Davis Authored: Sun Oct 23 12:27:35 2011 -0500 Committer: Paul Joseph Davis Committed: Sun Oct 23 12:27:35 2011 -0500 ---------------------------------------------------------------------- configure.ac | 5 +++++ src/couchdb/priv/couch_js/help.h | 4 +--- 2 files changed, 6 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/couchdb/blob/0f8c86d9/configure.ac ---------------------------------------------------------------------- diff --git a/configure.ac b/configure.ac index f7cf955..202b761 100644 --- a/configure.ac +++ b/configure.ac @@ -219,7 +219,12 @@ AC_CHECK_LIB([$JS_LIB_BASE], [JS_GetStringCharsAndLength], # Else, hope that 1.7.0 works LIBS="$OLD_LIBS" +AC_DEFINE([COUCHJS_NAME], ["couchjs"], ["CouchJS executable name."]) + if test x${IS_WINDOWS} = xTRUE; then + + AC_DEFINE([COUCHJS_NAME], ["couchjs.exe"], ["CouchJS executable name."]) + if test -f "$JS_LIB_DIR/$JS_LIB_BASE.dll"; then # seamonkey 1.7- build layout on Windows JS_LIB_BINARY="$JS_LIB_DIR/$JS_LIB_BASE.dll" http://git-wip-us.apache.org/repos/asf/couchdb/blob/0f8c86d9/src/couchdb/priv/couch_js/help.h ---------------------------------------------------------------------- diff --git a/src/couchdb/priv/couch_js/help.h b/src/couchdb/priv/couch_js/help.h index c42c9f5..4102594 100644 --- a/src/couchdb/priv/couch_js/help.h +++ b/src/couchdb/priv/couch_js/help.h @@ -13,8 +13,6 @@ #ifndef COUCHJS_HELP_H #define COUCHJS_HELP_H -#include - #include "config.h" static const char VERSION_TEMPLATE[] = @@ -55,7 +53,7 @@ static const char USAGE_TEMPLATE[] = "\n" "Report bugs at <%s>.\n"; -#define BASENAME basename((char*)argv[0]) +#define BASENAME COUCHJS_NAME #define couch_version(basename) \ fprintf( \