FAQ
--- mg.c.dist 2006-06-04 11:14:08.781981100 +0300
+++ mg.c 2006-06-04 11:16:56.624619000 +0300
@@ -1097,6 +1097,11 @@
#endif /* VMS */
if (s && klen == 4 && strEQ(ptr,"PATH")) {
const char * const strend = s + len;
+#ifdef VMS /* Hmm. How do we get $Config{path_sep} from C? */
+ const char path_sep = '|';
+#else
+ const char path_sep = ':';
+#endif

while (s < strend) {
char tmpbuf[256];
@@ -1104,12 +1109,8 @@
I32 i;
s = delimcpy(tmpbuf, tmpbuf + sizeof tmpbuf,
s, strend,
-#ifdef VMS
- '|', /* Hmm. How do we get $Config{path_sep} from C? */
-#else
- ':',
-#endif
- &i);
+ path_sep,
+ &i);
s++;
if (i >= (I32)sizeof tmpbuf /* too long -- assume the worst */
#ifdef VMS

Search Discussions

  • Andy Lester at Jun 4, 2006 at 2:25 pm
    You beat me to it. My GCC tells me that it's non-portable, but
    compiles it anyway.

    xoa

    --
    Andy Lester => andy@petdance.com => www.petdance.com => AIM:petdance
  • Rafael Garcia-Suarez at Jun 5, 2006 at 8:38 am
    Jarkko Hietaniemi wrote:
    --- mg.c.dist 2006-06-04 11:14:08.781981100 +0300
    +++ mg.c 2006-06-04 11:16:56.624619000 +0300
    Thanks, applied as change #28351.
    @@ -1097,6 +1097,11 @@
    #endif /* VMS */
    if (s && klen == 4 && strEQ(ptr,"PATH")) {
    const char * const strend = s + len;
    +#ifdef VMS /* Hmm. How do we get $Config{path_sep} from C? */
    Hmm, not found a way, strange.
    + const char path_sep = '|';
    +#else
    + const char path_sep = ':';
  • Andy Dougherty at Jun 5, 2006 at 6:18 pm

    On Mon, 5 Jun 2006, Rafael Garcia-Suarez wrote:

    Jarkko Hietaniemi wrote:
    +#ifdef VMS /* Hmm. How do we get $Config{path_sep} from C? */
    Hmm, not found a way, strange.
    It looks to me like we simply never envisioned needing it. Adding it
    should be as simple as adding a few lines something like

    ?C:PATH_SEP:
    ?C: This symbol defines . . . .
    ?C:.
    ?H:#define PATH_SEP $path_sep
    ?H:.

    to the modified/Unix.U metaconfig unit and re-generating Configure.
    (I suspect the name PATH_SEP is probably not a good choice, as it seems
    plausible to me that something else may have defined it already.)

    --
    Andy Dougherty doughera@lafayette.edu
  • H.Merijn Brand at Jun 6, 2006 at 1:27 pm

    On Mon, 5 Jun 2006 14:19:10 -0400 (EDT), Andy Dougherty wrote:
    On Mon, 5 Jun 2006, Rafael Garcia-Suarez wrote:

    Jarkko Hietaniemi wrote:
    +#ifdef VMS /* Hmm. How do we get $Config{path_sep} from C? */
    Hmm, not found a way, strange.
    It looks to me like we simply never envisioned needing it. Adding it
    should be as simple as adding a few lines something like

    ?C:PATH_SEP:
    ?C: This symbol defines . . . .
    ?C:.
    ?H:#define PATH_SEP $path_sep
    ?H:.

    to the modified/Unix.U metaconfig unit and re-generating Configure.
    (I suspect the name PATH_SEP is probably not a good choice, as it seems
    plausible to me that something else may have defined it already.)
    Any opinions? Andy has completely written the recipe, it's so
    easy to implement. Just say what is needed.


    --
    H.Merijn Brand Amsterdam Perl Mongers (http://amsterdam.pm.org/)
    using & porting perl 5.6.2, 5.8.x, 5.9.x on HP-UX 10.20, 11.00, 11.11,
    & 11.23, SuSE 10.0, AIX 4.3 & 5.2, and Cygwin. http://qa.perl.org
    http://mirrors.develooper.com/hpux/ http://www.test-smoke.org
    http://www.goldmark.org/jeff/stupid-disclaimers/
  • Rafael Garcia-Suarez at Jun 6, 2006 at 1:31 pm

    On 06/06/06, H.Merijn Brand wrote:
    (I suspect the name PATH_SEP is probably not a good choice, as it seems
    plausible to me that something else may have defined it already.)
    Any opinions? Andy has completely written the recipe, it's so
    easy to implement. Just say what is needed.
    Maybe call the C macro PERL_PATH_SEP. (Also, the Glossary entry for
    path_sep speaks about a unknown p_ variable in an unknown Head.U
    file...)
  • John E. Malmberg at Jun 7, 2006 at 2:01 am

    Andy Dougherty wrote:
    On Mon, 5 Jun 2006, Rafael Garcia-Suarez wrote:

    Jarkko Hietaniemi wrote:
    +#ifdef VMS /* Hmm. How do we get $Config{path_sep} from C? */
    Hmm, not found a way, strange.
    It looks to me like we simply never envisioned needing it. Adding it
    should be as simple as adding a few lines something like

    ?C:PATH_SEP:
    ?C: This symbol defines . . . .
    ?C:.
    ?H:#define PATH_SEP $path_sep
    ?H:.

    to the modified/Unix.U metaconfig unit and re-generating Configure.
    (I suspect the name PATH_SEP is probably not a good choice, as it seems
    plausible to me that something else may have defined it already.)
    Careful here, while the OpenVMS DCL interpreter wants to use the '|' as
    a path separator, when Perl is running under the Bash shell or similar,
    it will probably want to see the ":" separator.

    Making this a compile time constant or an #ifdef VMS is likely to break
    Perl on OpenVMS when it is running under Bash.

    -John
    wb8tyw@qsl.net
    Personal Opinion Only

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupperl5-porters @
categoriesperl
postedJun 4, '06 at 8:24a
activeJun 7, '06 at 2:01a
posts7
users7
websiteperl.org

People

Translate

site design / logo © 2022 Grokbase