The gcc attribute "deprecated" seems to have been available since gcc 3.1
[p5sagit/p5-mst-13.2.git] / perl.h
diff --git a/perl.h b/perl.h
index 1338483..d913929 100644 (file)
--- a/perl.h
+++ b/perl.h
@@ -2732,6 +2732,9 @@ typedef struct clone_params CLONE_PARAMS;
 
 #ifndef PERL_MICRO
 #if defined __GNUC__ && !defined(__INTEL_COMPILER)
+#  if __GNUC__ == 3 && __GNUC_MINOR__ >= 1 || __GNUC__ > 3 /* 3.1 -> */
+#    define HASATTRIBUTE_DEPRECATED
+#  endif
 #  if __GNUC__ >= 3 /* 3.0 -> */ /* XXX Verify this version */
 #    define HASATTRIBUTE_FORMAT
 #    if defined __MINGW32__
@@ -3150,6 +3153,9 @@ typedef pthread_key_t     perl_key;
 #  endif
 #endif
 
+#ifdef HASATTRIBUTE_DEPRECATED
+#  define __attribute__deprecated__         __attribute__((deprecated))
+#endif
 #ifdef HASATTRIBUTE_FORMAT
 #  define __attribute__format__(x,y,z)      __attribute__((format(x,y,z)))
 #endif
@@ -3173,6 +3179,9 @@ typedef pthread_key_t     perl_key;
 #endif
 
 /* If we haven't defined the attributes yet, define them to blank. */
+#ifndef __attribute__deprecated__
+#  define __attribute__deprecated__
+#endif
 #ifndef __attribute__format__
 #  define __attribute__format__(x,y,z)
 #endif
@@ -5347,9 +5356,7 @@ typedef struct am_table_short AMTS;
 #define PERLDBf_NAMEANON       0x200   /* Informative names for anon subs */
 #define PERLDBf_SAVESRC        0x400   /* Save source lines into @{"_<$filename"} */
 #define PERLDBf_SAVESRC_NOSUBS 0x800   /* Including evals that generate no subrouties */
-#if 0 /* Not yet working. */
 #define PERLDBf_SAVESRC_INVALID        0x1000  /* Save source that did not compile */
-#endif
 
 #define PERLDB_SUB     (PL_perldb && (PL_perldb & PERLDBf_SUB))
 #define PERLDB_LINE    (PL_perldb && (PL_perldb & PERLDBf_LINE))
@@ -5363,9 +5370,7 @@ typedef struct am_table_short AMTS;
 #define PERLDB_NAMEANON        (PL_perldb && (PL_perldb & PERLDBf_NAMEANON))
 #define PERLDB_SAVESRC         (PL_perldb && (PL_perldb & PERLDBf_SAVESRC))
 #define PERLDB_SAVESRC_NOSUBS  (PL_perldb && (PL_perldb & PERLDBf_SAVESRC_NOSUBS))
-#if 0 /* Not yet working. */
 #define PERLDB_SAVESRC_INVALID (PL_perldb && (PL_perldb & PERLDBf_SAVESRC_INVALID))
-#endif
 
 #ifdef USE_LOCALE_NUMERIC