Bug 62167 - curses include
Summary: curses include
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: ncurses
Version: 7.2
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: wdovlrrw
QA Contact: Aaron Brown
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2002-03-28 02:28 UTC by Andres J.
Modified: 2007-04-18 16:41 UTC (History)
1 user (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2002-03-28 02:40:13 UTC
Embargoed:


Attachments (Terms of Use)
Include in RedHat 7.0 (60.61 KB, text/plain)
2002-03-28 02:40 UTC, Andres J.
no flags Details

Description Andres J. 2002-03-28 02:28:26 UTC
Description of Problem:
I develop a library using curses for my software. This with 
/usr/include/curses.h defined in RedHat 7.0.
In RedHat 7.2 this include change.
In RedHat 7.0 the "ldat" structure is defined for four fields.
In RedHat 7.2 the "ldat" structure is defined for zero field. This is my 
problem. When I compiling my library this error is display: "imcomplete type".

Version-Release number of selected component (if applicable):
NCURSES_VERSION "5.2"

How Reproducible:
Try to insert a character in "stdscr" using the "curses.h" definition.

Steps to Reproduce:
1. Develop a little program using "stdscr" structure
2. Insert a space in a line manipulating "stdscr"
3. gcc

Actual Results:
gcc fail and I don't know why.
If I use NCURSES_VERSION "5.1" I don't have problem.

Expected Results:
Tell me if is a bug or is my bug. And tell me how I can fixed(please).
I would like use NCURSES_VERSION "5.2" in my applications

Additional Information:
Thanks for your time.

Comment 1 Andres J. 2002-03-28 02:40:09 UTC
Created attachment 51025 [details]
Include in RedHat 7.0

Comment 2 Bernhard Rosenkraenzer 2002-04-04 11:29:34 UTC
This is because ldat is a private structure and you aren't supposed to manipulate it 
directly in your code. 
  
Older versions of ncurses just didn't enforce it. 
 
Really evil workaround to keep your old code working: 
Replace 
 
#include <curses.h> 
 
with 
 
#define ldat __ldat 
#include <curses.h> 
#undef ldat 
 
struct ldat { 
	chtype *text; 
	NCURSES_SIZE_T firstchar; 
	NCURSES_SIZE_T lastchar; 
	NCURSES_SIZE_T oldindex; 
}; 
 
 
 
The proper fix is not using ldat directly.


Note You need to log in before you can comment on or make changes to this bug.