Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:87814 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 90017 invoked from network); 19 Aug 2015 19:55:26 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 19 Aug 2015 19:55:26 -0000 Authentication-Results: pb1.pair.com smtp.mail=php@golemon.com; spf=softfail; sender-id=softfail Authentication-Results: pb1.pair.com header.from=php@golemon.com; sender-id=softfail Received-SPF: softfail (pb1.pair.com: domain golemon.com does not designate 209.85.215.51 as permitted sender) X-PHP-List-Original-Sender: php@golemon.com X-Host-Fingerprint: 209.85.215.51 mail-la0-f51.google.com Received: from [209.85.215.51] ([209.85.215.51:34541] helo=mail-la0-f51.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 76/20-20884-B2FD4D55 for ; Wed, 19 Aug 2015 15:55:24 -0400 Received: by laba3 with SMTP id a3so9880795lab.1 for ; Wed, 19 Aug 2015 12:55:20 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:date:message-id:subject:from :to:content-type; bh=dKJv3kXCnHoB8K6jJtEyswPdOp8bGZfvPAs0LmtWxs0=; b=XtgNHSSHkBVVr90VB8++yQ19w3Ky7FIZu3yhMcD6QzSwYl5jPbEHBLbBaene+OPjcM zpbmAMEpOU68ShOGirnS1e61O14rOrXtvJcAN4rME/O/PkSvxSBmy5PzXZYDUE7ytfkq UAw2U6XdfgLsWz4m2If9T5Jm86zPBrAf9Cx1Vsb7qdxkq4cucczqjeX6inPd7UvabIix J4WVzbwm4ouMrZBGiXLvoTCWysnS/MzOgMm+sdYB7tYX9GdDNR8bK/3ggdshEX6SYWNT mI7ONdiJrJ97qb+vXBlxz8Ry/R/wuOliYbeVqmYcBfzRPnIU79zbygmdVWyYug90X7MC K5cA== X-Gm-Message-State: ALoCoQkTAiYKwUjHFeMsttUHVBRqPWvkE8WL+/jA5TTBgFyJcBrc02llzTXyXVKl+YiPGFf5iyFL MIME-Version: 1.0 X-Received: by 10.152.116.109 with SMTP id jv13mr13539312lab.77.1440014118573; Wed, 19 Aug 2015 12:55:18 -0700 (PDT) Sender: php@golemon.com Received: by 10.112.34.102 with HTTP; Wed, 19 Aug 2015 12:55:18 -0700 (PDT) X-Originating-IP: [2620:10d:c090:200::2:338d] Date: Wed, 19 Aug 2015 12:55:18 -0700 X-Google-Sender-Auth: j-dEWqgu3VbzHumUc3YV4pvXFl8 Message-ID: To: PHP internals Content-Type: text/plain; charset=UTF-8 Subject: C++ Extensions From: pollita@php.net (Sara Golemon) PHP7's 64bit support in Zend/zend_long.h uses INT64_MIN/MAX as well as INT64_C/INT32_C concat macros. In C++, these are only defined if __STDC_LIMIT_MACROS and __STDC_CONSTANT_MACROS has been set prior to including stdint.h A C++ extension developer could deal with this by defining those prior to including php.h, but I wonder if we should accommodate by either: A) Adding those defines prior to including stdint.h B) Expecting C++ ext devs to define those before including php.h C) Modifying zend_long.h to use things like std::numeric_limits() when __cplusplus is defined A may (potentially) have unexpected side-effects B has precedent (see ext/intl/config.m4) C makes the ifdef block that's already there notably more complex -Sara