-- | Common definitions for the modules of the C backend.

module BNFC.Backend.C.Common
  ( posixC
  ) where

import Prelude

-- | Switch C to language variant that has @strdup@.

posixC :: [String]
posixC :: [String]
posixC =
  [ String
"/* strdup was not in the ISO C standard before 6/2019 (C2x), but in POSIX 1003.1."
  , String
" * See: https://en.cppreference.com/w/c/experimental/dynamic/strdup"
  , String
" * Setting _POSIX_C_SOURCE to 200809L activates strdup in string.h."
  , String
" */"
  , String
"#define _POSIX_C_SOURCE 200809L"
  ]