-extern SCM scm_drain_input (SCM port);
-extern SCM scm_current_input_port (void);
-extern SCM scm_current_output_port (void);
-extern SCM scm_current_error_port (void);
-extern SCM scm_current_load_port (void);
-extern SCM scm_set_current_input_port (SCM port);
-extern SCM scm_set_current_output_port (SCM port);
-extern SCM scm_set_current_error_port (SCM port);
-extern scm_port * scm_add_to_port_table (SCM port);
-extern void scm_remove_from_port_table (SCM port);
-extern void scm_grow_port_cbuf (SCM port, size_t requested);
-extern SCM scm_pt_size (void);
-extern SCM scm_pt_member (SCM member);
-extern void scm_port_non_buffer (scm_port *pt);
-extern int scm_revealed_count (SCM port);
-extern SCM scm_port_revealed (SCM port);
-extern SCM scm_set_port_revealed_x (SCM port, SCM rcount);
-extern long scm_mode_bits (char *modes);
-extern SCM scm_port_mode (SCM port);
-extern SCM scm_close_input_port (SCM port);
-extern SCM scm_close_output_port (SCM port);
-extern SCM scm_close_port (SCM port);
-extern SCM scm_port_for_each (SCM proc);
-extern SCM scm_input_port_p (SCM x);
-extern SCM scm_output_port_p (SCM x);
-extern SCM scm_port_p (SCM x);
-extern SCM scm_port_closed_p (SCM port);
-extern SCM scm_eof_object_p (SCM x);
-extern SCM scm_force_output (SCM port);
-extern SCM scm_flush_all_ports (void);
-extern SCM scm_read_char (SCM port);
-extern void scm_putc (char c, SCM port);
-extern void scm_puts (const char *str_data, SCM port);
-extern scm_sizet scm_c_read (SCM port, void *buffer, scm_sizet size);
-extern void scm_c_write (SCM port, const void *buffer, scm_sizet size);
-extern void scm_lfwrite (const char *ptr, scm_sizet size, SCM port);
-extern void scm_flush (SCM port);
-extern void scm_end_input (SCM port);
-extern int scm_fill_input (SCM port);
-extern int scm_getc (SCM port);
-extern void scm_ungetc (int c, SCM port);
-extern void scm_ungets (const char *s, int n, SCM port);
-extern SCM scm_peek_char (SCM port);
-extern SCM scm_unread_char (SCM cobj, SCM port);
-extern SCM scm_unread_string (SCM str, SCM port);
-extern SCM scm_seek (SCM object, SCM offset, SCM whence);
-extern SCM scm_truncate_file (SCM object, SCM length);
-extern SCM scm_port_line (SCM port);
-extern SCM scm_set_port_line_x (SCM port, SCM line);
-extern SCM scm_port_column (SCM port);
-extern SCM scm_set_port_column_x (SCM port, SCM line);
-extern SCM scm_port_filename (SCM port);
-extern SCM scm_set_port_filename_x (SCM port, SCM filename);
-extern int scm_port_print (SCM exp, SCM port, scm_print_state *);
-extern void scm_print_port_mode (SCM exp, SCM port);
-extern void scm_ports_prehistory (void);
-extern SCM scm_void_port (char * mode_str);
-extern SCM scm_sys_make_void_port (SCM mode);
-extern void scm_init_ports (void);
+SCM_API SCM scm_drain_input (SCM port);
+SCM_API SCM scm_current_input_port (void);
+SCM_API SCM scm_current_output_port (void);
+SCM_API SCM scm_current_error_port (void);
+SCM_API SCM scm_current_load_port (void);
+SCM_API SCM scm_set_current_input_port (SCM port);
+SCM_API SCM scm_set_current_output_port (SCM port);
+SCM_API SCM scm_set_current_error_port (SCM port);
+SCM_API SCM scm_new_port_table_entry (scm_t_bits tag);
+SCM_API void scm_remove_from_port_table (SCM port);
+SCM_API void scm_grow_port_cbuf (SCM port, size_t requested);
+SCM_API SCM scm_pt_size (void);
+SCM_API SCM scm_pt_member (SCM member);
+SCM_API void scm_port_non_buffer (scm_t_port *pt);
+SCM_API int scm_revealed_count (SCM port);
+SCM_API SCM scm_port_revealed (SCM port);
+SCM_API SCM scm_set_port_revealed_x (SCM port, SCM rcount);
+SCM_API long scm_mode_bits (char *modes);
+SCM_API SCM scm_port_mode (SCM port);
+SCM_API SCM scm_close_input_port (SCM port);
+SCM_API SCM scm_close_output_port (SCM port);
+SCM_API SCM scm_close_port (SCM port);
+SCM_API SCM scm_port_for_each (SCM proc);
+SCM_API SCM scm_input_port_p (SCM x);
+SCM_API SCM scm_output_port_p (SCM x);
+SCM_API SCM scm_port_p (SCM x);
+SCM_API SCM scm_port_closed_p (SCM port);
+SCM_API SCM scm_eof_object_p (SCM x);
+SCM_API SCM scm_force_output (SCM port);
+SCM_API SCM scm_flush_all_ports (void);
+SCM_API SCM scm_read_char (SCM port);
+SCM_API void scm_putc (char c, SCM port);
+SCM_API void scm_puts (const char *str_data, SCM port);
+SCM_API size_t scm_c_read (SCM port, void *buffer, size_t size);
+SCM_API void scm_c_write (SCM port, const void *buffer, size_t size);
+SCM_API void scm_lfwrite (const char *ptr, size_t size, SCM port);
+SCM_API void scm_flush (SCM port);
+SCM_API void scm_end_input (SCM port);
+SCM_API int scm_fill_input (SCM port);
+SCM_API int scm_getc (SCM port);
+SCM_API void scm_ungetc (int c, SCM port);
+SCM_API void scm_ungets (const char *s, int n, SCM port);
+SCM_API SCM scm_peek_char (SCM port);
+SCM_API SCM scm_unread_char (SCM cobj, SCM port);
+SCM_API SCM scm_unread_string (SCM str, SCM port);
+SCM_API SCM scm_seek (SCM object, SCM offset, SCM whence);
+SCM_API SCM scm_truncate_file (SCM object, SCM length);
+SCM_API SCM scm_port_line (SCM port);
+SCM_API SCM scm_set_port_line_x (SCM port, SCM line);
+SCM_API SCM scm_port_column (SCM port);
+SCM_API SCM scm_set_port_column_x (SCM port, SCM line);
+SCM_API SCM scm_port_filename (SCM port);
+SCM_API SCM scm_set_port_filename_x (SCM port, SCM filename);
+SCM_API int scm_port_print (SCM exp, SCM port, scm_print_state *);
+SCM_API void scm_print_port_mode (SCM exp, SCM port);
+SCM_API void scm_ports_prehistory (void);
+SCM_API SCM scm_void_port (char * mode_str);
+SCM_API SCM scm_sys_make_void_port (SCM mode);
+SCM_API void scm_init_ports (void);
+
+
+#if SCM_ENABLE_DEPRECATED==1
+SCM_API scm_t_port * scm_add_to_port_table (SCM port);
+#endif